Changeset 4170
- Timestamp:
- 04/26/09 12:09:59 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre-Plugin-Perl6/lib/Padre/Task/Outline/Perl6.pm
r4168 r4170 56 56 my $symbol_name = ''; 57 57 my $symbol_line = -1; 58 my $symbol_suffix = ''; 58 59 my $symbol_context = ''; 59 60 my $context = 'GLOBAL'; … … 81 82 } elsif($tree =~ /routine_declarator__\w+_\d+method method_def (longname|$)/) { 82 83 # a method 84 if($buffer eq '!') { 85 # private method... 86 $symbol_suffix = " (private)"; 87 } 83 88 $symbol_type = "methods"; 84 89 $symbol_name .= $buffer; … … 99 104 $symbol_name .= $buffer; 100 105 $symbol_line = $lineno; 106 } elsif($tree =~ /scope_declarator__\w+_\d+(our|my|has|state|constant) scoped declarator variable_declarator variable/) { 107 # a start for an attribute declaration 108 $symbol_type = "attributes"; 109 $symbol_name .= $buffer; 110 $symbol_line = $lineno; 111 $symbol_suffix = $1; 101 112 } else { 102 113 if($symbol_name ne '') { … … 116 127 $cur_pkg->{line} = $symbol_line; 117 128 } else { 118 if($symbol_type eq 'methods' && $symbol_name =~ /^!/) { 119 # private method... 120 $symbol_name .= " (private)"; 129 if($symbol_type eq 'attributes') { 130 if($symbol_name !~ /\./) { 131 $symbol_suffix = " (private, $symbol_suffix)"; 132 } else { 133 $symbol_suffix = " ($symbol_suffix)"; 134 } 121 135 } 136 $symbol_name .= $symbol_suffix; 122 137 push @{ $cur_pkg->{$symbol_type} }, { 123 138 name => $symbol_name, … … 128 143 $symbol_name = ''; 129 144 $symbol_line = -1; 145 $symbol_suffix = ''; 130 146 } 131 147 } … … 241 257 ) 242 258 ); 243 foreach my $type (qw(modules subroutines methods submethods macros regexes )) {259 foreach my $type (qw(modules subroutines methods submethods macros regexes attributes)) { 244 260 _add_subtree( $outlinebar, $pkg, $type, $branch ); 245 261 } … … 264 280 265 281 my @sorted_entries = (); 266 if ( $type eq 'subroutines' || $type eq 'methods' || $type eq 'submethods' || $type eq 'macros' ) {282 if ( $type eq 'subroutines' || $type eq 'methods' || $type eq 'submethods' || $type eq 'macros' || $type eq 'attributes') { 267 283 my $config = Padre->ide->config; 268 284 if ( $config->main_functions_order eq 'original' ) { … … 304 320 $type eq 'submethods' || 305 321 $type eq 'macros' || 306 $type eq 'regexes') 322 $type eq 'regexes' || 323 $type eq 'attributes') 307 324 { 308 325 $outlinebar->Expand($type_elem);
Note: See TracChangeset
for help on using the changeset viewer.
