Changeset 5418
- Timestamp:
- 06/20/09 10:00:31 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre-Plugin-Perl6/lib/Padre/Plugin/Perl6/Perl6Document.pm
r5417 r5418 230 230 231 231 my $routine_name = $1; 232 #XXX-add more control keywords 233 my @keywords = ('if','unless','loop','for'); 234 foreach my $keyword (@keywords) { 232 #flow control keywords 233 my @flow_control_keywords = ( 234 'for', 'given', 'if', 'loop', 'repeat', 235 'unless', 'until', 'when', 'while', 236 ); 237 foreach my $keyword (@flow_control_keywords) { 235 238 if($keyword eq $routine_name) { 236 239 Wx::Event::EVT_MENU( 237 240 $main, 238 $menu->Append( -1, sprintf( Wx::gettext("Did u mean if (...) { }?"), $keyword) ), 241 $menu->Append( -1, 242 sprintf( 243 Wx::gettext("Insert a space after $keyword?"), 244 $keyword 245 )), 239 246 sub { 240 247 #XXX-implement add space before brace … … 249 256 $menu->Append( -1, sprintf( Wx::gettext("Insert routine '%s'"), $routine_name) ), 250 257 sub { 251 #XXX-implement insert routine 258 #Insert an empty routine definition before the current line 259 my $line_start = $editor->PositionFromLine( $current_line_no ); 260 $editor->InsertText($line_start, 261 "sub $routine_name {$new_line\t#XXX-implement$new_line}$new_line"); 252 262 }, 253 263 );
Note: See TracChangeset
for help on using the changeset viewer.
