All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.carrotgarden.maven.scalor.eclipse.Tracker.scala Maven / Gradle / Ivy

Go to download

Build integrator for Java, Scala, Scala.macro, Scala.js, Scala.native, Eclipse and Maven

There is a newer version: 1.5.0.20190502185130
Show newest version
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
  )

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy