Activator.scala 2.28 KB
Newer Older
1
2
package org.openmole.core.workflow

3
import org.openmole.core.pluginmanager.PluginInfo
4
import org.openmole.core.preference.ConfigurationInfo
5
6
7
import org.osgi.framework.{ BundleActivator, BundleContext }

class Activator extends BundleActivator {
8

9
  override def stop(context: BundleContext): Unit = {
10
11
    ConfigurationInfo.unregister(this)
    PluginInfo.unregister(this)
12
13
  }
  override def start(context: BundleContext): Unit = {
14
15
16
17
18

    val keyWords = {
      import org.openmole.core.pluginmanager.KeyWord._
      import org.openmole.core.context._
      import org.openmole.core.workflow.mole._
19
      import org.openmole.core.workflow.transition.{ TransitionSlot }
20
21
22
23
      import org.openmole.core.workflow.execution.{ LocalEnvironment }
      import org.openmole.core.workflow.task.{ EmptyTask, ExplorationTask, ClosureTask, ToArrayTask, MoleTask, FromContextTask }

      Vector(
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
        WordKeyWord(classOf[Val[_]]),
        WordKeyWord("Capsule"),
        WordKeyWord("Slot"),
        WordKeyWord("Capsule"),
        WordKeyWord("Strain"),
        WordKeyWord("in"),
        WordKeyWord("is"),
        WordKeyWord("on"),
        WordKeyWord("by"),
        WordKeyWord("set"),
        WordKeyWord("+="),
        WordKeyWord(":="),
        WordKeyWord("/"),
        WordKeyWord("inputs"),
        WordKeyWord("outputs"),
        WordKeyWord("hook"),
Mathieu's avatar
Mathieu committed
40
        WordKeyWord("display"),
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
        WordKeyWord("workDirectory"),
        WordKeyWord("plugins"),
        WordKeyWord("pluginsOf"),
        TransitionKeyWord("--"),
        TransitionKeyWord("-<"),
        TransitionKeyWord(">-"),
        TransitionKeyWord("-<-"),
        TransitionKeyWord(">|"),
        TransitionKeyWord("oo"),
        EnvironmentKeyWord(classOf[LocalEnvironment]),
        TaskKeyWord(objectName(EmptyTask)),
        TaskKeyWord(objectName(ExplorationTask)),
        TaskKeyWord(objectName(ClosureTask)),
        TaskKeyWord(objectName(ToArrayTask)),
        TaskKeyWord(objectName(MoleTask)),
        TaskKeyWord(objectName(FromContextTask)),
        HookKeyWord(objectName(FromContextHook))
58
59
60
61
62
      )
    }

    ConfigurationInfo.register(this, ConfigurationInfo.list(org.openmole.core.workflow.execution.Environment) ++ ConfigurationInfo.list(org.openmole.core.workflow.execution.LocalEnvironment))
    PluginInfo.register(this, keyWords = keyWords)
63
  }
64

65
}