# File lib/buildr/ide/eclipse.rb, line 25 def initialize(project) @project = project @options = Options.new(project) end
A builder is an Eclipse background job that parses the source code to produce built artifacts.
# File lib/buildr/ide/eclipse.rb, line 143 def builders(*values) if values.size > 0 @builders ||= [] @builders += values.flatten else @builders || (@project.parent ? @project.parent.eclipse.builders : []) end end
# File lib/buildr/ide/eclipse.rb, line 132 def builders=(var) @builders = arrayfy(var) end
A classpath container is an Eclipse pre-determined ensemble of dependencies made available to the project classpath.
# File lib/buildr/ide/eclipse.rb, line 99 def classpath_containers(*values) if values.size > 0 @classpath_containers ||= [] @classpath_containers += values.flatten else @classpath_containers || (@project.parent ? @project.parent.eclipse.classpath_containers : []) end end
# File lib/buildr/ide/eclipse.rb, line 87 def classpath_containers=(var) @classpath_containers = arrayfy(var) end
# File lib/buildr/ide/eclipse.rb, line 41 def classpath_variables(*values) fail "eclipse.classpath_variables expects a single hash argument" if values.size > 1 if values.size == 1 fail "eclipse.classpath_variables expects a Hash argument" unless values[0].is_a? Hash # convert keys to strings values = values[0].inject({}) { |h, (k,v)| h[k.to_s] = @project.path_to(v); h } @variables = values.merge(@variables || {}) end @variables || (@project.parent ? @project.parent.eclipse.classpath_variables : default_classpath_variables) end
# File lib/buildr/ide/eclipse.rb, line 52 def default_classpath_variables vars = {} vars[:SCALA_HOME] = ENV['SCALA_HOME'] if ENV['SCALA_HOME'] vars[:JAVA_HOME] = ENV['JAVA_HOME'] if ENV['JAVA_HOME'] vars end
# File lib/buildr/ide/eclipse.rb, line 111 def exclude_libs(*values) if values.size > 0 @exclude_libs ||= [] @exclude_libs += values.flatten else @exclude_libs || (@project.parent ? @project.parent.eclipse.exclude_libs : []) end end
# File lib/buildr/ide/eclipse.rb, line 124 def exclude_libs=(libs) @exclude_libs = arrayfy(libs) end
# File lib/buildr/ide/eclipse.rb, line 30 def name return @name if @name return @project.id.split('-').last if @options.short_names @project.id end
An Eclipse project nature is used internally by Eclipse to determine the aspects of a project.
# File lib/buildr/ide/eclipse.rb, line 74 def natures(*values) if values.size > 0 @natures ||= [] @natures += values.flatten else @natures || (@project.parent ? @project.parent.eclipse.natures : []) end end
# File lib/buildr/ide/eclipse.rb, line 63 def natures=(var) @natures = arrayfy(var) end