Class: Redcar::Declarations::OutlineViewDialog
- Inherits:
-
FilterListDialog
- Object
- FilterListDialog
- Redcar::Declarations::OutlineViewDialog
- Includes:
- Model, Observable
- Defined in:
- plugins/declarations/lib/declarations/commands.rb
Constant Summary
Constant Summary
Constants included from Observable
Instance Attribute Summary (collapse)
-
- (Object) document
Returns the value of attribute document.
-
- (Object) last_list
Returns the value of attribute last_list.
Attributes included from Model
Instance Method Summary (collapse)
-
- (OutlineViewDialog) initialize(document)
constructor
A new instance of OutlineViewDialog.
- - (Object) selected(item, ix)
- - (Object) update_list(filter)
Methods included from Observable
#add_listener, #notify_listeners, #remove_listener
Methods included from ReentryHelpers
Methods inherited from FilterListDialog
#close, #filter_and_rank_by, #moved_to, #open, #step?, #step_time
Constructor Details
- (OutlineViewDialog) initialize(document)
A new instance of OutlineViewDialog
84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'plugins/declarations/lib/declarations/commands.rb', line 84 def initialize(document) @document = document file = Declarations::File.new(@document.path) file.(@document.path) @tags = file. @all = [] @tags.each do |name, path, match| kind = Declarations.match_kind(path, match) @all << {:name => name, :icon => Declarations.icon_for_kind(kind), :path => path, :match => match} end super() end |
Instance Attribute Details
- (Object) document
Returns the value of attribute document
81 82 83 |
# File 'plugins/declarations/lib/declarations/commands.rb', line 81 def document @document end |
- (Object) last_list
Returns the value of attribute last_list
82 83 84 |
# File 'plugins/declarations/lib/declarations/commands.rb', line 82 def last_list @last_list end |
Instance Method Details
- (Object) selected(item, ix)
101 102 103 104 105 106 |
# File 'plugins/declarations/lib/declarations/commands.rb', line 101 def selected(item, ix) close Redcar.app..save(@document) if @document DocumentSearch::FindNextRegex.new(Regexp.new(Regexp.quote(item[:match])), true).run_in_focussed_tab_edit_view Redcar.app..save(@document) if @document end |
- (Object) update_list(filter)
97 98 99 |
# File 'plugins/declarations/lib/declarations/commands.rb', line 97 def update_list(filter) filter_and_rank_by(@all, filter) {|h| h[:name]} end |