Changeset 7488
- Timestamp:
- 08/23/09 07:14:03 (2 years ago)
- Location:
- trunk/Padre/lib/Padre
- Files:
-
- 3 edited
-
QuickFixProvider/Perl.pm (modified) (1 diff)
-
Wx/Main.pm (modified) (1 diff)
-
Wx/Menu/Edit.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/QuickFixProvider/Perl.pm
r7486 r7488 27 27 # 28 28 sub quick_fix_list { 29 my ( $self, $doc, $editor) = @_;30 31 my @items = ();32 my $text = $editor->GetText;29 my ( $self, $doc, $editor ) = @_; 30 31 my @items = (); 32 my $text = $editor->GetText; 33 33 my $current_line_no = $editor->GetCurrentLine; 34 34 35 if ($text !~ /^\s*use strict/msx) {35 if ( $text !~ /^\s*use strict/msx ) { 36 36 push @items, { 37 text => qq{Add 'use strict;'},37 text => qq{Add 'use strict;'}, 38 38 listener => sub { 39 39 $text = 'use strict;' . $text; 40 }40 } 41 41 }; 42 42 } 43 if ($text !~ /^\s*use warnings/msx) {43 if ( $text !~ /^\s*use warnings/msx ) { 44 44 push @items, { 45 text => qq{Add 'use warnings;'},45 text => qq{Add 'use warnings;'}, 46 46 listener => sub { 47 47 $text = 'use warnings;' . $text; 48 48 49 #$editor->ReplaceSelection( 49 }50 } 50 51 }; 51 52 } -
trunk/Padre/lib/Padre/Wx/Main.pm
r7461 r7488 2722 2722 my $self = shift; 2723 2723 my $dir = shift; 2724 2724 2725 2725 if ($dir) { 2726 2726 $self->{cwd} = $dir; -
trunk/Padre/lib/Padre/Wx/Menu/Edit.pm
r7484 r7488 178 178 my @list = (); 179 179 my @items = (); 180 eval { 180 eval { 181 181 182 # Find available quick fixes from provider 182 my $provider = $doc->get_quick_fix_provider; 183 @items = $provider->quick_fix_list( $doc, $editor);183 my $provider = $doc->get_quick_fix_provider; 184 @items = $provider->quick_fix_list( $doc, $editor ); 184 185 185 186 # Add quick list items from document's quick fix provider … … 188 189 } 189 190 }; 190 if ($@) {191 if ($@) { 191 192 warn "Error while calling get_quick_fix_provider: $@\n"; 192 193 }
Note: See TracChangeset
for help on using the changeset viewer.
