Class: Eclipse::Workspace

Inherits:
Object
  • Object
show all
Defined in:
lib/eclipse/plugin.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#perspectivesObject (readonly)

Returns the value of attribute perspectives.



9
10
11
# File 'lib/eclipse/plugin.rb', line 9

def perspectives
  @perspectives
end

#preferencePage_categoriesObject (readonly)

Returns the value of attribute preferencePage_categories.



9
10
11
# File 'lib/eclipse/plugin.rb', line 9

def preferencePage_categories
  @preferencePage_categories
end

#preferencePagesObject (readonly)

Returns the value of attribute preferencePages.



9
10
11
# File 'lib/eclipse/plugin.rb', line 9

def preferencePages
  @preferencePages
end

#view_categoriesObject (readonly)

Returns the value of attribute view_categories.



9
10
11
# File 'lib/eclipse/plugin.rb', line 9

def view_categories
  @view_categories
end

#viewsObject (readonly)

Returns the value of attribute views.



9
10
11
# File 'lib/eclipse/plugin.rb', line 9

def views
  @views
end

#workspace_dirObject (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_dirsObject



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

#showObject



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