Module: Buildr::IntellijIdea::ProjectExtension

Includes:
Extension
Included in:
Project
Defined in:
lib/buildr/intellij_idea/project_extension.rb

Instance Method Summary collapse

Instance Method Details

#imlObject



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/buildr/intellij_idea/project_extension.rb', line 75

def iml
  if iml?
    unless @iml
      inheritable_iml_source = self.parent
      while inheritable_iml_source && !inheritable_iml_source.iml?
        inheritable_iml_source = inheritable_iml_source.parent;
      end
      @iml = inheritable_iml_source ? inheritable_iml_source.iml.clone : IdeaModule.new
      @iml.buildr_project = self
    end
    return @iml
  else
    raise "IML generation is disabled for #{self.name}"
  end
end

#iml?Boolean

Returns:

  • (Boolean)


99
100
101
# File 'lib/buildr/intellij_idea/project_extension.rb', line 99

def iml?
  @has_iml = @has_iml.nil? ? true : @has_iml
end

#iprObject



63
64
65
66
67
68
69
# File 'lib/buildr/intellij_idea/project_extension.rb', line 63

def ipr
  if ipr?
    @ipr ||= IdeaProject.new(self)
  else
    raise "Only the root project has an IPR"
  end
end

#ipr?Boolean

Returns:

  • (Boolean)


71
72
73
# File 'lib/buildr/intellij_idea/project_extension.rb', line 71

def ipr?
  !@no_ipr && self.parent.nil?
end

#no_imlObject



95
96
97
# File 'lib/buildr/intellij_idea/project_extension.rb', line 95

def no_iml
  @has_iml = false
end

#no_iprObject



91
92
93
# File 'lib/buildr/intellij_idea/project_extension.rb', line 91

def no_ipr
  @no_ipr = true
end