Changeset 9576 for trunk/Padre-Plugin-Catalyst/lib/Padre/Plugin/Catalyst.pm
- Timestamp:
- 12/09/09 15:59:58 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre-Plugin-Catalyst/lib/Padre/Plugin/Catalyst.pm
r9574 r9576 583 583 sub editor_changed { 584 584 my $self = shift; 585 586 return; # TODO: remove this line as soon as the following are working. 587 588 my $document = undef; # TODO: Fill with the current document 589 585 my $document = $self->main->current->document || return; 586 590 587 $document->{menu} = [] if (!defined($document->{menu})) or (ref($document->{menu}) ne 'ARRAY'); 591 $document ->{menu} = [grep (!/^menu\.catalyst$/,@{$document->{menu}}) ]; 592 if (my $document_is_from_catalyst_project) { 593 push @{$document->{menu}},'menu.catalyst'; 588 $document->{menu} = [grep (!/^menu\.Catalyst$/,@{$document->{menu}}) ]; 589 590 require Padre::Plugin::Catalyst::Util; 591 if (Padre::Plugin::Catalyst::Util::in_catalyst_project($document->filename)) { 592 push @{$document->{menu}}, 'menu.Catalyst'; 594 593 } 595 594 }
Note: See TracChangeset
for help on using the changeset viewer.
