plugins/textmate/lib/textmate.rb in redcar-0.11 vs plugins/textmate/lib/textmate.rb in redcar-0.12
- old
+ new
@@ -5,15 +5,18 @@
require 'textmate/preference'
require 'textmate/snippet'
require 'textmate/tree_mirror'
require 'textmate/commands'
+gem "redcar-bundles"
+require 'redcar-bundles'
+
module Redcar
module Textmate
def self.all_bundle_paths
- @all_bundle_paths = Dir[File.join(Redcar.root, "plugins", "textmate", "vendor", "redcar-bundles", "Bundles", "*")] +
- Dir[File.join(Redcar.user_dir, "Bundles", "*")]
+ @all_bundle_paths = Dir[File.join(RedcarBundles.dir, "Bundles", "*")]
+ @all_bundle_paths += Dir[File.join(Redcar.user_dir, "Bundles", "*")]
Redcar.plugin_manager.loaded_plugins.each do |plugin|
@all_bundle_paths += Dir[File.join(File.dirname(plugin.definition_file), "Bundles", "*")]
end
@all_bundle_paths
end
@@ -41,10 +44,10 @@
[osx,lin]
end
def self.toolbars
Redcar::ToolBar::Builder.build do
- item "Snippet Browser", :command => Textmate::ShowSnippetTree, :icon => File.join(Redcar::ICONS_DIRECTORY, "document-tree.png"), :barname => :help
+ item "Snippet Browser", :command => Textmate::ShowSnippetTree, :icon => File.join(Redcar.icons_directory, "document-tree.png"), :barname => :help
end
end
def self.bundle_context_menus(node)
Menu::Builder.build do