Module: Buildr::IntellijIdea::ProjectExtension

Includes:
Extension
Included in:
Project
Defined in:
lib/buildr/ide/idea.rb

Instance Method Summary collapse

Methods included from Extension

included

Instance Method Details

#imlObject



1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
# File 'lib/buildr/ide/idea.rb', line 1727

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)


1751
1752
1753
# File 'lib/buildr/ide/idea.rb', line 1751

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

#iprObject



1715
1716
1717
1718
1719
1720
1721
# File 'lib/buildr/ide/idea.rb', line 1715

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

#ipr?Boolean

Returns:

  • (Boolean)


1723
1724
1725
# File 'lib/buildr/ide/idea.rb', line 1723

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

#no_imlObject



1747
1748
1749
# File 'lib/buildr/ide/idea.rb', line 1747

def no_iml
  @has_iml = false
end

#no_iprObject



1743
1744
1745
# File 'lib/buildr/ide/idea.rb', line 1743

def no_ipr
  @no_ipr = true
end