com.carrotgarden.maven.scalor.eclipse.Comment.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalor-maven-plugin_2.12 Show documentation
Show all versions of scalor-maven-plugin_2.12 Show documentation
Build integrator for Java, Scala, Scala.macro, Scala.js, Scala.native, Eclipse and Maven
package com.carrotgarden.maven.scalor.eclipse
import org.eclipse.core.runtime.IProgressMonitor
import com.carrotgarden.maven.scalor.util.Optioner.convert_Option_Value
/**
* Provide eclipse .project file comment.
*/
trait Comment {
self : Maven =>
import org.eclipse.core.resources.IResource._
/**
*/
def ensureProjectComment(
context : Config.SetupContext,
monitor : IProgressMonitor
) : Unit = {
import context._
import config._
if ( eclipseProjectCommentApply ) {
logger.info( "Applying Eclipse .project comment." )
val project = request.getProject
val description = project.getDescription
description.setComment( eclipseProjectCommentString )
project.setDescription( description, FORCE, monitor )
}
}
}