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



543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
# File 'lib/buildr/ide/idea.rb', line 543

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)


567
568
569
# File 'lib/buildr/ide/idea.rb', line 567

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

#iprObject



531
532
533
534
535
536
537
# File 'lib/buildr/ide/idea.rb', line 531

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

#ipr?Boolean

Returns:

  • (Boolean)


539
540
541
# File 'lib/buildr/ide/idea.rb', line 539

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

#no_imlObject



563
564
565
# File 'lib/buildr/ide/idea.rb', line 563

def no_iml
  @has_iml = false
end

#no_iprObject



559
560
561
# File 'lib/buildr/ide/idea.rb', line 559

def no_ipr
  @no_ipr = true
end