Class: Redcar::Textmate::CreateNewSnippetGroup
Constant Summary
Constants included from Observable
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary (collapse)
- - (Object) execute
-
- (CreateNewSnippetGroup) initialize(tree, node)
constructor
A new instance of CreateNewSnippetGroup.
Methods inherited from Command
active_changed, #environment, inherited, #inspect, norecord, record?, #run
Methods included from Sensitive
#active?, #sensitivities, #sensitivity_names, #sensitize
Methods included from Observable
#add_listener, #notify_listeners, #remove_listener
Constructor Details
- (CreateNewSnippetGroup) initialize(tree, node)
A new instance of CreateNewSnippetGroup
79 80 81 |
# File 'plugins/textmate/lib/textmate/commands.rb', line 79 def initialize tree,node @tree, @node = tree, node end |
Instance Method Details
- (Object) execute
83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'plugins/textmate/lib/textmate/commands.rb', line 83 def execute target_uuid = @node.is_a?(BundleNode) ? nil : @node.uuid group_uuid = BundleEditor. "New Menu", @node.bundle, target_uuid bundle_node = @tree.tree_mirror.bundle_node_by_name(@node.bundle.name) if new_group = bundle_node.child_by_uuid(group_uuid) @node = bundle_node.child_by_uuid target_uuid @tree.(@node) @tree.edit(new_group) @node = bundle_node.child_by_uuid target_uuid @tree.(@node) @tree.select(new_group) end end |