com.carrotgarden.maven.scalor.eclipse.Tracker.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 scala.collection.mutable
import org.eclipse.core.resources.IProject
import org.scalaide.core.internal.project.ScalaProject
/**
* Remember managed projects.
*/
trait Tracker {
import Tracker._
private val projectMemento = new mutable.HashMap[ IProject, Context ]
def projectRegister( project : IProject, config : ParamsConfig ) = projectMemento.synchronized {
projectMemento += ( project -> Context( config, ScalaIDE.pluginProject( project ) ) )
}
def projectUnregister( project : IProject ) = projectMemento.synchronized {
projectMemento -= project
}
}
object Tracker {
case class Context(
config : ParamsConfig,
project : ScalaProject
)
}