Changeset 5419
- Timestamp:
- 06/20/09 10:13:20 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre-Plugin-Perl6/lib/Padre/Plugin/Perl6/Perl6Document.pm
r5418 r5419 245 245 )), 246 246 sub { 247 #XXX-implement add space before brace 247 #Insert a space before brace 248 my $line_start = $editor->PositionFromLine( $current_line_no ); 249 my $line_end = $editor->GetLineEndPosition( $current_line_no ); 250 my $line_text = $editor->GetTextRange($line_start, $line_end); 251 $line_text =~ s/$keyword\(/$keyword \(/; 252 $editor->SetSelection( $line_start, $line_end ); 253 $editor->ReplaceSelection( $line_text ); 248 254 }, 249 255 ); … … 270 276 $menu->Append( -1, Wx::gettext("Use ~ instead of . for string concatenation") ), 271 277 sub { 272 #XXX-implement use ~ instead of . for string concatenation 278 #replace first '.' with '~' in the current line 279 my $line_start = $editor->PositionFromLine( $current_line_no ); 280 my $line_end = $editor->GetLineEndPosition( $current_line_no ); 281 my $line_text = $editor->GetTextRange($line_start, $line_end); 282 $line_text =~ s/\./~/; 283 $editor->SetSelection( $line_start, $line_end ); 284 $editor->ReplaceSelection( $line_text ); 273 285 }, 274 286 ); … … 281 293 $menu->Append( -1, Wx::gettext("Use . instead of -> for method call") ), 282 294 sub { 283 #XXX-implement Use . instead of -> for method call 295 #Replace first '->' with '.' in the current line 296 my $line_start = $editor->PositionFromLine( $current_line_no ); 297 my $line_end = $editor->GetLineEndPosition( $current_line_no ); 298 my $line_text = $editor->GetTextRange($line_start, $line_end); 299 $line_text =~ s/\-\>/\./; 300 $editor->SetSelection( $line_start, $line_end ); 301 $editor->ReplaceSelection( $line_text ); 284 302 }, 285 303 ); … … 292 310 $menu->Append( -1, Wx::gettext("Use Perl 6 constructor syntax") ), 293 311 sub { 294 #XXX-implement Use Perl 6 constructor syntax 312 #replace first 'new Foo' with 'Foo.new' in the current line 313 295 314 }, 296 315 );
Note: See TracChangeset
for help on using the changeset viewer.
