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



1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
# File 'lib/buildr/ide/idea.rb', line 1492

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)


1516
1517
1518
# File 'lib/buildr/ide/idea.rb', line 1516

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

#iprObject



1480
1481
1482
1483
1484
1485
1486
# File 'lib/buildr/ide/idea.rb', line 1480

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

#ipr?Boolean

Returns:

  • (Boolean)


1488
1489
1490
# File 'lib/buildr/ide/idea.rb', line 1488

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

#no_imlObject



1512
1513
1514
# File 'lib/buildr/ide/idea.rb', line 1512

def no_iml
  @has_iml = false
end

#no_iprObject



1508
1509
1510
# File 'lib/buildr/ide/idea.rb', line 1508

def no_ipr
  @no_ipr = true
end