Commit 1eb23196 authored by Romain Reuillon's avatar Romain Reuillon
Browse files

Merge branch 'master' into 9-dev

parents 858c3a97 89842a49
......@@ -154,7 +154,9 @@ def allCore = Seq(
csv)
lazy val keyword = OsgiProject(coreDir, "org.openmole.core.keyword", imports = Seq("*")) settings (coreSettings: _*)
lazy val keyword = OsgiProject(coreDir, "org.openmole.core.keyword", imports = Seq("*")) settings (coreSettings: _*) settings (
defaultActivator
) dependsOn(pluginManager, preference)
lazy val context = OsgiProject(coreDir, "org.openmole.core.context", imports = Seq("*")) settings(
libraryDependencies ++= Seq(Libraries.cats, Libraries.sourceCode), defaultActivator
......
package org.openmole.core.keyword
import org.openmole.core.pluginmanager._
import org.openmole.core.pluginmanager.KeyWord._
import org.openmole.core.preference.ConfigurationInfo
import org.osgi.framework.{ BundleActivator, BundleContext }
class Activator extends BundleActivator {
override def stop(context: BundleContext): Unit = {
ConfigurationInfo.unregister(this)
PluginInfo.unregister(this)
}
override def start(context: BundleContext): Unit = {
val keyWords = {
Vector(
WordKeyWord("under"),
WordKeyWord("in"),
WordKeyWord(":=")
)
}
PluginInfo.register(this, Vector(this.getClass.getPackage), keyWords = keyWords)
ConfigurationInfo.register(
this,
ConfigurationInfo.list()
)
}
}
......@@ -37,6 +37,7 @@ class Activator extends BundleActivator {
WordKeyWord("inputs"),
WordKeyWord("outputs"),
WordKeyWord("hook"),
WordKeyWord("display"),
WordKeyWord("workDirectory"),
WordKeyWord("plugins"),
WordKeyWord("pluginsOf"),
......
......@@ -27,7 +27,7 @@ package composition {
import java.io.PrintStream
import org.openmole.core.context.{ Context, Val }
import org.openmole.core.expansion.Condition
import org.openmole.core.expansion.{ Condition, FromContext }
import org.openmole.core.outputmanager.OutputManager
import org.openmole.core.workflow.builder.DefinitionScope
import org.openmole.core.workflow.execution.{ EnvironmentProvider, LocalEnvironmentProvider }
......@@ -138,7 +138,11 @@ package composition {
def on(environment: EnvironmentProvider) = copy(environment = Some(environment))
def by(strategy: Grouping) = copy(grouping = Some(strategy))
def hook(hooks: Hook*) = copy(hooks = this.hooks ++ hooks)
def hook(output: WritableOutput, values: Val[_]*)(implicit definitionScope: DefinitionScope): TaskNode = hook(CSVHook(output = output, values: _*))
def hook(
output: WritableOutput,
values: Seq[Val[_]] = Vector.empty,
header: OptionalArgument[FromContext[String]] = None,
arrayOnRow: Boolean = false)(implicit definitionScope: DefinitionScope): TaskNode = hook(CSVHook(output, values = values, header = header, arrayOnRow = arrayOnRow))
def source(sources: Source*) = copy(sources = this.sources ++ sources)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment