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



1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
# File 'lib/buildr/ide/idea.rb', line 1758

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)


1782
1783
1784
# File 'lib/buildr/ide/idea.rb', line 1782

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

#iprObject



1746
1747
1748
1749
1750
1751
1752
# File 'lib/buildr/ide/idea.rb', line 1746

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

#ipr?Boolean

Returns:

  • (Boolean)


1754
1755
1756
# File 'lib/buildr/ide/idea.rb', line 1754

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

#no_imlObject



1778
1779
1780
# File 'lib/buildr/ide/idea.rb', line 1778

def no_iml
  @has_iml = false
end

#no_iprObject



1774
1775
1776
# File 'lib/buildr/ide/idea.rb', line 1774

def no_ipr
  @no_ipr = true
end