Class: Redcar::EditView::ChangeLanguageCommand::ChangeLanguageDialog
- Inherits:
-
FilterListDialog
- Object
- FilterListDialog
- Redcar::EditView::ChangeLanguageCommand::ChangeLanguageDialog
- Defined in:
- plugins/edit_view/lib/edit_view/commands/change_language_command.rb
Constant Summary
Constant Summary
Constants included from Observable
Instance Attribute Summary
Attributes included from Model
Instance Method Summary (collapse)
-
- (ChangeLanguageDialog) initialize(tab)
constructor
A new instance of ChangeLanguageDialog.
- - (Object) selected(name, ix)
- - (Object) update_list(filter)
Methods inherited from FilterListDialog
#close, #filter_and_rank_by, #moved_to, #open, #step?, #step_time
Methods included from Observable
#add_listener, #notify_listeners, #remove_listener
Methods included from ReentryHelpers
Constructor Details
- (ChangeLanguageDialog) initialize(tab)
A new instance of ChangeLanguageDialog
7 8 9 10 |
# File 'plugins/edit_view/lib/edit_view/commands/change_language_command.rb', line 7 def initialize(tab) @tab = tab super() end |
Instance Method Details
- (Object) selected(name, ix)
19 20 21 22 |
# File 'plugins/edit_view/lib/edit_view/commands/change_language_command.rb', line 19 def selected(name, ix) @tab.edit_view.grammar = name close end |
- (Object) update_list(filter)
12 13 14 15 16 17 |
# File 'plugins/edit_view/lib/edit_view/commands/change_language_command.rb', line 12 def update_list(filter) bundles = JavaMateView::Bundle.bundles.to_a grammars = bundles.map {|b| b.grammars.to_a}.flatten names = grammars.map {|g| g.name}.sort_by {|name| name.downcase } filter_and_rank_by(names, filter) end |