Class: Eclipse::Workspace
- Inherits:
-
Object
- Object
- Eclipse::Workspace
- Defined in:
- lib/eclipse/plugin.rb
Instance Attribute Summary collapse
-
#perspectives ⇒ Object
readonly
Returns the value of attribute perspectives.
-
#preferencePage_categories ⇒ Object
readonly
Returns the value of attribute preferencePage_categories.
-
#preferencePages ⇒ Object
readonly
Returns the value of attribute preferencePages.
-
#view_categories ⇒ Object
readonly
Returns the value of attribute view_categories.
-
#views ⇒ Object
readonly
Returns the value of attribute views.
-
#workspace_dir ⇒ Object
readonly
Returns the value of attribute workspace_dir.
Instance Method Summary collapse
-
#initialize(workspace_dir) ⇒ Workspace
constructor
A new instance of Workspace.
- #parse_sub_dirs ⇒ Object
- #parsePluginDir(plugins_dir = File.join(@workspace_dir, "plugins")) ⇒ Object
- #show ⇒ Object
Constructor Details
#initialize(workspace_dir) ⇒ Workspace
10 11 12 13 14 15 16 17 |
# File 'lib/eclipse/plugin.rb', line 10 def initialize(workspace_dir) @workspace_dir = workspace_dir @views = Hash.new @view_categories = Hash.new @preferencePages = Hash.new @perspectives = Hash.new @preferencePage_categories = Hash.new end |
Instance Attribute Details
#perspectives ⇒ Object (readonly)
Returns the value of attribute perspectives.
9 10 11 |
# File 'lib/eclipse/plugin.rb', line 9 def perspectives @perspectives end |
#preferencePage_categories ⇒ Object (readonly)
Returns the value of attribute preferencePage_categories.
9 10 11 |
# File 'lib/eclipse/plugin.rb', line 9 def preferencePage_categories @preferencePage_categories end |
#preferencePages ⇒ Object (readonly)
Returns the value of attribute preferencePages.
9 10 11 |
# File 'lib/eclipse/plugin.rb', line 9 def preferencePages @preferencePages end |
#view_categories ⇒ Object (readonly)
Returns the value of attribute view_categories.
9 10 11 |
# File 'lib/eclipse/plugin.rb', line 9 def view_categories @view_categories end |
#views ⇒ Object (readonly)
Returns the value of attribute views.
9 10 11 |
# File 'lib/eclipse/plugin.rb', line 9 def views @views end |
#workspace_dir ⇒ Object (readonly)
Returns the value of attribute workspace_dir.
9 10 11 |
# File 'lib/eclipse/plugin.rb', line 9 def workspace_dir @workspace_dir end |
Instance Method Details
#parse_sub_dirs ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/eclipse/plugin.rb', line 24 def parse_sub_dirs Dir.glob("#{@workspace_dir}/*").each{ |item| next unless File.directory?(item) add_info(Plugin::Info.new(item)) } show if $VERBOSE end |
#parsePluginDir(plugins_dir = File.join(@workspace_dir, "plugins")) ⇒ Object
19 20 21 22 |
# File 'lib/eclipse/plugin.rb', line 19 def parsePluginDir(plugins_dir = File.join(@workspace_dir, "plugins")) Dir.glob("#{plugins_dir}/*.jar").each{ |jarname| add_info(Plugin::Info.new(jarname)) } show if $VERBOSE end |
#show ⇒ Object
32 33 34 |
# File 'lib/eclipse/plugin.rb', line 32 def show puts "Workspace #{@workspace_dir} with #{@views.size}/#{@view_categories.size} views #{@preferencePages.size}/#{@preferencePage_categories.size} preferencePages #{@perspectives.size} perspectives" end |