Parcourir la source

Added basic support for externalized type system.

Alexander Nyßen il y a 13 ans
Parent
commit
cb520d8b46
46 fichiers modifiés avec 9047 ajouts et 9943 suppressions
  1. 262 248
      features/org.yakindu.sct-feature/feature.xml
  2. 4 4
      plugins/org.yakindu.sct.generator.c/.settings/org.eclipse.core.resources.prefs
  3. 1 1
      plugins/org.yakindu.sct.generator.cpp/.settings/org.eclipse.core.resources.prefs
  4. 5 5
      plugins/org.yakindu.sct.generator.genmodel.ui/.settings/org.eclipse.core.resources.prefs
  5. 12 12
      plugins/org.yakindu.sct.generator.genmodel/.settings/org.eclipse.jdt.core.prefs
  6. 1 0
      plugins/org.yakindu.sct.generator.genmodel/src/org/yakindu/sct/generator/genmodel/SGen.xtext
  7. 2 1
      plugins/org.yakindu.sct.model.sexec.interpreter/META-INF/MANIFEST.MF
  8. 36 14
      plugins/org.yakindu.sct.model.sexec.interpreter/src/org/yakindu/sct/model/sexec/interpreter/impl/ExecutionFlowInterpreter.xtend
  9. 8 8
      plugins/org.yakindu.sct.model.sgen/.settings/org.eclipse.jdt.core.prefs
  10. 1 1
      plugins/org.yakindu.sct.model.sgraph.test/.settings/org.eclipse.jdt.core.prefs
  11. 1 1
      plugins/org.yakindu.sct.model.sgraph.ui/.settings/org.eclipse.jdt.core.prefs
  12. 8 8
      plugins/org.yakindu.sct.model.stext.resource/.settings/org.eclipse.jdt.core.prefs
  13. 2 1
      plugins/org.yakindu.sct.model.stext.ui/META-INF/MANIFEST.MF
  14. 4 7
      plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/AbstractSTextProposalProvider.java
  15. 0 1
      plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/STextParser.java
  16. 30 75
      plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/internal/InternalSText.g
  17. 37 47
      plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/internal/InternalSText.tokens
  18. 424 602
      plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/internal/InternalSTextLexer.java
  19. 5622 5811
      plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/internal/InternalSTextParser.java
  20. 6 0
      plugins/org.yakindu.sct.model.stext.ui/src/org/yakindu/sct/model/stext/ui/STextUiModule.java
  21. 2 1
      plugins/org.yakindu.sct.model.stext/META-INF/MANIFEST.MF
  22. 2 1
      plugins/org.yakindu.sct.model.stext/build.properties
  23. 10 0
      plugins/org.yakindu.sct.model.stext/libraries/Primitives.types
  24. 6 2
      plugins/org.yakindu.sct.model.stext/plugin.xml
  25. 5 12
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore
  26. 5 12
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.genmodel
  27. 73 72
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.xmi
  28. 87 70
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parseTreeConstruction/STextParsetreeConstructor.java
  29. 35 87
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g
  30. 0 10
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.tokens
  31. 286 466
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSTextLexer.java
  32. 1710 1905
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSTextParser.java
  33. 120 160
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/services/STextGrammarAccess.java
  34. 7 8
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/EventDefinition.java
  35. 12 15
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/Operation.java
  36. 24 54
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/StextPackage.java
  37. 7 8
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/VariableDefinition.java
  38. 29 19
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/EventDefinitionImpl.java
  39. 33 39
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/OperationImpl.java
  40. 0 26
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/StextFactoryImpl.java
  41. 20 42
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/StextPackageImpl.java
  42. 29 19
      plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/VariableDefinitionImpl.java
  43. 1 0
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/GenerateExpressions.mwe2
  44. 30 29
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/SText.xtext
  45. 44 35
      plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/validation/StaticTypeAnalyzer.xtend
  46. 4 4
      plugins/org.yakindu.sct.simulation.core/plugin.xml

+ 262 - 248
features/org.yakindu.sct-feature/feature.xml

@@ -1,248 +1,262 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
-      id="org.yakindu.sct"
-      label="Yakindu Statechart Tools (SCT) 2"
-      version="1.0.0.qualifier"
-      provider-name="YAKINDU">
-
-   <description url="">
-      %description
-   </description>
-
-   <copyright url="http://www.example.com/copyright">
-      %copyright
-   </copyright>
-
-   <license url="%licenseURL">
-      %license
-   </license>
-
-   <includes
-         id="de.itemis.gmf.runtime.commons"
-         version="0.0.0"/>
-
-   <requires>
-      <import plugin="org.eclipse.core.runtime"/>
-      <import plugin="org.eclipse.emf.ecore"/>
-      <import plugin="org.eclipse.emf.ecore.xmi"/>
-      <import plugin="org.eclipse.emf.edit"/>
-      <import plugin="org.eclipse.ui"/>
-      <import plugin="de.itemis.xtext.utils.gmf"/>
-      <import plugin="org.eclipse.gmf.runtime.emf.core"/>
-      <import plugin="org.eclipse.xtext.ui"/>
-      <import plugin="org.apache.log4j"/>
-      <import plugin="org.antlr.runtime"/>
-      <import plugin="org.eclipse.emf.common"/>
-      <import plugin="org.eclipse.xtext"/>
-      <import plugin="org.eclipse.xtext.util"/>
-      <import plugin="org.eclipse.xtext.common.types"/>
-      <import plugin="org.apache.commons.logging"/>
-      <import plugin="org.eclipse.xtext.builder"/>
-      <import plugin="org.eclipse.xtext.xbase.lib"/>
-      <import plugin="org.eclipse.xtext.xtend2.lib"/>
-      <import plugin="org.eclipse.ui.editors"/>
-      <import plugin="org.eclipse.ui.ide"/>
-      <import plugin="org.eclipse.xtext.ui.shared"/>
-      <import plugin="org.eclipse.xtext.common.types.ui"/>
-      <import plugin="org.eclipse.core.resources"/>
-      <import plugin="org.eclipse.jface"/>
-      <import plugin="org.eclipse.ui.views"/>
-      <import plugin="org.eclipse.ui.navigator"/>
-      <import plugin="org.eclipse.ui.navigator.resources"/>
-      <import plugin="org.eclipse.emf.edit.ui"/>
-      <import plugin="org.eclipse.gmf.runtime.emf.commands.core"/>
-      <import plugin="org.eclipse.gmf.runtime.emf.ui.properties"/>
-      <import plugin="org.eclipse.gmf.runtime.diagram.ui"/>
-      <import plugin="org.eclipse.gmf.runtime.diagram.ui.printing"/>
-      <import plugin="org.eclipse.gmf.runtime.diagram.ui.printing.render"/>
-      <import plugin="org.eclipse.gmf.runtime.diagram.ui.properties"/>
-      <import plugin="org.eclipse.gmf.runtime.diagram.ui.providers"/>
-      <import plugin="org.eclipse.gmf.runtime.diagram.ui.providers.ide"/>
-      <import plugin="org.eclipse.gmf.runtime.diagram.ui.render"/>
-      <import plugin="org.eclipse.gmf.runtime.diagram.ui.resources.editor"/>
-      <import plugin="org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide"/>
-      <import plugin="org.eclipse.draw2d"/>
-      <import plugin="org.eclipse.gmf.runtime.draw2d.ui"/>
-      <import plugin="com.google.collect"/>
-      <import plugin="com.google.inject"/>
-      <import plugin="de.itemis.xtext.utils.jface" version="1.0.0" match="compatible"/>
-      <import plugin="de.itemis.gmf.runtime.commons" version="1.0.0" match="greaterOrEqual"/>
-      <import plugin="org.eclipse.gmf.runtime.notation.providers" version="1.3.0" match="greaterOrEqual"/>
-      <import plugin="org.eclipse.help" version="3.5.100" match="greaterOrEqual"/>
-      <import plugin="org.eclipse.debug.ui"/>
-      <import plugin="org.eclipse.core.expressions"/>
-      <import plugin="org.eclipse.debug.core"/>
-      <import plugin="org.eclipse.jdt.debug"/>
-      <import plugin="org.eclipse.jdt.launching"/>
-      <import plugin="org.eclipse.jdt.debug.ui"/>
-      <import plugin="org.eclipse.xpand"/>
-      <import plugin="org.eclipse.xtend"/>
-      <import plugin="org.eclipse.emf"/>
-      <import plugin="org.eclipse.xtend.typesystem.emf"/>
-      <import plugin="org.eclipse.jdt.core"/>
-      <import plugin="com.ibm.icu"/>
-      <import plugin="org.eclipse.emf.mwe.utils"/>
-      <import plugin="org.eclipse.jface.text"/>
-   </requires>
-
-   <plugin
-         id="org.yakindu.sct.model.sgraph"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.model.sgraph.edit"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.model.stext"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.model.stext.ui"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.ui.editor"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.ui.integration.stext"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.simulation.core"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.simulation.ui"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.doc.user"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"/>
-
-   <plugin
-         id="org.yakindu.sct.ui"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.model.sexec"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.model.sexec.edit"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.generator.genmodel"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.generator.genmodel.ui"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.generator.cpp"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.model.stext.resource"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.model.sgen"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.generator.core"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.generator.c"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.generator.java"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.ui.navigator"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.model.sgraph.ui"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.yakindu.sct.model.sexec.interpreter"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-</feature>
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.yakindu.sct"
+      label="Yakindu Statechart Tools (SCT) 2"
+      version="1.0.0.qualifier"
+      provider-name="YAKINDU">
+
+   <description url="">
+      %description
+   </description>
+
+   <copyright url="http://www.example.com/copyright">
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <includes
+         id="de.itemis.gmf.runtime.commons"
+         version="0.0.0"/>
+
+   <requires>
+      <import plugin="org.eclipse.core.runtime"/>
+      <import plugin="org.eclipse.emf.ecore"/>
+      <import plugin="org.eclipse.emf.ecore.xmi"/>
+      <import plugin="org.eclipse.emf.edit"/>
+      <import plugin="org.eclipse.ui"/>
+      <import plugin="de.itemis.xtext.utils.gmf"/>
+      <import plugin="org.eclipse.gmf.runtime.emf.core"/>
+      <import plugin="org.eclipse.xtext.ui"/>
+      <import plugin="org.apache.log4j"/>
+      <import plugin="org.antlr.runtime"/>
+      <import plugin="org.eclipse.emf.common"/>
+      <import plugin="org.eclipse.xtext"/>
+      <import plugin="org.eclipse.xtext.util"/>
+      <import plugin="org.eclipse.xtext.common.types"/>
+      <import plugin="org.apache.commons.logging"/>
+      <import plugin="org.eclipse.xtext.builder"/>
+      <import plugin="org.eclipse.xtext.xbase.lib"/>
+      <import plugin="org.eclipse.xtext.xtend2.lib"/>
+      <import plugin="org.eclipse.ui.editors"/>
+      <import plugin="org.eclipse.ui.ide"/>
+      <import plugin="org.eclipse.xtext.ui.shared"/>
+      <import plugin="org.eclipse.xtext.common.types.ui"/>
+      <import plugin="org.eclipse.core.resources"/>
+      <import plugin="org.eclipse.jface"/>
+      <import plugin="org.eclipse.ui.views"/>
+      <import plugin="org.eclipse.ui.navigator"/>
+      <import plugin="org.eclipse.ui.navigator.resources"/>
+      <import plugin="org.eclipse.emf.edit.ui"/>
+      <import plugin="org.eclipse.gmf.runtime.emf.commands.core"/>
+      <import plugin="org.eclipse.gmf.runtime.emf.ui.properties"/>
+      <import plugin="org.eclipse.gmf.runtime.diagram.ui"/>
+      <import plugin="org.eclipse.gmf.runtime.diagram.ui.printing"/>
+      <import plugin="org.eclipse.gmf.runtime.diagram.ui.printing.render"/>
+      <import plugin="org.eclipse.gmf.runtime.diagram.ui.properties"/>
+      <import plugin="org.eclipse.gmf.runtime.diagram.ui.providers"/>
+      <import plugin="org.eclipse.gmf.runtime.diagram.ui.providers.ide"/>
+      <import plugin="org.eclipse.gmf.runtime.diagram.ui.render"/>
+      <import plugin="org.eclipse.gmf.runtime.diagram.ui.resources.editor"/>
+      <import plugin="org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide"/>
+      <import plugin="org.eclipse.draw2d"/>
+      <import plugin="org.eclipse.gmf.runtime.draw2d.ui"/>
+      <import plugin="com.google.collect"/>
+      <import plugin="com.google.inject"/>
+      <import plugin="de.itemis.xtext.utils.jface" version="1.0.0" match="compatible"/>
+      <import plugin="de.itemis.gmf.runtime.commons" version="1.0.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.gmf.runtime.notation.providers" version="1.3.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.help" version="3.5.100" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.debug.ui"/>
+      <import plugin="org.eclipse.core.expressions"/>
+      <import plugin="org.eclipse.debug.core"/>
+      <import plugin="org.eclipse.jdt.debug"/>
+      <import plugin="org.eclipse.jdt.launching"/>
+      <import plugin="org.eclipse.jdt.debug.ui"/>
+      <import plugin="org.eclipse.xpand"/>
+      <import plugin="org.eclipse.xtend"/>
+      <import plugin="org.eclipse.emf"/>
+      <import plugin="org.eclipse.xtend.typesystem.emf"/>
+      <import plugin="org.eclipse.jdt.core"/>
+      <import plugin="com.ibm.icu"/>
+      <import plugin="org.eclipse.emf.mwe.utils"/>
+      <import plugin="org.eclipse.jface.text"/>
+   </requires>
+   
+   <plugin
+         id="org.yakindu.base.types"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.base.types.ui.scope"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.model.sgraph"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.model.sgraph.edit"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.model.stext"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.model.stext.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.ui.editor"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.ui.integration.stext"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.simulation.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.simulation.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.doc.user"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.yakindu.sct.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.model.sexec"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.model.sexec.edit"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.generator.genmodel"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.generator.genmodel.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.generator.cpp"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.model.stext.resource"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.model.sgen"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.generator.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.generator.c"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.generator.java"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.ui.navigator"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.model.sgraph.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.yakindu.sct.model.sexec.interpreter"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>

+ 4 - 4
plugins/org.yakindu.sct.generator.c/.settings/org.eclipse.core.resources.prefs

@@ -1,4 +1,4 @@
-#Thu Dec 01 08:03:54 CET 2011
-eclipse.preferences.version=1
-encoding//.settings/org.eclipse.xtend.shared.ui.prefs=Cp1252
-encoding/<project>=Cp1252
+#Wed Dec 14 17:02:06 CET 2011
+eclipse.preferences.version=1
+encoding//.settings/org.eclipse.xtend.shared.ui.prefs=Cp1252
+encoding/<project>=Cp1252

+ 1 - 1
plugins/org.yakindu.sct.generator.cpp/.settings/org.eclipse.core.resources.prefs

@@ -1,4 +1,4 @@
-#Tue Nov 29 07:55:52 CET 2011
+#Wed Dec 14 17:00:39 CET 2011
 eclipse.preferences.version=1
 encoding//.settings/org.eclipse.xtend.shared.ui.prefs=Cp1252
 encoding/<project>=Cp1252

+ 5 - 5
plugins/org.yakindu.sct.generator.genmodel.ui/.settings/org.eclipse.core.resources.prefs

@@ -1,5 +1,5 @@
-#Thu Dec 01 17:58:44 CET 2011
-eclipse.preferences.version=1
-encoding//src/org/yakindu/sct/generator/genmodel/ui/wizard/GeneratorProjectTemplate.xtend=UTF-8
-encoding//src/org/yakindu/sct/generator/genmodel/ui/wizard/XpandDefaultTemplate.xpt=ISO-8859-1
-encoding//xtend-gen/org/yakindu/sct/generator/genmodel/ui/wizard/GeneratorProjectTemplate.java=UTF-8
+#Wed Dec 14 17:00:34 CET 2011
+eclipse.preferences.version=1
+encoding//src/org/yakindu/sct/generator/genmodel/ui/wizard/GeneratorProjectTemplate.xtend=UTF-8
+encoding//src/org/yakindu/sct/generator/genmodel/ui/wizard/XpandDefaultTemplate.xpt=ISO-8859-1
+encoding//xtend-gen/org/yakindu/sct/generator/genmodel/ui/wizard/GeneratorProjectTemplate.java=UTF-8

+ 12 - 12
plugins/org.yakindu.sct.generator.genmodel/.settings/org.eclipse.jdt.core.prefs

@@ -1,12 +1,12 @@
-#Thu Nov 24 17:07:25 CET 2011
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+#Wed Dec 14 17:01:11 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5

+ 1 - 0
plugins/org.yakindu.sct.generator.genmodel/src/org/yakindu/sct/generator/genmodel/SGen.xtext

@@ -27,3 +27,4 @@ FeatureParameterValue returns gen::FeatureParameterValue:
 
 QID:
 	ID (('::' | '.') ID)*; 
+

+ 2 - 1
plugins/org.yakindu.sct.model.sexec.interpreter/META-INF/MANIFEST.MF

@@ -11,7 +11,8 @@ Require-Bundle: org.eclipse.core.runtime,
  org.eclipse.xtext.util;bundle-version="2.0.0",
  org.yakindu.sct.model.stext;bundle-version="1.0.0",
  org.yakindu.sct.simulation.core;bundle-version="1.0.0";visibility:=reexport,
- org.eclipse.xtext.xtend2.lib;bundle-version="2.0.0"
+ org.eclipse.xtext.xtend2.lib;bundle-version="2.0.0",
+ org.yakindu.base.types;bundle-version="1.0.0"
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
 Bundle-ActivationPolicy: lazy
 Export-Package: org.yakindu.sct.model.sexec.interpreter,

+ 36 - 14
plugins/org.yakindu.sct.model.sexec.interpreter/src/org/yakindu/sct/model/sexec/interpreter/impl/ExecutionFlowInterpreter.xtend

@@ -57,6 +57,7 @@ import org.yakindu.sct.model.sexec.interpreter.InterpreterModule
 import org.yakindu.sct.model.sexec.TraceStateEntered
 import org.yakindu.sct.model.sexec.TraceStateExited
 import org.yakindu.sct.model.sexec.TraceNodeExecuted
+import org.yakindu.base.types.Type
 /**
  * 
  * @author andreas muelder - Initial contribution and API
@@ -120,29 +121,50 @@ class ExecutionFlowInterpreter extends AbstractExecutionFlowInterpreter {
 		executionContext.resetRaisedEvents
 	} 
 
+// begin TODO: this should be externalized
+	def isBoolean(Type type){
+		return type != null && type.name == "boolean"
+	}
+	
+	def isInteger(Type type){
+		return type != null && type.name == "integer"
+	}
+	
+	def isReal(Type type){
+		return type != null && type.name == "real"
+	}
+	
+	def isVoid(Type type){
+		return type == null || type.name == "void"
+	}
+// end TODO
+
 	def dispatch addToScope(VariableDefinition variable){
 		var fqName = provider.qualifiedName(variable).toString
-		switch(variable.type){
-			case Type::BOOLEAN:
-				executionContext.declareVariable(new ExecutionVariable(fqName ,typeof(Boolean),false))
-			case Type::INTEGER:
-				executionContext.declareVariable(new ExecutionVariable(fqName,typeof(Integer),0))
-			case Type::REAL:
-				executionContext.declareVariable(new ExecutionVariable(fqName,typeof(Float),Float::parseFloat("0.0")))
+		if(isBoolean(variable.type)){
+			executionContext.declareVariable(new ExecutionVariable(fqName ,typeof(Boolean),false))
+		}
+		else if (isInteger(variable.type)){
+			executionContext.declareVariable(new ExecutionVariable(fqName,typeof(Integer),0))
+		}
+		else if(isReal(variable.type)){
+			executionContext.declareVariable(new ExecutionVariable(fqName,typeof(Float),Float::parseFloat("0.0")))
 		}
 		null 
 	}  
 	
 	def dispatch addToScope(EventDefinition event){
 		var fqName = provider.qualifiedName(event).toString
-		switch(event.type){
-			case Type::BOOLEAN:
+		if(isBoolean(event.type)){
 				executionContext.declareEvent(new ExecutionEvent(fqName,typeof(Boolean),null))
-			case Type::INTEGER:
-				executionContext.declareEvent(new ExecutionEvent(fqName,typeof(Integer),null))
-			case Type::REAL:
-				executionContext.declareEvent(new ExecutionEvent(fqName,typeof(Float),null))
-			case Type::VOID:
+		}
+		else if(isInteger(event.type)){
+			executionContext.declareEvent(new ExecutionEvent(fqName,typeof(Integer),null))
+		}
+		else if(isReal(event.type)){
+			executionContext.declareEvent(new ExecutionEvent(fqName,typeof(Float),null))
+		}
+		else if(isVoid(event.type)){
 				executionContext.declareEvent(new ExecutionEvent(fqName,typeof(Void)))
 		}
 		null 

+ 8 - 8
plugins/org.yakindu.sct.model.sgen/.settings/org.eclipse.jdt.core.prefs

@@ -1,8 +1,8 @@
-#Tue Nov 08 13:47:19 CET 2011
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+#Wed Dec 14 17:00:43 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5

+ 1 - 1
plugins/org.yakindu.sct.model.sgraph.test/.settings/org.eclipse.jdt.core.prefs

@@ -1,4 +1,4 @@
-#Thu Jun 09 09:40:38 CEST 2011
+#Wed Dec 14 17:02:19 CET 2011
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5

+ 1 - 1
plugins/org.yakindu.sct.model.sgraph.ui/.settings/org.eclipse.jdt.core.prefs

@@ -1,4 +1,4 @@
-#Mon Nov 21 17:11:23 CET 2011
+#Wed Dec 14 17:01:01 CET 2011
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6

+ 8 - 8
plugins/org.yakindu.sct.model.stext.resource/.settings/org.eclipse.jdt.core.prefs

@@ -1,8 +1,8 @@
-#Sat May 21 17:21:25 CEST 2011
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+#Wed Dec 14 17:00:27 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5

+ 2 - 1
plugins/org.yakindu.sct.model.stext.ui/META-INF/MANIFEST.MF

@@ -14,7 +14,8 @@ Require-Bundle: org.yakindu.sct.model.stext;visibility:=reexport,
  org.eclipse.xtext.builder,
  org.antlr.runtime,
  org.eclipse.xtext.common.types.ui,
- org.yakindu.sct.model.sgraph
+ org.yakindu.sct.model.sgraph,
+ org.yakindu.base.types.ui.scope;bundle-version="1.0.0"
 Import-Package: org.apache.log4j,
  org.apache.commons.logging
 Bundle-RequiredExecutionEnvironment: J2SE-1.5

+ 4 - 7
plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/AbstractSTextProposalProvider.java

@@ -68,7 +68,7 @@ public class AbstractSTextProposalProvider extends TerminalsProposalProvider {
 		completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
 	}
 	public void completeEventDefinition_Type(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
-		completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+		lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
 	}
 	public void completeEventDefinition_Derivation(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
 		completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
@@ -89,7 +89,7 @@ public class AbstractSTextProposalProvider extends TerminalsProposalProvider {
 		completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
 	}
 	public void completeVariableDefinition_Type(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
-		completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+		lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
 	}
 	public void completeVariableDefinition_InitialValue(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
 		completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
@@ -98,10 +98,10 @@ public class AbstractSTextProposalProvider extends TerminalsProposalProvider {
 		completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
 	}
 	public void completeOperation_ParamTypes(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
-		completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+		lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
 	}
 	public void completeOperation_Type(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
-		completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
+		lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
 	}
 	public void completeEntrypoint_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
 		completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
@@ -461,9 +461,6 @@ public class AbstractSTextProposalProvider extends TerminalsProposalProvider {
 	public void complete_TimeUnit(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
 		// subclasses may override
 	}
-	public void complete_Type(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
-		// subclasses may override
-	}
 	public void complete_ValueExpression(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
 		// subclasses may override
 	}

+ 0 - 1
plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/STextParser.java

@@ -65,7 +65,6 @@ public class STextParser extends AbstractContentAssistParser {
 					put(grammarAccess.getUnaryOperatorAccess().getAlternatives(), "rule__UnaryOperator__Alternatives");
 					put(grammarAccess.getRelationalOperatorAccess().getAlternatives(), "rule__RelationalOperator__Alternatives");
 					put(grammarAccess.getTimeUnitAccess().getAlternatives(), "rule__TimeUnit__Alternatives");
-					put(grammarAccess.getTypeAccess().getAlternatives(), "rule__Type__Alternatives");
 					put(grammarAccess.getStatechartRootAccess().getGroup(), "rule__StatechartRoot__Group__0");
 					put(grammarAccess.getStateRootAccess().getGroup(), "rule__StateRoot__Group__0");
 					put(grammarAccess.getTransitionRootAccess().getGroup(), "rule__TransitionRoot__Group__0");

+ 30 - 75
plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/internal/InternalSText.g

@@ -24,7 +24,6 @@ import java.io.InputStream;
 import org.eclipse.xtext.*;
 import org.eclipse.xtext.parser.*;
 import org.eclipse.xtext.parser.impl.*;
-import org.eclipse.xtext.parsetree.*;
 import org.eclipse.emf.ecore.util.EcoreUtil;
 import org.eclipse.emf.ecore.EObject;
 import org.eclipse.xtext.parser.antlr.XtextTokenStream;
@@ -2084,25 +2083,6 @@ finally {
 
 
 
-// Rule Type
-ruleType
-    @init {
-		int stackSize = keepStackSize();
-    }
-:
-(
-{ before(grammarAccess.getTypeAccess().getAlternatives()); }
-(rule__Type__Alternatives)
-{ after(grammarAccess.getTypeAccess().getAlternatives()); }
-)
-
-;
-finally {
-	restoreStackSize(stackSize);
-}
-
-
-
 rule__DefRoot__Alternatives
     @init {
 		int stackSize = keepStackSize();
@@ -2905,51 +2885,6 @@ finally {
 	restoreStackSize(stackSize);
 }
 
-rule__Type__Alternatives
-    @init {
-		int stackSize = keepStackSize();
-    }
-:
-(
-{ before(grammarAccess.getTypeAccess().getVoidEnumLiteralDeclaration_0()); }
-(	'void' 
-)
-{ after(grammarAccess.getTypeAccess().getVoidEnumLiteralDeclaration_0()); }
-)
-
-    |(
-{ before(grammarAccess.getTypeAccess().getIntegerEnumLiteralDeclaration_1()); }
-(	'integer' 
-)
-{ after(grammarAccess.getTypeAccess().getIntegerEnumLiteralDeclaration_1()); }
-)
-
-    |(
-{ before(grammarAccess.getTypeAccess().getRealEnumLiteralDeclaration_2()); }
-(	'real' 
-)
-{ after(grammarAccess.getTypeAccess().getRealEnumLiteralDeclaration_2()); }
-)
-
-    |(
-{ before(grammarAccess.getTypeAccess().getBooleanEnumLiteralDeclaration_3()); }
-(	'boolean' 
-)
-{ after(grammarAccess.getTypeAccess().getBooleanEnumLiteralDeclaration_3()); }
-)
-
-    |(
-{ before(grammarAccess.getTypeAccess().getStringEnumLiteralDeclaration_4()); }
-(	'string' 
-)
-{ after(grammarAccess.getTypeAccess().getStringEnumLiteralDeclaration_4()); }
-)
-
-;
-finally {
-	restoreStackSize(stackSize);
-}
-
 
 
 rule__StatechartRoot__Group__0
@@ -10369,8 +10304,12 @@ rule__EventDefinition__TypeAssignment_4_1
     }
 :
 (
-{ before(grammarAccess.getEventDefinitionAccess().getTypeTypeEnumRuleCall_4_1_0()); }
-	ruleType{ after(grammarAccess.getEventDefinitionAccess().getTypeTypeEnumRuleCall_4_1_0()); }
+{ before(grammarAccess.getEventDefinitionAccess().getTypeTypeCrossReference_4_1_0()); }
+(
+{ before(grammarAccess.getEventDefinitionAccess().getTypeTypeFQNParserRuleCall_4_1_0_1()); }
+	ruleFQN{ after(grammarAccess.getEventDefinitionAccess().getTypeTypeFQNParserRuleCall_4_1_0_1()); }
+)
+{ after(grammarAccess.getEventDefinitionAccess().getTypeTypeCrossReference_4_1_0()); }
 )
 
 ;
@@ -10490,8 +10429,12 @@ rule__VariableDefinition__TypeAssignment_5
     }
 :
 (
-{ before(grammarAccess.getVariableDefinitionAccess().getTypeTypeEnumRuleCall_5_0()); }
-	ruleType{ after(grammarAccess.getVariableDefinitionAccess().getTypeTypeEnumRuleCall_5_0()); }
+{ before(grammarAccess.getVariableDefinitionAccess().getTypeTypeCrossReference_5_0()); }
+(
+{ before(grammarAccess.getVariableDefinitionAccess().getTypeTypeFQNParserRuleCall_5_0_1()); }
+	ruleFQN{ after(grammarAccess.getVariableDefinitionAccess().getTypeTypeFQNParserRuleCall_5_0_1()); }
+)
+{ after(grammarAccess.getVariableDefinitionAccess().getTypeTypeCrossReference_5_0()); }
 )
 
 ;
@@ -10535,8 +10478,12 @@ rule__Operation__ParamTypesAssignment_4_0
     }
 :
 (
-{ before(grammarAccess.getOperationAccess().getParamTypesTypeEnumRuleCall_4_0_0()); }
-	ruleType{ after(grammarAccess.getOperationAccess().getParamTypesTypeEnumRuleCall_4_0_0()); }
+{ before(grammarAccess.getOperationAccess().getParamTypesTypeCrossReference_4_0_0()); }
+(
+{ before(grammarAccess.getOperationAccess().getParamTypesTypeFQNParserRuleCall_4_0_0_1()); }
+	ruleFQN{ after(grammarAccess.getOperationAccess().getParamTypesTypeFQNParserRuleCall_4_0_0_1()); }
+)
+{ after(grammarAccess.getOperationAccess().getParamTypesTypeCrossReference_4_0_0()); }
 )
 
 ;
@@ -10550,8 +10497,12 @@ rule__Operation__ParamTypesAssignment_4_1_1
     }
 :
 (
-{ before(grammarAccess.getOperationAccess().getParamTypesTypeEnumRuleCall_4_1_1_0()); }
-	ruleType{ after(grammarAccess.getOperationAccess().getParamTypesTypeEnumRuleCall_4_1_1_0()); }
+{ before(grammarAccess.getOperationAccess().getParamTypesTypeCrossReference_4_1_1_0()); }
+(
+{ before(grammarAccess.getOperationAccess().getParamTypesTypeFQNParserRuleCall_4_1_1_0_1()); }
+	ruleFQN{ after(grammarAccess.getOperationAccess().getParamTypesTypeFQNParserRuleCall_4_1_1_0_1()); }
+)
+{ after(grammarAccess.getOperationAccess().getParamTypesTypeCrossReference_4_1_1_0()); }
 )
 
 ;
@@ -10565,8 +10516,12 @@ rule__Operation__TypeAssignment_6_1
     }
 :
 (
-{ before(grammarAccess.getOperationAccess().getTypeTypeEnumRuleCall_6_1_0()); }
-	ruleType{ after(grammarAccess.getOperationAccess().getTypeTypeEnumRuleCall_6_1_0()); }
+{ before(grammarAccess.getOperationAccess().getTypeTypeCrossReference_6_1_0()); }
+(
+{ before(grammarAccess.getOperationAccess().getTypeTypeFQNParserRuleCall_6_1_0_1()); }
+	ruleFQN{ after(grammarAccess.getOperationAccess().getTypeTypeFQNParserRuleCall_6_1_0_1()); }
+)
+{ after(grammarAccess.getOperationAccess().getTypeTypeCrossReference_6_1_0()); }
 )
 
 ;

+ 37 - 47
plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/internal/InternalSText.tokens

@@ -29,7 +29,6 @@ RULE_HEX=8
 T__58=58
 T__16=16
 T__51=51
-T__90=90
 T__15=15
 T__52=52
 T__18=18
@@ -58,10 +57,6 @@ RULE_FLOAT=7
 T__85=85
 RULE_SL_COMMENT=11
 T__84=84
-T__87=87
-T__86=86
-T__89=89
-T__88=88
 RULE_ML_COMMENT=10
 T__30=30
 T__31=31
@@ -85,80 +80,75 @@ T__73=73
 T__79=79
 T__78=78
 T__77=77
-'#'=70
+'#'=65
 'out'=18
 '>='=43
-'internal'=60
+'internal'=55
 '~'=39
 '/'=37
 '=='=44
 '/='=23
-'string'=53
-'integer'=50
 '%='=24
 '>'=42
-'event'=61
-'||'=80
-'&&'=81
-';'=73
-'raise'=78
+'event'=56
+'||'=75
+'&&'=76
+';'=68
+'raise'=73
 '+'=34
-'active'=88
-'.'=69
-'^'=83
+'active'=83
+'.'=64
+'^'=78
 '>>'=33
 'else'=15
 '^='=30
 '+='=25
-'readonly'=89
+'readonly'=84
 '>>='=28
-'void'=49
-'?'=79
-'var'=62
+'?'=74
+'var'=57
 '&='=29
 's'=46
-'('=64
-':'=59
-'exit'=75
+':'=54
+'('=59
+'exit'=70
 '-'=35
-','=66
+','=61
 'default'=14
 'in'=17
 '-='=26
-']'=72
+']'=67
 '<<='=27
 'ns'=48
-'real'=51
-'!'=82
-'|'=84
+'!'=77
+'|'=79
 'ms'=47
 'every'=20
 '|='=31
-'@@statechart@@'=54
-'exitpoint'=68
-'@@state@@'=55
+'@@statechart@@'=49
+'exitpoint'=63
+'@@state@@'=50
 '='=21
-'always'=77
-'oncycle'=76
-')'=65
+'always'=72
+'oncycle'=71
+')'=60
 '*='=22
-'entry'=74
-'operation'=63
+'entry'=69
 '%'=38
+'operation'=58
 'after'=19
-'boolean'=52
-'entrypoint'=67
-'namespace'=57
+'entrypoint'=62
+'namespace'=52
 '<<'=32
 '<='=41
-'valueof'=86
+'valueof'=81
 '!='=45
-'@@transition@@'=56
-'external'=90
+'@@transition@@'=51
+'external'=85
 '<'=40
-'['=71
+'['=66
 '*'=36
 'local'=16
-'raised'=87
-'&'=85
-'interface'=58
+'raised'=82
+'&'=80
+'interface'=53

Fichier diff supprimé car celui-ci est trop grand
+ 424 - 602
plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/internal/InternalSTextLexer.java


Fichier diff supprimé car celui-ci est trop grand
+ 5622 - 5811
plugins/org.yakindu.sct.model.stext.ui/src-gen/org/yakindu/sct/model/stext/ui/contentassist/antlr/internal/InternalSTextParser.java


+ 6 - 0
plugins/org.yakindu.sct.model.stext.ui/src/org/yakindu/sct/model/stext/ui/STextUiModule.java

@@ -4,7 +4,9 @@
 package org.yakindu.sct.model.stext.ui;
 
 import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.eclipse.xtext.scoping.IGlobalScopeProvider;
 import org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory.StatefulFactory;
+import org.yakindu.base.types.scope.TypeLibrariesAwareScopeProvider;
 import org.yakindu.sct.model.stext.ui.contentassist.STextStatefulFactory;
 
 /**
@@ -21,4 +23,8 @@ public class STextUiModule extends org.yakindu.sct.model.stext.ui.AbstractSTextU
 	public Class<? extends StatefulFactory> bindStatefulFactory () {
 		return STextStatefulFactory.class;
 	}
+	
+	public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
+		return TypeLibrariesAwareScopeProvider.class;
+	}
 }

+ 2 - 1
plugins/org.yakindu.sct.model.stext/META-INF/MANIFEST.MF

@@ -19,7 +19,8 @@ Require-Bundle: org.eclipse.xtext;visibility:=reexport,
  org.eclipse.xtext.common.types,
  org.yakindu.sct.model.sgraph,
  de.itemis.xtext.utils.gmf,
- org.eclipse.gmf.runtime.emf.core;bundle-version="1.4.1"
+ org.eclipse.gmf.runtime.emf.core;bundle-version="1.4.1",
+ org.yakindu.base.types;bundle-version="1.0.0"
 Import-Package: org.apache.commons.logging,
  org.apache.log4j,
  org.eclipse.xtext.builder.builderState,

+ 2 - 1
plugins/org.yakindu.sct.model.stext/build.properties

@@ -3,4 +3,5 @@ source.. = src/,\
            xtend-gen/
 bin.includes = META-INF/,\
                .,\
-               plugin.xml
+               plugin.xml,\
+               libraries/

+ 10 - 0
plugins/org.yakindu.sct.model.stext/libraries/Primitives.types

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<types:Library xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:types="http://www.yakindu.org/base/types/2.0.0" id="Primitives">
+  <types name="void"/>
+  <types name="integer"/>
+  <types name="real"/>
+  <types name="boolean"/>
+  <types name="string">
+    <features xsi:type="types:Property" type="//@types.0" name="length"/>
+  </types>
+</types:Library>

+ 6 - 2
plugins/org.yakindu.sct.model.stext/plugin.xml

@@ -2,7 +2,6 @@
 <?eclipse version="3.0"?>
 
 <plugin>
-
   <extension point="org.eclipse.emf.ecore.generated_package">
     <package 
        uri = "http://www.yakindu.org/sct/statechart/SText" 
@@ -10,5 +9,10 @@
        genModel = "org/yakindu/sct/model/stext/SText.genmodel" /> 
 	
   </extension>
-
+   <extension
+         point="org.yakindu.base.types.libraries">
+      <TypeLibrary
+            location="libraries/Primitives.types">
+      </TypeLibrary>
+   </extension>
 </plugin>

+ 5 - 12
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore

@@ -144,13 +144,6 @@
     <eLiterals name="millisecond" value="1" literal="ms"/>
     <eLiterals name="nanosecond" value="2" literal="ns"/>
   </eClassifiers>
-  <eClassifiers xsi:type="ecore:EEnum" name="Type">
-    <eLiterals name="void" literal="void"/>
-    <eLiterals name="integer" value="1" literal="integer"/>
-    <eLiterals name="real" value="2" literal="real"/>
-    <eLiterals name="boolean" value="3" literal="boolean"/>
-    <eLiterals name="string" value="4" literal="string"/>
-  </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="ElementReferenceExpression" eSuperTypes="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Expression">
     <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="ecore:EClass platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Declaration"/>
   </eClassifiers>
@@ -183,21 +176,21 @@
   <eClassifiers xsi:type="ecore:EClass" name="InternalScope" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Scope"/>
   <eClassifiers xsi:type="ecore:EClass" name="EventDefinition" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Event">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="direction" eType="ecore:EEnum platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Direction"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EEnum platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Type"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="ecore:EClass platform:/resource/org.yakindu.base.types/model/types.ecore#//Type"/>
     <eStructuralFeatures xsi:type="ecore:EReference" name="derivation" eType="ecore:EClass platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//EventDerivation"
         containment="true"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="VariableDefinition" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Variable">
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="readonly" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="external" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EEnum platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Type"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="ecore:EClass platform:/resource/org.yakindu.base.types/model/types.ecore#//Type"/>
     <eStructuralFeatures xsi:type="ecore:EReference" name="initialValue" eType="ecore:EClass platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Expression"
         containment="true"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="Operation" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Declaration">
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="paramTypes" unique="false"
-        upperBound="-1" eType="ecore:EEnum platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Type"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EEnum platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Type"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="paramTypes" unique="false"
+        upperBound="-1" eType="ecore:EClass platform:/resource/org.yakindu.base.types/model/types.ecore#//Type"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="ecore:EClass platform:/resource/org.yakindu.base.types/model/types.ecore#//Type"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="Entrypoint" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Declaration"/>
   <eClassifiers xsi:type="ecore:EClass" name="Exitpoint" eSuperTypes="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore#//Declaration"/>

+ 5 - 12
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.genmodel

@@ -6,7 +6,7 @@
     modelPluginID="org.yakindu.sct.model.stext" forceOverwrite="true" modelName="SText"
     updateClasspath="false" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
     complianceLevel="5.0" copyrightFields="false" editPluginID="org.yakindu.sct.model.stext.edit"
-    editorPluginID="org.yakindu.sct.model.stext.editor" usedGenPackages="platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.genmodel#//sgraph">
+    editorPluginID="org.yakindu.sct.model.stext.editor" usedGenPackages="platform:/resource/org.yakindu.base.types/model/types.genmodel#//types platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.genmodel#//sgraph">
   <genPackages prefix="Stext" basePackage="org.yakindu.sct.model.stext" disposableProviderFactory="true"
       ecorePackage="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#/">
     <genEnums typeSafeEnumCompatible="false" ecoreEnum="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Direction">
@@ -62,13 +62,6 @@
       <genEnumLiterals ecoreEnumLiteral="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//TimeUnit/millisecond"/>
       <genEnumLiterals ecoreEnumLiteral="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//TimeUnit/nanosecond"/>
     </genEnums>
-    <genEnums typeSafeEnumCompatible="false" ecoreEnum="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Type">
-      <genEnumLiterals ecoreEnumLiteral="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Type/void"/>
-      <genEnumLiterals ecoreEnumLiteral="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Type/integer"/>
-      <genEnumLiterals ecoreEnumLiteral="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Type/real"/>
-      <genEnumLiterals ecoreEnumLiteral="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Type/boolean"/>
-      <genEnumLiterals ecoreEnumLiteral="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Type/string"/>
-    </genEnums>
     <genClasses ecoreClass="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Root">
       <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Root/roots"/>
     </genClasses>
@@ -172,18 +165,18 @@
     <genClasses ecoreClass="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//InternalScope"/>
     <genClasses ecoreClass="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//EventDefinition">
       <genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//EventDefinition/direction"/>
-      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//EventDefinition/type"/>
+      <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//EventDefinition/type"/>
       <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//EventDefinition/derivation"/>
     </genClasses>
     <genClasses ecoreClass="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//VariableDefinition">
       <genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//VariableDefinition/readonly"/>
       <genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//VariableDefinition/external"/>
-      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//VariableDefinition/type"/>
+      <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//VariableDefinition/type"/>
       <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//VariableDefinition/initialValue"/>
     </genClasses>
     <genClasses ecoreClass="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Operation">
-      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Operation/paramTypes"/>
-      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Operation/type"/>
+      <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Operation/paramTypes"/>
+      <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Operation/type"/>
     </genClasses>
     <genClasses ecoreClass="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Entrypoint"/>
     <genClasses ecoreClass="platform:/resource/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.ecore#//Exitpoint"/>

+ 73 - 72
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/SText.xmi

@@ -4,12 +4,15 @@
     <metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="stext">
       <ePackage href="http://www.yakindu.org/sct/statechart/SText#/"/>
     </metamodelDeclarations>
-    <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="sct">
-      <ePackage href="http://www.yakindu.org/sct/sgraph/2.0.0#/"/>
-    </metamodelDeclarations>
     <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="ecore">
       <ePackage href="http://www.eclipse.org/emf/2002/Ecore#/"/>
     </metamodelDeclarations>
+    <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="sgraph">
+      <ePackage href="http://www.yakindu.org/sct/sgraph/2.0.0#/"/>
+    </metamodelDeclarations>
+    <metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="types">
+      <ePackage href="http://www.yakindu.org/base/types/2.0.0#/"/>
+    </metamodelDeclarations>
     <rules xsi:type="xtext:ParserRule" name="Root">
       <type metamodel="/0/@metamodelDeclarations.0">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/statechart/SText#//Root"/>
@@ -99,7 +102,7 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="Scope">
-      <type metamodel="/0/@metamodelDeclarations.1">
+      <type metamodel="/0/@metamodelDeclarations.2">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Scope"/>
       </type>
       <alternatives xsi:type="xtext:Alternatives">
@@ -108,7 +111,7 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="StateScope">
-      <type metamodel="/0/@metamodelDeclarations.1">
+      <type metamodel="/0/@metamodelDeclarations.2">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Scope"/>
       </type>
       <alternatives xsi:type="xtext:Group">
@@ -127,7 +130,7 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="StatechartScope">
-      <type metamodel="/0/@metamodelDeclarations.1">
+      <type metamodel="/0/@metamodelDeclarations.2">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Scope"/>
       </type>
       <alternatives xsi:type="xtext:Alternatives">
@@ -136,7 +139,7 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="InterfaceScope">
-      <type metamodel="/0/@metamodelDeclarations.1">
+      <type metamodel="/0/@metamodelDeclarations.2">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Scope"/>
       </type>
       <alternatives xsi:type="xtext:Group">
@@ -161,7 +164,7 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="InternalScope">
-      <type metamodel="/0/@metamodelDeclarations.1">
+      <type metamodel="/0/@metamodelDeclarations.2">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Scope"/>
       </type>
       <alternatives xsi:type="xtext:Group">
@@ -183,7 +186,7 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="Declaration">
-      <type metamodel="/0/@metamodelDeclarations.1">
+      <type metamodel="/0/@metamodelDeclarations.2">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Declaration"/>
       </type>
       <alternatives xsi:type="xtext:Alternatives">
@@ -196,7 +199,7 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="EventDefinition">
-      <type metamodel="/0/@metamodelDeclarations.1">
+      <type metamodel="/0/@metamodelDeclarations.2">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Event"/>
       </type>
       <alternatives xsi:type="xtext:Group">
@@ -215,7 +218,12 @@
         <elements xsi:type="xtext:Group" cardinality="?">
           <elements xsi:type="xtext:Keyword" value=":"/>
           <elements xsi:type="xtext:Assignment" feature="type" operator="=">
-            <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.66"/>
+            <terminal xsi:type="xtext:CrossReference">
+              <type metamodel="/0/@metamodelDeclarations.3">
+                <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/base/types/2.0.0#//Type"/>
+              </type>
+              <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.21"/>
+            </terminal>
           </elements>
         </elements>
         <elements xsi:type="xtext:Assignment" cardinality="?" feature="derivation" operator="=">
@@ -260,7 +268,7 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="VariableDefinition">
-      <type metamodel="/0/@metamodelDeclarations.1">
+      <type metamodel="/0/@metamodelDeclarations.2">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Variable"/>
       </type>
       <alternatives xsi:type="xtext:Group">
@@ -283,7 +291,12 @@
         </elements>
         <elements xsi:type="xtext:Keyword" value=":"/>
         <elements xsi:type="xtext:Assignment" feature="type" operator="=">
-          <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.66"/>
+          <terminal xsi:type="xtext:CrossReference">
+            <type metamodel="/0/@metamodelDeclarations.3">
+              <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/base/types/2.0.0#//Type"/>
+            </type>
+            <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.21"/>
+          </terminal>
         </elements>
         <elements xsi:type="xtext:Group" cardinality="?">
           <elements xsi:type="xtext:Keyword" value="="/>
@@ -294,7 +307,7 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="Operation">
-      <type metamodel="/0/@metamodelDeclarations.1">
+      <type metamodel="/0/@metamodelDeclarations.2">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Declaration"/>
       </type>
       <alternatives xsi:type="xtext:Group">
@@ -310,12 +323,22 @@
         <elements xsi:type="xtext:Keyword" value="("/>
         <elements xsi:type="xtext:Group" cardinality="?">
           <elements xsi:type="xtext:Assignment" feature="paramTypes" operator="+=">
-            <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.66"/>
+            <terminal xsi:type="xtext:CrossReference">
+              <type metamodel="/0/@metamodelDeclarations.3">
+                <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/base/types/2.0.0#//Type"/>
+              </type>
+              <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.21"/>
+            </terminal>
           </elements>
           <elements xsi:type="xtext:Group" cardinality="*">
             <elements xsi:type="xtext:Keyword" value=","/>
             <elements xsi:type="xtext:Assignment" feature="paramTypes" operator="+=">
-              <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.66"/>
+              <terminal xsi:type="xtext:CrossReference">
+                <type metamodel="/0/@metamodelDeclarations.3">
+                  <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/base/types/2.0.0#//Type"/>
+                </type>
+                <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.21"/>
+              </terminal>
             </elements>
           </elements>
         </elements>
@@ -323,13 +346,18 @@
         <elements xsi:type="xtext:Group" cardinality="?">
           <elements xsi:type="xtext:Keyword" value=":"/>
           <elements xsi:type="xtext:Assignment" feature="type" operator="=">
-            <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.66"/>
+            <terminal xsi:type="xtext:CrossReference">
+              <type metamodel="/0/@metamodelDeclarations.3">
+                <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/base/types/2.0.0#//Type"/>
+              </type>
+              <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.21"/>
+            </terminal>
           </elements>
         </elements>
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="Entrypoint">
-      <type metamodel="/0/@metamodelDeclarations.1">
+      <type metamodel="/0/@metamodelDeclarations.2">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Declaration"/>
       </type>
       <alternatives xsi:type="xtext:Group">
@@ -345,7 +373,7 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="Exitpoint">
-      <type metamodel="/0/@metamodelDeclarations.1">
+      <type metamodel="/0/@metamodelDeclarations.2">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Declaration"/>
       </type>
       <alternatives xsi:type="xtext:Group">
@@ -361,7 +389,7 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="FQN">
-      <type metamodel="/0/@metamodelDeclarations.2">
+      <type metamodel="/0/@metamodelDeclarations.1">
         <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
       </type>
       <alternatives xsi:type="xtext:Group">
@@ -373,7 +401,7 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="Reaction">
-      <type metamodel="/0/@metamodelDeclarations.1">
+      <type metamodel="/0/@metamodelDeclarations.2">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Reaction"/>
       </type>
       <alternatives xsi:type="xtext:Alternatives">
@@ -431,7 +459,7 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="ReactionTrigger">
-      <type metamodel="/0/@metamodelDeclarations.1">
+      <type metamodel="/0/@metamodelDeclarations.2">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Trigger"/>
       </type>
       <alternatives xsi:type="xtext:Group">
@@ -470,7 +498,7 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="ReactionEffect">
-      <type metamodel="/0/@metamodelDeclarations.1">
+      <type metamodel="/0/@metamodelDeclarations.2">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Effect"/>
       </type>
       <alternatives xsi:type="xtext:Group">
@@ -572,7 +600,7 @@
       </type>
       <alternatives xsi:type="xtext:Assignment" feature="event" operator="=">
         <terminal xsi:type="xtext:CrossReference">
-          <type metamodel="/0/@metamodelDeclarations.1">
+          <type metamodel="/0/@metamodelDeclarations.2">
             <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Event"/>
           </type>
           <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.21"/>
@@ -691,13 +719,13 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="Statement">
-      <type metamodel="/0/@metamodelDeclarations.1">
+      <type metamodel="/0/@metamodelDeclarations.2">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Statement"/>
       </type>
       <alternatives xsi:type="xtext:Alternatives">
         <elements xsi:type="xtext:RuleCall" rule="/0/@rules.43"/>
         <elements xsi:type="xtext:RuleCall" rule="/0/@rules.45"/>
-        <elements xsi:type="xtext:RuleCall" rule="/0/@rules.73"/>
+        <elements xsi:type="xtext:RuleCall" rule="/0/@rules.72"/>
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="Assignment">
@@ -707,7 +735,7 @@
       <alternatives xsi:type="xtext:Group">
         <elements xsi:type="xtext:Assignment" feature="varRef" operator="=">
           <terminal xsi:type="xtext:CrossReference">
-            <type metamodel="/0/@metamodelDeclarations.1">
+            <type metamodel="/0/@metamodelDeclarations.2">
               <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Variable"/>
             </type>
             <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.21"/>
@@ -780,7 +808,7 @@
         <elements xsi:type="xtext:Keyword" value="raise"/>
         <elements xsi:type="xtext:Assignment" feature="event" operator="=">
           <terminal xsi:type="xtext:CrossReference">
-            <type metamodel="/0/@metamodelDeclarations.1">
+            <type metamodel="/0/@metamodelDeclarations.2">
               <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Event"/>
             </type>
             <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.21"/>
@@ -1062,13 +1090,13 @@
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/statechart/SText#//Expression"/>
       </type>
       <alternatives xsi:type="xtext:Alternatives">
-        <elements xsi:type="xtext:RuleCall" rule="/0/@rules.67"/>
+        <elements xsi:type="xtext:RuleCall" rule="/0/@rules.66"/>
         <elements xsi:type="xtext:Group">
           <elements xsi:type="xtext:Keyword" value="("/>
           <elements xsi:type="xtext:RuleCall" rule="/0/@rules.46"/>
           <elements xsi:type="xtext:Keyword" value=")"/>
         </elements>
-        <elements xsi:type="xtext:RuleCall" rule="/0/@rules.73"/>
+        <elements xsi:type="xtext:RuleCall" rule="/0/@rules.72"/>
       </alternatives>
     </rules>
     <rules xsi:type="xtext:EnumRule" name="AdditiveOperator">
@@ -1174,43 +1202,16 @@
         </elements>
       </alternatives>
     </rules>
-    <rules xsi:type="xtext:EnumRule" name="Type">
-      <type metamodel="/0/@metamodelDeclarations.0">
-        <classifier xsi:type="ecore:EEnum" href="http://www.yakindu.org/sct/statechart/SText#//Type"/>
-      </type>
-      <alternatives xsi:type="xtext:Alternatives">
-        <elements xsi:type="xtext:EnumLiteralDeclaration">
-          <enumLiteral href="http://www.yakindu.org/sct/statechart/SText#//Type/void"/>
-          <literal value="void"/>
-        </elements>
-        <elements xsi:type="xtext:EnumLiteralDeclaration">
-          <enumLiteral href="http://www.yakindu.org/sct/statechart/SText#//Type/integer"/>
-          <literal value="integer"/>
-        </elements>
-        <elements xsi:type="xtext:EnumLiteralDeclaration">
-          <enumLiteral href="http://www.yakindu.org/sct/statechart/SText#//Type/real"/>
-          <literal value="real"/>
-        </elements>
-        <elements xsi:type="xtext:EnumLiteralDeclaration">
-          <enumLiteral href="http://www.yakindu.org/sct/statechart/SText#//Type/boolean"/>
-          <literal value="boolean"/>
-        </elements>
-        <elements xsi:type="xtext:EnumLiteralDeclaration">
-          <enumLiteral href="http://www.yakindu.org/sct/statechart/SText#//Type/string"/>
-          <literal value="string"/>
-        </elements>
-      </alternatives>
-    </rules>
     <rules xsi:type="xtext:ParserRule" name="ValueExpression">
       <type metamodel="/0/@metamodelDeclarations.0">
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/statechart/SText#//Expression"/>
       </type>
       <alternatives xsi:type="xtext:Alternatives">
+        <elements xsi:type="xtext:RuleCall" rule="/0/@rules.67"/>
         <elements xsi:type="xtext:RuleCall" rule="/0/@rules.68"/>
+        <elements xsi:type="xtext:RuleCall" rule="/0/@rules.71"/>
         <elements xsi:type="xtext:RuleCall" rule="/0/@rules.69"/>
-        <elements xsi:type="xtext:RuleCall" rule="/0/@rules.72"/>
         <elements xsi:type="xtext:RuleCall" rule="/0/@rules.70"/>
-        <elements xsi:type="xtext:RuleCall" rule="/0/@rules.71"/>
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="PrimitiveValueExpression">
@@ -1224,7 +1225,7 @@
           </type>
         </elements>
         <elements xsi:type="xtext:Assignment" feature="value" operator="=">
-          <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.74"/>
+          <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.73"/>
         </elements>
       </alternatives>
     </rules>
@@ -1240,7 +1241,7 @@
         </elements>
         <elements xsi:type="xtext:Assignment" feature="value" operator="=">
           <terminal xsi:type="xtext:CrossReference">
-            <type metamodel="/0/@metamodelDeclarations.1">
+            <type metamodel="/0/@metamodelDeclarations.2">
               <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Declaration"/>
             </type>
             <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.21"/>
@@ -1262,7 +1263,7 @@
         <elements xsi:type="xtext:Keyword" value="("/>
         <elements xsi:type="xtext:Assignment" feature="value" operator="=">
           <terminal xsi:type="xtext:CrossReference">
-            <type metamodel="/0/@metamodelDeclarations.1">
+            <type metamodel="/0/@metamodelDeclarations.2">
               <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Event"/>
             </type>
             <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.21"/>
@@ -1285,7 +1286,7 @@
         <elements xsi:type="xtext:Keyword" value="("/>
         <elements xsi:type="xtext:Assignment" feature="value" operator="=">
           <terminal xsi:type="xtext:CrossReference">
-            <type metamodel="/0/@metamodelDeclarations.1">
+            <type metamodel="/0/@metamodelDeclarations.2">
               <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//Event"/>
             </type>
             <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.21"/>
@@ -1308,7 +1309,7 @@
         <elements xsi:type="xtext:Keyword" value="("/>
         <elements xsi:type="xtext:Assignment" feature="value" operator="=">
           <terminal xsi:type="xtext:CrossReference">
-            <type metamodel="/0/@metamodelDeclarations.1">
+            <type metamodel="/0/@metamodelDeclarations.2">
               <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/sgraph/2.0.0#//RegularState"/>
             </type>
             <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.21"/>
@@ -1355,10 +1356,10 @@
         <classifier xsi:type="ecore:EClass" href="http://www.yakindu.org/sct/statechart/SText#//Literal"/>
       </type>
       <alternatives xsi:type="xtext:Alternatives">
+        <elements xsi:type="xtext:RuleCall" rule="/0/@rules.74"/>
         <elements xsi:type="xtext:RuleCall" rule="/0/@rules.75"/>
-        <elements xsi:type="xtext:RuleCall" rule="/0/@rules.76"/>
-        <elements xsi:type="xtext:RuleCall" rule="/0/@rules.78"/>
         <elements xsi:type="xtext:RuleCall" rule="/0/@rules.77"/>
+        <elements xsi:type="xtext:RuleCall" rule="/0/@rules.76"/>
       </alternatives>
     </rules>
     <rules xsi:type="xtext:ParserRule" name="BoolLiteral">
@@ -1372,7 +1373,7 @@
           </type>
         </elements>
         <elements xsi:type="xtext:Assignment" feature="value" operator="=">
-          <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.79"/>
+          <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.78"/>
         </elements>
       </alternatives>
     </rules>
@@ -1402,7 +1403,7 @@
           </type>
         </elements>
         <elements xsi:type="xtext:Assignment" feature="value" operator="=">
-          <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.81"/>
+          <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.80"/>
         </elements>
       </alternatives>
     </rules>
@@ -1417,12 +1418,12 @@
           </type>
         </elements>
         <elements xsi:type="xtext:Assignment" feature="value" operator="=">
-          <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.80"/>
+          <terminal xsi:type="xtext:RuleCall" rule="/0/@rules.79"/>
         </elements>
       </alternatives>
     </rules>
     <rules xsi:type="xtext:TerminalRule" name="BOOL">
-      <type metamodel="/0/@metamodelDeclarations.2">
+      <type metamodel="/0/@metamodelDeclarations.1">
         <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
       </type>
       <alternatives xsi:type="xtext:Alternatives">
@@ -1433,7 +1434,7 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:TerminalRule" name="HEX">
-      <type metamodel="/0/@metamodelDeclarations.2">
+      <type metamodel="/0/@metamodelDeclarations.1">
         <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
       </type>
       <alternatives xsi:type="xtext:Group">
@@ -1459,7 +1460,7 @@
       </alternatives>
     </rules>
     <rules xsi:type="xtext:TerminalRule" name="FLOAT">
-      <type metamodel="/0/@metamodelDeclarations.2">
+      <type metamodel="/0/@metamodelDeclarations.1">
         <classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EFloat"/>
       </type>
       <alternatives xsi:type="xtext:Group">

+ 87 - 70
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parseTreeConstruction/STextParsetreeConstructor.java

@@ -952,7 +952,7 @@ protected class TransitionSpecification_ReactionAssignment extends AssignmentTok
  *
  * / * ---- scope rules ----
  * Defines different kinds of scopes that contain element definitions. Scopes are used for element definitions in statechart, regions, and state 
- * * / Scope returns sct::Scope:
+ * * / Scope returns sgraph::Scope:
  * 	StateScope | StatechartScope;
  *
  **/
@@ -1069,7 +1069,7 @@ protected class Scope_StatechartScopeParserRuleCall_1 extends RuleCallToken {
 /************ begin Rule StateScope ****************
  *
  * // a SimpleScope is used for states and regions
- * StateScope returns sct::Scope:
+ * StateScope returns sgraph::Scope:
  * 	{SimpleScope} declarations+=(LocalReaction | Entrypoint | Exitpoint)*;
  *
  **/
@@ -1204,7 +1204,7 @@ protected class StateScope_DeclarationsAssignment_1 extends AssignmentToken  {
 /************ begin Rule StatechartScope ****************
  *
  * // defines the poosible scopes for statecharts
- * StatechartScope returns sct::Scope:
+ * StatechartScope returns sgraph::Scope:
  * 	InterfaceScope | InternalScope;
  *
  **/
@@ -1318,7 +1318,7 @@ protected class StatechartScope_InternalScopeParserRuleCall_1 extends RuleCallTo
 
 /************ begin Rule InterfaceScope ****************
  *
- * InterfaceScope returns sct::Scope:
+ * InterfaceScope returns sgraph::Scope:
  * 	{InterfaceScope} "interface" name=ID? ":" declarations+=(EventDefinition | VariableDefinition | Entrypoint |
  * 	Exitpoint)*;
  *
@@ -1542,7 +1542,7 @@ protected class InterfaceScope_DeclarationsAssignment_4 extends AssignmentToken
 
 /************ begin Rule InternalScope ****************
  *
- * InternalScope returns sct::Scope:
+ * InternalScope returns sgraph::Scope:
  * 	{InternalScope} "internal" ":" declarations+=(EventDefinition | VariableDefinition | Operation | LocalReaction)*;
  *
  **/
@@ -1731,7 +1731,7 @@ protected class InternalScope_DeclarationsAssignment_3 extends AssignmentToken
 /************ begin Rule Declaration ****************
  *
  * / * ---- declarations ----
- * a definition is a top level element of a definition scope. * / Declaration returns sct::Declaration:
+ * a definition is a top level element of a definition scope. * / Declaration returns sgraph::Declaration:
  * 	EventDefinition | VariableDefinition | Operation | LocalReaction | Entrypoint | Exitpoint;
  *
  **/
@@ -1998,12 +1998,12 @@ protected class Declaration_ExitpointParserRuleCall_5 extends RuleCallToken {
 /************ begin Rule EventDefinition ****************
  *
  * // DataElement: EventDefinition | VariableDefinition;
- * / * ---- event definition ---- * / EventDefinition returns sct::Event:
- * 	{EventDefinition} direction=Direction? "event" name=ID (":" type=Type)? derivation=EventDerivation?;
+ * / * ---- event definition ---- * / EventDefinition returns sgraph::Event:
+ * 	{EventDefinition} direction=Direction? "event" name=ID (":" type=[types::Type|FQN])? derivation=EventDerivation?;
  *
  **/
 
-// {EventDefinition} direction=Direction? "event" name=ID (":" type=Type)? derivation=EventDerivation?
+// {EventDefinition} direction=Direction? "event" name=ID (":" type=[types::Type|FQN])? derivation=EventDerivation?
 protected class EventDefinition_Group extends GroupToken {
 	
 	public EventDefinition_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -2151,7 +2151,7 @@ protected class EventDefinition_NameAssignment_3 extends AssignmentToken  {
 
 }
 
-// (":" type=Type)?
+// (":" type=[types::Type|FQN])?
 protected class EventDefinition_Group_4 extends GroupToken {
 	
 	public EventDefinition_Group_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -2195,7 +2195,7 @@ protected class EventDefinition_ColonKeyword_4_0 extends KeywordToken  {
 
 }
 
-// type=Type
+// type=[types::Type|FQN]
 protected class EventDefinition_TypeAssignment_4_1 extends AssignmentToken  {
 	
 	public EventDefinition_TypeAssignment_4_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -2219,10 +2219,13 @@ protected class EventDefinition_TypeAssignment_4_1 extends AssignmentToken  {
 	public IEObjectConsumer tryConsume() {
 		if((value = eObjectConsumer.getConsumable("type",false)) == null) return null;
 		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("type");
-		if(enumLitSerializer.isValid(obj.getEObject(), grammarAccess.getEventDefinitionAccess().getTypeTypeEnumRuleCall_4_1_0(), value, null)) { 
-			type = AssignmentType.ENUM_RULE_CALL;
-			element = grammarAccess.getEventDefinitionAccess().getTypeTypeEnumRuleCall_4_1_0();
-			return obj;
+		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
+			IEObjectConsumer param = createEObjectConsumer((EObject)value);
+			if(param.isInstanceOf(grammarAccess.getEventDefinitionAccess().getTypeTypeCrossReference_4_1_0().getType().getClassifier())) {
+				type = AssignmentType.CROSS_REFERENCE;
+				element = grammarAccess.getEventDefinitionAccess().getTypeTypeCrossReference_4_1_0(); 
+				return obj;
+			}
 		}
 		return null;
 	}
@@ -2482,13 +2485,13 @@ protected class EventDerivation_ValueAssignment_2_1 extends AssignmentToken  {
 
 /************ begin Rule VariableDefinition ****************
  *
- * / * ---- variable definition ---- * / VariableDefinition returns sct::Variable:
- * 	{VariableDefinition} "var" (readonly?="readonly"? & external?="external"?) name=ID ":" type=Type ("="
+ * / * ---- variable definition ---- * / VariableDefinition returns sgraph::Variable:
+ * 	{VariableDefinition} "var" (readonly?="readonly"? & external?="external"?) name=ID ":" type=[types::Type|FQN] ("="
  * 	initialValue=Expression)?;
  *
  **/
 
-// {VariableDefinition} "var" (readonly?="readonly"? & external?="external"?) name=ID ":" type=Type ("="
+// {VariableDefinition} "var" (readonly?="readonly"? & external?="external"?) name=ID ":" type=[types::Type|FQN] ("="
 // initialValue=Expression)?
 protected class VariableDefinition_Group extends GroupToken {
 	
@@ -2717,7 +2720,7 @@ protected class VariableDefinition_ColonKeyword_4 extends KeywordToken  {
 
 }
 
-// type=Type
+// type=[types::Type|FQN]
 protected class VariableDefinition_TypeAssignment_5 extends AssignmentToken  {
 	
 	public VariableDefinition_TypeAssignment_5(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -2741,10 +2744,13 @@ protected class VariableDefinition_TypeAssignment_5 extends AssignmentToken  {
 	public IEObjectConsumer tryConsume() {
 		if((value = eObjectConsumer.getConsumable("type",true)) == null) return null;
 		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("type");
-		if(enumLitSerializer.isValid(obj.getEObject(), grammarAccess.getVariableDefinitionAccess().getTypeTypeEnumRuleCall_5_0(), value, null)) { 
-			type = AssignmentType.ENUM_RULE_CALL;
-			element = grammarAccess.getVariableDefinitionAccess().getTypeTypeEnumRuleCall_5_0();
-			return obj;
+		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
+			IEObjectConsumer param = createEObjectConsumer((EObject)value);
+			if(param.isInstanceOf(grammarAccess.getVariableDefinitionAccess().getTypeTypeCrossReference_5_0().getType().getClassifier())) {
+				type = AssignmentType.CROSS_REFERENCE;
+				element = grammarAccess.getVariableDefinitionAccess().getTypeTypeCrossReference_5_0(); 
+				return obj;
+			}
 		}
 		return null;
 	}
@@ -2848,12 +2854,14 @@ protected class VariableDefinition_InitialValueAssignment_6_1 extends Assignment
 
 /************ begin Rule Operation ****************
  *
- * / * ---- operation definition ---- * / Operation returns sct::Declaration:
- * 	{Operation} "operation" name=ID "(" (paramTypes+=Type ("," paramTypes+=Type)*)? ")" (":" type=Type)?;
+ * / * ---- operation definition ---- * / Operation returns sgraph::Declaration:
+ * 	{Operation} "operation" name=ID "(" (paramTypes+=[types::Type|FQN] ("," paramTypes+=[types::Type|FQN])*)? ")" (":"
+ * 	type=[types::Type|FQN])?;
  *
  **/
 
-// {Operation} "operation" name=ID "(" (paramTypes+=Type ("," paramTypes+=Type)*)? ")" (":" type=Type)?
+// {Operation} "operation" name=ID "(" (paramTypes+=[types::Type|FQN] ("," paramTypes+=[types::Type|FQN])*)? ")" (":"
+// type=[types::Type|FQN])?
 protected class Operation_Group extends GroupToken {
 	
 	public Operation_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -2987,7 +2995,7 @@ protected class Operation_LeftParenthesisKeyword_3 extends KeywordToken  {
 
 }
 
-// (paramTypes+=Type ("," paramTypes+=Type)*)?
+// (paramTypes+=[types::Type|FQN] ("," paramTypes+=[types::Type|FQN])*)?
 protected class Operation_Group_4 extends GroupToken {
 	
 	public Operation_Group_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -3010,7 +3018,7 @@ protected class Operation_Group_4 extends GroupToken {
 
 }
 
-// paramTypes+=Type
+// paramTypes+=[types::Type|FQN]
 protected class Operation_ParamTypesAssignment_4_0 extends AssignmentToken  {
 	
 	public Operation_ParamTypesAssignment_4_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -3034,17 +3042,20 @@ protected class Operation_ParamTypesAssignment_4_0 extends AssignmentToken  {
 	public IEObjectConsumer tryConsume() {
 		if((value = eObjectConsumer.getConsumable("paramTypes",true)) == null) return null;
 		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("paramTypes");
-		if(enumLitSerializer.isValid(obj.getEObject(), grammarAccess.getOperationAccess().getParamTypesTypeEnumRuleCall_4_0_0(), value, null)) { 
-			type = AssignmentType.ENUM_RULE_CALL;
-			element = grammarAccess.getOperationAccess().getParamTypesTypeEnumRuleCall_4_0_0();
-			return obj;
+		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
+			IEObjectConsumer param = createEObjectConsumer((EObject)value);
+			if(param.isInstanceOf(grammarAccess.getOperationAccess().getParamTypesTypeCrossReference_4_0_0().getType().getClassifier())) {
+				type = AssignmentType.CROSS_REFERENCE;
+				element = grammarAccess.getOperationAccess().getParamTypesTypeCrossReference_4_0_0(); 
+				return obj;
+			}
 		}
 		return null;
 	}
 
 }
 
-// ("," paramTypes+=Type)*
+// ("," paramTypes+=[types::Type|FQN])*
 protected class Operation_Group_4_1 extends GroupToken {
 	
 	public Operation_Group_4_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -3089,7 +3100,7 @@ protected class Operation_CommaKeyword_4_1_0 extends KeywordToken  {
 
 }
 
-// paramTypes+=Type
+// paramTypes+=[types::Type|FQN]
 protected class Operation_ParamTypesAssignment_4_1_1 extends AssignmentToken  {
 	
 	public Operation_ParamTypesAssignment_4_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -3113,10 +3124,13 @@ protected class Operation_ParamTypesAssignment_4_1_1 extends AssignmentToken  {
 	public IEObjectConsumer tryConsume() {
 		if((value = eObjectConsumer.getConsumable("paramTypes",false)) == null) return null;
 		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("paramTypes");
-		if(enumLitSerializer.isValid(obj.getEObject(), grammarAccess.getOperationAccess().getParamTypesTypeEnumRuleCall_4_1_1_0(), value, null)) { 
-			type = AssignmentType.ENUM_RULE_CALL;
-			element = grammarAccess.getOperationAccess().getParamTypesTypeEnumRuleCall_4_1_1_0();
-			return obj;
+		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
+			IEObjectConsumer param = createEObjectConsumer((EObject)value);
+			if(param.isInstanceOf(grammarAccess.getOperationAccess().getParamTypesTypeCrossReference_4_1_1_0().getType().getClassifier())) {
+				type = AssignmentType.CROSS_REFERENCE;
+				element = grammarAccess.getOperationAccess().getParamTypesTypeCrossReference_4_1_1_0(); 
+				return obj;
+			}
 		}
 		return null;
 	}
@@ -3148,7 +3162,7 @@ protected class Operation_RightParenthesisKeyword_5 extends KeywordToken  {
 
 }
 
-// (":" type=Type)?
+// (":" type=[types::Type|FQN])?
 protected class Operation_Group_6 extends GroupToken {
 	
 	public Operation_Group_6(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -3192,7 +3206,7 @@ protected class Operation_ColonKeyword_6_0 extends KeywordToken  {
 
 }
 
-// type=Type
+// type=[types::Type|FQN]
 protected class Operation_TypeAssignment_6_1 extends AssignmentToken  {
 	
 	public Operation_TypeAssignment_6_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -3216,10 +3230,13 @@ protected class Operation_TypeAssignment_6_1 extends AssignmentToken  {
 	public IEObjectConsumer tryConsume() {
 		if((value = eObjectConsumer.getConsumable("type",false)) == null) return null;
 		IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("type");
-		if(enumLitSerializer.isValid(obj.getEObject(), grammarAccess.getOperationAccess().getTypeTypeEnumRuleCall_6_1_0(), value, null)) { 
-			type = AssignmentType.ENUM_RULE_CALL;
-			element = grammarAccess.getOperationAccess().getTypeTypeEnumRuleCall_6_1_0();
-			return obj;
+		if(value instanceof EObject) { // org::eclipse::xtext::impl::CrossReferenceImpl
+			IEObjectConsumer param = createEObjectConsumer((EObject)value);
+			if(param.isInstanceOf(grammarAccess.getOperationAccess().getTypeTypeCrossReference_6_1_0().getType().getClassifier())) {
+				type = AssignmentType.CROSS_REFERENCE;
+				element = grammarAccess.getOperationAccess().getTypeTypeCrossReference_6_1_0(); 
+				return obj;
+			}
 		}
 		return null;
 	}
@@ -3233,7 +3250,7 @@ protected class Operation_TypeAssignment_6_1 extends AssignmentToken  {
 
 /************ begin Rule Entrypoint ****************
  *
- * / * ---- entrypoint definition ---- * / Entrypoint returns sct::Declaration:
+ * / * ---- entrypoint definition ---- * / Entrypoint returns sgraph::Declaration:
  * 	{Entrypoint} "entrypoint" name=ID;
  *
  **/
@@ -3355,7 +3372,7 @@ protected class Entrypoint_NameAssignment_2 extends AssignmentToken  {
 
 /************ begin Rule Exitpoint ****************
  *
- * / * ---- exitpoint definition ---- * / Exitpoint returns sct::Declaration:
+ * / * ---- exitpoint definition ---- * / Exitpoint returns sgraph::Declaration:
  * 	{Exitpoint} "exitpoint" name=ID;
  *
  **/
@@ -3480,7 +3497,7 @@ protected class Exitpoint_NameAssignment_2 extends AssignmentToken  {
  *
  * / * ---- reaction rules ----
  * Define the structure of reactions that are central for describing the statecharts behavior. 
- * * / Reaction returns sct::Reaction:
+ * * / Reaction returns sgraph::Reaction:
  * 	LocalReaction | TransitionReaction;
  *
  **/
@@ -4162,7 +4179,7 @@ protected class TransitionReaction_PropertiesAssignment_3_1 extends AssignmentTo
 
 /************ begin Rule ReactionTrigger ****************
  *
- * ReactionTrigger returns sct::Trigger:
+ * ReactionTrigger returns sgraph::Trigger:
  * 	{ReactionTrigger} (triggers+=EventSpec ("," triggers+=EventSpec)* ("[" guardExpression=Expression "]")? | "["
  * 	guardExpression=Expression "]");
  *
@@ -4645,7 +4662,7 @@ protected class ReactionTrigger_RightSquareBracketKeyword_1_1_2 extends KeywordT
 
 /************ begin Rule ReactionEffect ****************
  *
- * ReactionEffect returns sct::Effect:
+ * ReactionEffect returns sgraph::Effect:
  * 	{ReactionEffect} actions+=Statement (";" actions+=Statement)* ";"?;
  *
  **/
@@ -5518,11 +5535,11 @@ protected class EventSpec_BuiltinEventSpecParserRuleCall_2 extends RuleCallToken
 /************ begin Rule RegularEventSpec ****************
  *
  * RegularEventSpec:
- * 	event=[sct::Event|FQN];
+ * 	event=[sgraph::Event|FQN];
  *
  **/
 
-// event=[sct::Event|FQN]
+// event=[sgraph::Event|FQN]
 protected class RegularEventSpec_EventAssignment extends AssignmentToken  {
 	
 	public RegularEventSpec_EventAssignment(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -6400,7 +6417,7 @@ protected class DefaultEvent_DefaultKeyword_1_0 extends KeywordToken  {
 
 /************ begin Rule Statement ****************
  *
- * / * --- statements --- * / Statement returns sct::Statement:
+ * / * --- statements --- * / Statement returns sgraph::Statement:
  * 	Assignment | EventRaising | OperationCall;
  *
  **/
@@ -6553,11 +6570,11 @@ protected class Statement_OperationCallParserRuleCall_2 extends RuleCallToken {
 /************ begin Rule Assignment ****************
  *
  * Assignment:
- * 	varRef=[sct::Variable|FQN] operator=AssignmentOperator expression=Expression;
+ * 	varRef=[sgraph::Variable|FQN] operator=AssignmentOperator expression=Expression;
  *
  **/
 
-// varRef=[sct::Variable|FQN] operator=AssignmentOperator expression=Expression
+// varRef=[sgraph::Variable|FQN] operator=AssignmentOperator expression=Expression
 protected class Assignment_Group extends GroupToken {
 	
 	public Assignment_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -6586,7 +6603,7 @@ protected class Assignment_Group extends GroupToken {
 
 }
 
-// varRef=[sct::Variable|FQN]
+// varRef=[sgraph::Variable|FQN]
 protected class Assignment_VarRefAssignment_0 extends AssignmentToken  {
 	
 	public Assignment_VarRefAssignment_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -6709,11 +6726,11 @@ protected class Assignment_ExpressionAssignment_2 extends AssignmentToken  {
 /************ begin Rule EventRaising ****************
  *
  * EventRaising:
- * 	"raise" event=[sct::Event|FQN] (":" value=Expression)?;
+ * 	"raise" event=[sgraph::Event|FQN] (":" value=Expression)?;
  *
  **/
 
-// "raise" event=[sct::Event|FQN] (":" value=Expression)?
+// "raise" event=[sgraph::Event|FQN] (":" value=Expression)?
 protected class EventRaising_Group extends GroupToken {
 	
 	public EventRaising_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -6764,7 +6781,7 @@ protected class EventRaising_RaiseKeyword_0 extends KeywordToken  {
 
 }
 
-// event=[sct::Event|FQN]
+// event=[sgraph::Event|FQN]
 protected class EventRaising_EventAssignment_1 extends AssignmentToken  {
 	
 	public EventRaising_EventAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -10316,11 +10333,11 @@ protected class PrimitiveValueExpression_ValueAssignment_1 extends AssignmentTok
 /************ begin Rule ElementReferenceExpression ****************
  *
  * ElementReferenceExpression:
- * 	{ElementReferenceExpression} value=[sct::Declaration|FQN];
+ * 	{ElementReferenceExpression} value=[sgraph::Declaration|FQN];
  *
  **/
 
-// {ElementReferenceExpression} value=[sct::Declaration|FQN]
+// {ElementReferenceExpression} value=[sgraph::Declaration|FQN]
 protected class ElementReferenceExpression_Group extends GroupToken {
 	
 	public ElementReferenceExpression_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -10375,7 +10392,7 @@ protected class ElementReferenceExpression_ElementReferenceExpressionAction_0 ex
 	}
 }
 
-// value=[sct::Declaration|FQN]
+// value=[sgraph::Declaration|FQN]
 protected class ElementReferenceExpression_ValueAssignment_1 extends AssignmentToken  {
 	
 	public ElementReferenceExpression_ValueAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -10419,11 +10436,11 @@ protected class ElementReferenceExpression_ValueAssignment_1 extends AssignmentT
 /************ begin Rule EventValueReferenceExpression ****************
  *
  * EventValueReferenceExpression:
- * 	{EventValueReferenceExpression} "valueof" "(" value=[sct::Event|FQN] ")";
+ * 	{EventValueReferenceExpression} "valueof" "(" value=[sgraph::Event|FQN] ")";
  *
  **/
 
-// {EventValueReferenceExpression} "valueof" "(" value=[sct::Event|FQN] ")"
+// {EventValueReferenceExpression} "valueof" "(" value=[sgraph::Event|FQN] ")"
 protected class EventValueReferenceExpression_Group extends GroupToken {
 	
 	public EventValueReferenceExpression_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -10522,7 +10539,7 @@ protected class EventValueReferenceExpression_LeftParenthesisKeyword_2 extends K
 
 }
 
-// value=[sct::Event|FQN]
+// value=[sgraph::Event|FQN]
 protected class EventValueReferenceExpression_ValueAssignment_3 extends AssignmentToken  {
 	
 	public EventValueReferenceExpression_ValueAssignment_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -10588,11 +10605,11 @@ protected class EventValueReferenceExpression_RightParenthesisKeyword_4 extends
 /************ begin Rule EventRaisedReferenceExpression ****************
  *
  * EventRaisedReferenceExpression:
- * 	{EventRaisedReferenceExpression} "raised" "(" value=[sct::Event|FQN] ")";
+ * 	{EventRaisedReferenceExpression} "raised" "(" value=[sgraph::Event|FQN] ")";
  *
  **/
 
-// {EventRaisedReferenceExpression} "raised" "(" value=[sct::Event|FQN] ")"
+// {EventRaisedReferenceExpression} "raised" "(" value=[sgraph::Event|FQN] ")"
 protected class EventRaisedReferenceExpression_Group extends GroupToken {
 	
 	public EventRaisedReferenceExpression_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -10691,7 +10708,7 @@ protected class EventRaisedReferenceExpression_LeftParenthesisKeyword_2 extends
 
 }
 
-// value=[sct::Event|FQN]
+// value=[sgraph::Event|FQN]
 protected class EventRaisedReferenceExpression_ValueAssignment_3 extends AssignmentToken  {
 	
 	public EventRaisedReferenceExpression_ValueAssignment_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -10757,11 +10774,11 @@ protected class EventRaisedReferenceExpression_RightParenthesisKeyword_4 extends
 /************ begin Rule ActiveStateReferenceExpression ****************
  *
  * ActiveStateReferenceExpression:
- * 	{ActiveStateReferenceExpression} "active" "(" value=[sct::RegularState|FQN] ")";
+ * 	{ActiveStateReferenceExpression} "active" "(" value=[sgraph::RegularState|FQN] ")";
  *
  **/
 
-// {ActiveStateReferenceExpression} "active" "(" value=[sct::RegularState|FQN] ")"
+// {ActiveStateReferenceExpression} "active" "(" value=[sgraph::RegularState|FQN] ")"
 protected class ActiveStateReferenceExpression_Group extends GroupToken {
 	
 	public ActiveStateReferenceExpression_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@@ -10860,7 +10877,7 @@ protected class ActiveStateReferenceExpression_LeftParenthesisKeyword_2 extends
 
 }
 
-// value=[sct::RegularState|FQN]
+// value=[sgraph::RegularState|FQN]
 protected class ActiveStateReferenceExpression_ValueAssignment_3 extends AssignmentToken  {
 	
 	public ActiveStateReferenceExpression_ValueAssignment_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {

+ 35 - 87
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g

@@ -835,18 +835,15 @@ ruleEventDefinition returns [EObject current=null]
     }
 (
 (
+		{
+			if ($current==null) {
+	            $current = createModelElement(grammarAccess.getEventDefinitionRule());
+	        }
+        }
 		{ 
-	        newCompositeNode(grammarAccess.getEventDefinitionAccess().getTypeTypeEnumRuleCall_4_1_0()); 
+	        newCompositeNode(grammarAccess.getEventDefinitionAccess().getTypeTypeCrossReference_4_1_0()); 
 	    }
-		lv_type_5_0=ruleType		{
-	        if ($current==null) {
-	            $current = createModelElementForParent(grammarAccess.getEventDefinitionRule());
-	        }
-       		set(
-       			$current, 
-       			"type",
-        		lv_type_5_0, 
-        		"Type");
+		ruleFQN		{ 
 	        afterParserOrEnumRuleCall();
 	    }
 
@@ -1059,18 +1056,15 @@ ruleVariableDefinition returns [EObject current=null]
     }
 (
 (
+		{
+			if ($current==null) {
+	            $current = createModelElement(grammarAccess.getVariableDefinitionRule());
+	        }
+        }
 		{ 
-	        newCompositeNode(grammarAccess.getVariableDefinitionAccess().getTypeTypeEnumRuleCall_5_0()); 
+	        newCompositeNode(grammarAccess.getVariableDefinitionAccess().getTypeTypeCrossReference_5_0()); 
 	    }
-		lv_type_7_0=ruleType		{
-	        if ($current==null) {
-	            $current = createModelElementForParent(grammarAccess.getVariableDefinitionRule());
-	        }
-       		set(
-       			$current, 
-       			"type",
-        		lv_type_7_0, 
-        		"Type");
+		ruleFQN		{ 
 	        afterParserOrEnumRuleCall();
 	    }
 
@@ -1152,18 +1146,15 @@ ruleOperation returns [EObject current=null]
     }
 ((
 (
+		{
+			if ($current==null) {
+	            $current = createModelElement(grammarAccess.getOperationRule());
+	        }
+        }
 		{ 
-	        newCompositeNode(grammarAccess.getOperationAccess().getParamTypesTypeEnumRuleCall_4_0_0()); 
+	        newCompositeNode(grammarAccess.getOperationAccess().getParamTypesTypeCrossReference_4_0_0()); 
 	    }
-		lv_paramTypes_4_0=ruleType		{
-	        if ($current==null) {
-	            $current = createModelElementForParent(grammarAccess.getOperationRule());
-	        }
-       		add(
-       			$current, 
-       			"paramTypes",
-        		lv_paramTypes_4_0, 
-        		"Type");
+		ruleFQN		{ 
 	        afterParserOrEnumRuleCall();
 	    }
 
@@ -1174,18 +1165,15 @@ ruleOperation returns [EObject current=null]
     }
 (
 (
+		{
+			if ($current==null) {
+	            $current = createModelElement(grammarAccess.getOperationRule());
+	        }
+        }
 		{ 
-	        newCompositeNode(grammarAccess.getOperationAccess().getParamTypesTypeEnumRuleCall_4_1_1_0()); 
+	        newCompositeNode(grammarAccess.getOperationAccess().getParamTypesTypeCrossReference_4_1_1_0()); 
 	    }
-		lv_paramTypes_6_0=ruleType		{
-	        if ($current==null) {
-	            $current = createModelElementForParent(grammarAccess.getOperationRule());
-	        }
-       		add(
-       			$current, 
-       			"paramTypes",
-        		lv_paramTypes_6_0, 
-        		"Type");
+		ruleFQN		{ 
 	        afterParserOrEnumRuleCall();
 	    }
 
@@ -1200,18 +1188,15 @@ ruleOperation returns [EObject current=null]
     }
 (
 (
+		{
+			if ($current==null) {
+	            $current = createModelElement(grammarAccess.getOperationRule());
+	        }
+        }
 		{ 
-	        newCompositeNode(grammarAccess.getOperationAccess().getTypeTypeEnumRuleCall_6_1_0()); 
+	        newCompositeNode(grammarAccess.getOperationAccess().getTypeTypeCrossReference_6_1_0()); 
 	    }
-		lv_type_9_0=ruleType		{
-	        if ($current==null) {
-	            $current = createModelElementForParent(grammarAccess.getOperationRule());
-	        }
-       		set(
-       			$current, 
-       			"type",
-        		lv_type_9_0, 
-        		"Type");
+		ruleFQN		{ 
 	        afterParserOrEnumRuleCall();
 	    }
 
@@ -4317,43 +4302,6 @@ ruleTimeUnit returns [Enumerator current=null]
 
 
 
-// Rule Type
-ruleType returns [Enumerator current=null] 
-    @init { enterRule(); }
-    @after { leaveRule(); }:
-((	enumLiteral_0='void' 
-	{
-        $current = grammarAccess.getTypeAccess().getVoidEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
-        newLeafNode(enumLiteral_0, grammarAccess.getTypeAccess().getVoidEnumLiteralDeclaration_0()); 
-    }
-)
-    |(	enumLiteral_1='integer' 
-	{
-        $current = grammarAccess.getTypeAccess().getIntegerEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
-        newLeafNode(enumLiteral_1, grammarAccess.getTypeAccess().getIntegerEnumLiteralDeclaration_1()); 
-    }
-)
-    |(	enumLiteral_2='real' 
-	{
-        $current = grammarAccess.getTypeAccess().getRealEnumLiteralDeclaration_2().getEnumLiteral().getInstance();
-        newLeafNode(enumLiteral_2, grammarAccess.getTypeAccess().getRealEnumLiteralDeclaration_2()); 
-    }
-)
-    |(	enumLiteral_3='boolean' 
-	{
-        $current = grammarAccess.getTypeAccess().getBooleanEnumLiteralDeclaration_3().getEnumLiteral().getInstance();
-        newLeafNode(enumLiteral_3, grammarAccess.getTypeAccess().getBooleanEnumLiteralDeclaration_3()); 
-    }
-)
-    |(	enumLiteral_4='string' 
-	{
-        $current = grammarAccess.getTypeAccess().getStringEnumLiteralDeclaration_4().getEnumLiteral().getInstance();
-        newLeafNode(enumLiteral_4, grammarAccess.getTypeAccess().getStringEnumLiteralDeclaration_4()); 
-    }
-));
-
-
-
 RULE_BOOL : ('true'|'false'|'yes'|'no');
 
 RULE_HEX : '0' ('x'|'X') ('0'..'9'|'a'..'f'|'A'..'F')+;

+ 0 - 10
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.tokens

@@ -29,7 +29,6 @@ RULE_HEX=8
 T__58=58
 T__16=16
 T__51=51
-T__90=90
 T__15=15
 T__52=52
 T__18=18
@@ -58,10 +57,6 @@ RULE_FLOAT=7
 T__85=85
 RULE_SL_COMMENT=11
 T__84=84
-T__87=87
-T__86=86
-T__89=89
-T__88=88
 RULE_ML_COMMENT=10
 T__30=30
 T__31=31
@@ -92,9 +87,7 @@ T__77=77
 '~'=77
 '=='=81
 '/'=33
-'string'=90
 '/='=62
-'integer'=87
 '%='=63
 '>'=38
 'event'=21
@@ -112,7 +105,6 @@ T__77=77
 '+='=64
 'readonly'=24
 '>>='=67
-'void'=86
 '?'=46
 'var'=23
 's'=83
@@ -127,7 +119,6 @@ T__77=77
 '-='=65
 '<<='=66
 ']'=36
-'real'=88
 'ns'=85
 '!'=49
 '|'=51
@@ -146,7 +137,6 @@ T__77=77
 '%'=76
 'operation'=26
 'after'=59
-'boolean'=89
 'entrypoint'=30
 'namespace'=17
 '<<'=71

Fichier diff supprimé car celui-ci est trop grand
+ 286 - 466
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSTextLexer.java


Fichier diff supprimé car celui-ci est trop grand
+ 1710 - 1905
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSTextParser.java


+ 120 - 160
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/services/STextGrammarAccess.java

@@ -214,7 +214,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		
 		/// * ---- scope rules ----
 		//Defines different kinds of scopes that contain element definitions. Scopes are used for element definitions in statechart, regions, and state 
-		// * / Scope returns sct::Scope:
+		// * / Scope returns sgraph::Scope:
 		//	StateScope | StatechartScope;
 		public ParserRule getRule() { return rule; }
 
@@ -239,7 +239,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final RuleCall cDeclarationsExitpointParserRuleCall_1_0_2 = (RuleCall)cDeclarationsAlternatives_1_0.eContents().get(2);
 		
 		//// a SimpleScope is used for states and regions
-		//StateScope returns sct::Scope:
+		//StateScope returns sgraph::Scope:
 		//	{SimpleScope} declarations+=(LocalReaction | Entrypoint | Exitpoint)*;
 		public ParserRule getRule() { return rule; }
 
@@ -272,7 +272,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final RuleCall cInternalScopeParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
 		
 		//// defines the poosible scopes for statecharts
-		//StatechartScope returns sct::Scope:
+		//StatechartScope returns sgraph::Scope:
 		//	InterfaceScope | InternalScope;
 		public ParserRule getRule() { return rule; }
 
@@ -301,7 +301,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final RuleCall cDeclarationsEntrypointParserRuleCall_4_0_2 = (RuleCall)cDeclarationsAlternatives_4_0.eContents().get(2);
 		private final RuleCall cDeclarationsExitpointParserRuleCall_4_0_3 = (RuleCall)cDeclarationsAlternatives_4_0.eContents().get(3);
 		
-		//InterfaceScope returns sct::Scope:
+		//InterfaceScope returns sgraph::Scope:
 		//	{InterfaceScope} "interface" name=ID? ":" declarations+=(EventDefinition | VariableDefinition | Entrypoint |
 		//	Exitpoint)*;
 		public ParserRule getRule() { return rule; }
@@ -356,7 +356,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final RuleCall cDeclarationsOperationParserRuleCall_3_0_2 = (RuleCall)cDeclarationsAlternatives_3_0.eContents().get(2);
 		private final RuleCall cDeclarationsLocalReactionParserRuleCall_3_0_3 = (RuleCall)cDeclarationsAlternatives_3_0.eContents().get(3);
 		
-		//InternalScope returns sct::Scope:
+		//InternalScope returns sgraph::Scope:
 		//	{InternalScope} "internal" ":" declarations+=(EventDefinition | VariableDefinition | Operation | LocalReaction)*;
 		public ParserRule getRule() { return rule; }
 
@@ -402,7 +402,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final RuleCall cExitpointParserRuleCall_5 = (RuleCall)cAlternatives.eContents().get(5);
 		
 		/// * ---- declarations ----
-		//a definition is a top level element of a definition scope. * / Declaration returns sct::Declaration:
+		//a definition is a top level element of a definition scope. * / Declaration returns sgraph::Declaration:
 		//	EventDefinition | VariableDefinition | Operation | LocalReaction | Entrypoint | Exitpoint;
 		public ParserRule getRule() { return rule; }
 
@@ -440,16 +440,17 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final Group cGroup_4 = (Group)cGroup.eContents().get(4);
 		private final Keyword cColonKeyword_4_0 = (Keyword)cGroup_4.eContents().get(0);
 		private final Assignment cTypeAssignment_4_1 = (Assignment)cGroup_4.eContents().get(1);
-		private final RuleCall cTypeTypeEnumRuleCall_4_1_0 = (RuleCall)cTypeAssignment_4_1.eContents().get(0);
+		private final CrossReference cTypeTypeCrossReference_4_1_0 = (CrossReference)cTypeAssignment_4_1.eContents().get(0);
+		private final RuleCall cTypeTypeFQNParserRuleCall_4_1_0_1 = (RuleCall)cTypeTypeCrossReference_4_1_0.eContents().get(1);
 		private final Assignment cDerivationAssignment_5 = (Assignment)cGroup.eContents().get(5);
 		private final RuleCall cDerivationEventDerivationParserRuleCall_5_0 = (RuleCall)cDerivationAssignment_5.eContents().get(0);
 		
 		//// DataElement: EventDefinition | VariableDefinition;
-		/// * ---- event definition ---- * / EventDefinition returns sct::Event:
-		//	{EventDefinition} direction=Direction? "event" name=ID (":" type=Type)? derivation=EventDerivation?;
+		/// * ---- event definition ---- * / EventDefinition returns sgraph::Event:
+		//	{EventDefinition} direction=Direction? "event" name=ID (":" type=[types::Type|FQN])? derivation=EventDerivation?;
 		public ParserRule getRule() { return rule; }
 
-		//{EventDefinition} direction=Direction? "event" name=ID (":" type=Type)? derivation=EventDerivation?
+		//{EventDefinition} direction=Direction? "event" name=ID (":" type=[types::Type|FQN])? derivation=EventDerivation?
 		public Group getGroup() { return cGroup; }
 
 		//{EventDefinition}
@@ -470,17 +471,20 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		//ID
 		public RuleCall getNameIDTerminalRuleCall_3_0() { return cNameIDTerminalRuleCall_3_0; }
 
-		//(":" type=Type)?
+		//(":" type=[types::Type|FQN])?
 		public Group getGroup_4() { return cGroup_4; }
 
 		//":"
 		public Keyword getColonKeyword_4_0() { return cColonKeyword_4_0; }
 
-		//type=Type
+		//type=[types::Type|FQN]
 		public Assignment getTypeAssignment_4_1() { return cTypeAssignment_4_1; }
 
-		//Type
-		public RuleCall getTypeTypeEnumRuleCall_4_1_0() { return cTypeTypeEnumRuleCall_4_1_0; }
+		//[types::Type|FQN]
+		public CrossReference getTypeTypeCrossReference_4_1_0() { return cTypeTypeCrossReference_4_1_0; }
+
+		//FQN
+		public RuleCall getTypeTypeFQNParserRuleCall_4_1_0_1() { return cTypeTypeFQNParserRuleCall_4_1_0_1; }
 
 		//derivation=EventDerivation?
 		public Assignment getDerivationAssignment_5() { return cDerivationAssignment_5; }
@@ -543,18 +547,19 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final RuleCall cNameIDTerminalRuleCall_3_0 = (RuleCall)cNameAssignment_3.eContents().get(0);
 		private final Keyword cColonKeyword_4 = (Keyword)cGroup.eContents().get(4);
 		private final Assignment cTypeAssignment_5 = (Assignment)cGroup.eContents().get(5);
-		private final RuleCall cTypeTypeEnumRuleCall_5_0 = (RuleCall)cTypeAssignment_5.eContents().get(0);
+		private final CrossReference cTypeTypeCrossReference_5_0 = (CrossReference)cTypeAssignment_5.eContents().get(0);
+		private final RuleCall cTypeTypeFQNParserRuleCall_5_0_1 = (RuleCall)cTypeTypeCrossReference_5_0.eContents().get(1);
 		private final Group cGroup_6 = (Group)cGroup.eContents().get(6);
 		private final Keyword cEqualsSignKeyword_6_0 = (Keyword)cGroup_6.eContents().get(0);
 		private final Assignment cInitialValueAssignment_6_1 = (Assignment)cGroup_6.eContents().get(1);
 		private final RuleCall cInitialValueExpressionParserRuleCall_6_1_0 = (RuleCall)cInitialValueAssignment_6_1.eContents().get(0);
 		
-		/// * ---- variable definition ---- * / VariableDefinition returns sct::Variable:
-		//	{VariableDefinition} "var" (readonly?="readonly"? & external?="external"?) name=ID ":" type=Type ("="
+		/// * ---- variable definition ---- * / VariableDefinition returns sgraph::Variable:
+		//	{VariableDefinition} "var" (readonly?="readonly"? & external?="external"?) name=ID ":" type=[types::Type|FQN] ("="
 		//	initialValue=Expression)?;
 		public ParserRule getRule() { return rule; }
 
-		//{VariableDefinition} "var" (readonly?="readonly"? & external?="external"?) name=ID ":" type=Type ("="
+		//{VariableDefinition} "var" (readonly?="readonly"? & external?="external"?) name=ID ":" type=[types::Type|FQN] ("="
 		//initialValue=Expression)?
 		public Group getGroup() { return cGroup; }
 
@@ -588,11 +593,14 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		//":"
 		public Keyword getColonKeyword_4() { return cColonKeyword_4; }
 
-		//type=Type
+		//type=[types::Type|FQN]
 		public Assignment getTypeAssignment_5() { return cTypeAssignment_5; }
 
-		//Type
-		public RuleCall getTypeTypeEnumRuleCall_5_0() { return cTypeTypeEnumRuleCall_5_0; }
+		//[types::Type|FQN]
+		public CrossReference getTypeTypeCrossReference_5_0() { return cTypeTypeCrossReference_5_0; }
+
+		//FQN
+		public RuleCall getTypeTypeFQNParserRuleCall_5_0_1() { return cTypeTypeFQNParserRuleCall_5_0_1; }
 
 		//("=" initialValue=Expression)?
 		public Group getGroup_6() { return cGroup_6; }
@@ -617,22 +625,27 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final Keyword cLeftParenthesisKeyword_3 = (Keyword)cGroup.eContents().get(3);
 		private final Group cGroup_4 = (Group)cGroup.eContents().get(4);
 		private final Assignment cParamTypesAssignment_4_0 = (Assignment)cGroup_4.eContents().get(0);
-		private final RuleCall cParamTypesTypeEnumRuleCall_4_0_0 = (RuleCall)cParamTypesAssignment_4_0.eContents().get(0);
+		private final CrossReference cParamTypesTypeCrossReference_4_0_0 = (CrossReference)cParamTypesAssignment_4_0.eContents().get(0);
+		private final RuleCall cParamTypesTypeFQNParserRuleCall_4_0_0_1 = (RuleCall)cParamTypesTypeCrossReference_4_0_0.eContents().get(1);
 		private final Group cGroup_4_1 = (Group)cGroup_4.eContents().get(1);
 		private final Keyword cCommaKeyword_4_1_0 = (Keyword)cGroup_4_1.eContents().get(0);
 		private final Assignment cParamTypesAssignment_4_1_1 = (Assignment)cGroup_4_1.eContents().get(1);
-		private final RuleCall cParamTypesTypeEnumRuleCall_4_1_1_0 = (RuleCall)cParamTypesAssignment_4_1_1.eContents().get(0);
+		private final CrossReference cParamTypesTypeCrossReference_4_1_1_0 = (CrossReference)cParamTypesAssignment_4_1_1.eContents().get(0);
+		private final RuleCall cParamTypesTypeFQNParserRuleCall_4_1_1_0_1 = (RuleCall)cParamTypesTypeCrossReference_4_1_1_0.eContents().get(1);
 		private final Keyword cRightParenthesisKeyword_5 = (Keyword)cGroup.eContents().get(5);
 		private final Group cGroup_6 = (Group)cGroup.eContents().get(6);
 		private final Keyword cColonKeyword_6_0 = (Keyword)cGroup_6.eContents().get(0);
 		private final Assignment cTypeAssignment_6_1 = (Assignment)cGroup_6.eContents().get(1);
-		private final RuleCall cTypeTypeEnumRuleCall_6_1_0 = (RuleCall)cTypeAssignment_6_1.eContents().get(0);
+		private final CrossReference cTypeTypeCrossReference_6_1_0 = (CrossReference)cTypeAssignment_6_1.eContents().get(0);
+		private final RuleCall cTypeTypeFQNParserRuleCall_6_1_0_1 = (RuleCall)cTypeTypeCrossReference_6_1_0.eContents().get(1);
 		
-		/// * ---- operation definition ---- * / Operation returns sct::Declaration:
-		//	{Operation} "operation" name=ID "(" (paramTypes+=Type ("," paramTypes+=Type)*)? ")" (":" type=Type)?;
+		/// * ---- operation definition ---- * / Operation returns sgraph::Declaration:
+		//	{Operation} "operation" name=ID "(" (paramTypes+=[types::Type|FQN] ("," paramTypes+=[types::Type|FQN])*)? ")" (":"
+		//	type=[types::Type|FQN])?;
 		public ParserRule getRule() { return rule; }
 
-		//{Operation} "operation" name=ID "(" (paramTypes+=Type ("," paramTypes+=Type)*)? ")" (":" type=Type)?
+		//{Operation} "operation" name=ID "(" (paramTypes+=[types::Type|FQN] ("," paramTypes+=[types::Type|FQN])*)? ")" (":"
+		//type=[types::Type|FQN])?
 		public Group getGroup() { return cGroup; }
 
 		//{Operation}
@@ -650,41 +663,50 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		//"("
 		public Keyword getLeftParenthesisKeyword_3() { return cLeftParenthesisKeyword_3; }
 
-		//(paramTypes+=Type ("," paramTypes+=Type)*)?
+		//(paramTypes+=[types::Type|FQN] ("," paramTypes+=[types::Type|FQN])*)?
 		public Group getGroup_4() { return cGroup_4; }
 
-		//paramTypes+=Type
+		//paramTypes+=[types::Type|FQN]
 		public Assignment getParamTypesAssignment_4_0() { return cParamTypesAssignment_4_0; }
 
-		//Type
-		public RuleCall getParamTypesTypeEnumRuleCall_4_0_0() { return cParamTypesTypeEnumRuleCall_4_0_0; }
+		//[types::Type|FQN]
+		public CrossReference getParamTypesTypeCrossReference_4_0_0() { return cParamTypesTypeCrossReference_4_0_0; }
 
-		//("," paramTypes+=Type)*
+		//FQN
+		public RuleCall getParamTypesTypeFQNParserRuleCall_4_0_0_1() { return cParamTypesTypeFQNParserRuleCall_4_0_0_1; }
+
+		//("," paramTypes+=[types::Type|FQN])*
 		public Group getGroup_4_1() { return cGroup_4_1; }
 
 		//","
 		public Keyword getCommaKeyword_4_1_0() { return cCommaKeyword_4_1_0; }
 
-		//paramTypes+=Type
+		//paramTypes+=[types::Type|FQN]
 		public Assignment getParamTypesAssignment_4_1_1() { return cParamTypesAssignment_4_1_1; }
 
-		//Type
-		public RuleCall getParamTypesTypeEnumRuleCall_4_1_1_0() { return cParamTypesTypeEnumRuleCall_4_1_1_0; }
+		//[types::Type|FQN]
+		public CrossReference getParamTypesTypeCrossReference_4_1_1_0() { return cParamTypesTypeCrossReference_4_1_1_0; }
+
+		//FQN
+		public RuleCall getParamTypesTypeFQNParserRuleCall_4_1_1_0_1() { return cParamTypesTypeFQNParserRuleCall_4_1_1_0_1; }
 
 		//")"
 		public Keyword getRightParenthesisKeyword_5() { return cRightParenthesisKeyword_5; }
 
-		//(":" type=Type)?
+		//(":" type=[types::Type|FQN])?
 		public Group getGroup_6() { return cGroup_6; }
 
 		//":"
 		public Keyword getColonKeyword_6_0() { return cColonKeyword_6_0; }
 
-		//type=Type
+		//type=[types::Type|FQN]
 		public Assignment getTypeAssignment_6_1() { return cTypeAssignment_6_1; }
 
-		//Type
-		public RuleCall getTypeTypeEnumRuleCall_6_1_0() { return cTypeTypeEnumRuleCall_6_1_0; }
+		//[types::Type|FQN]
+		public CrossReference getTypeTypeCrossReference_6_1_0() { return cTypeTypeCrossReference_6_1_0; }
+
+		//FQN
+		public RuleCall getTypeTypeFQNParserRuleCall_6_1_0_1() { return cTypeTypeFQNParserRuleCall_6_1_0_1; }
 	}
 
 	public class EntrypointElements extends AbstractParserRuleElementFinder {
@@ -695,7 +717,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final Assignment cNameAssignment_2 = (Assignment)cGroup.eContents().get(2);
 		private final RuleCall cNameIDTerminalRuleCall_2_0 = (RuleCall)cNameAssignment_2.eContents().get(0);
 		
-		/// * ---- entrypoint definition ---- * / Entrypoint returns sct::Declaration:
+		/// * ---- entrypoint definition ---- * / Entrypoint returns sgraph::Declaration:
 		//	{Entrypoint} "entrypoint" name=ID;
 		public ParserRule getRule() { return rule; }
 
@@ -723,7 +745,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final Assignment cNameAssignment_2 = (Assignment)cGroup.eContents().get(2);
 		private final RuleCall cNameIDTerminalRuleCall_2_0 = (RuleCall)cNameAssignment_2.eContents().get(0);
 		
-		/// * ---- exitpoint definition ---- * / Exitpoint returns sct::Declaration:
+		/// * ---- exitpoint definition ---- * / Exitpoint returns sgraph::Declaration:
 		//	{Exitpoint} "exitpoint" name=ID;
 		public ParserRule getRule() { return rule; }
 
@@ -779,7 +801,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		
 		/// * ---- reaction rules ----
 		//Define the structure of reactions that are central for describing the statecharts behavior. 
-		// * / Reaction returns sct::Reaction:
+		// * / Reaction returns sgraph::Reaction:
 		//	LocalReaction | TransitionReaction;
 		public ParserRule getRule() { return rule; }
 
@@ -924,7 +946,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final RuleCall cGuardExpressionExpressionParserRuleCall_1_1_1_0 = (RuleCall)cGuardExpressionAssignment_1_1_1.eContents().get(0);
 		private final Keyword cRightSquareBracketKeyword_1_1_2 = (Keyword)cGroup_1_1.eContents().get(2);
 		
-		//ReactionTrigger returns sct::Trigger:
+		//ReactionTrigger returns sgraph::Trigger:
 		//	{ReactionTrigger} (triggers+=EventSpec ("," triggers+=EventSpec)* ("[" guardExpression=Expression "]")? | "["
 		//	guardExpression=Expression "]");
 		public ParserRule getRule() { return rule; }
@@ -1004,7 +1026,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final RuleCall cActionsStatementParserRuleCall_2_1_0 = (RuleCall)cActionsAssignment_2_1.eContents().get(0);
 		private final Keyword cSemicolonKeyword_3 = (Keyword)cGroup.eContents().get(3);
 		
-		//ReactionEffect returns sct::Effect:
+		//ReactionEffect returns sgraph::Effect:
 		//	{ReactionEffect} actions+=Statement (";" actions+=Statement)* ";"?;
 		public ParserRule getRule() { return rule; }
 
@@ -1187,13 +1209,13 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final RuleCall cEventEventFQNParserRuleCall_0_1 = (RuleCall)cEventEventCrossReference_0.eContents().get(1);
 		
 		//RegularEventSpec:
-		//	event=[sct::Event|FQN];
+		//	event=[sgraph::Event|FQN];
 		public ParserRule getRule() { return rule; }
 
-		//event=[sct::Event|FQN]
+		//event=[sgraph::Event|FQN]
 		public Assignment getEventAssignment() { return cEventAssignment; }
 
-		//[sct::Event|FQN]
+		//[sgraph::Event|FQN]
 		public CrossReference getEventEventCrossReference_0() { return cEventEventCrossReference_0; }
 
 		//FQN
@@ -1385,7 +1407,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final RuleCall cEventRaisingParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
 		private final RuleCall cOperationCallParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2);
 		
-		/// * --- statements --- * / Statement returns sct::Statement:
+		/// * --- statements --- * / Statement returns sgraph::Statement:
 		//	Assignment | EventRaising | OperationCall;
 		public ParserRule getRule() { return rule; }
 
@@ -1414,16 +1436,16 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final RuleCall cExpressionExpressionParserRuleCall_2_0 = (RuleCall)cExpressionAssignment_2.eContents().get(0);
 		
 		//Assignment:
-		//	varRef=[sct::Variable|FQN] operator=AssignmentOperator expression=Expression;
+		//	varRef=[sgraph::Variable|FQN] operator=AssignmentOperator expression=Expression;
 		public ParserRule getRule() { return rule; }
 
-		//varRef=[sct::Variable|FQN] operator=AssignmentOperator expression=Expression
+		//varRef=[sgraph::Variable|FQN] operator=AssignmentOperator expression=Expression
 		public Group getGroup() { return cGroup; }
 
-		//varRef=[sct::Variable|FQN]
+		//varRef=[sgraph::Variable|FQN]
 		public Assignment getVarRefAssignment_0() { return cVarRefAssignment_0; }
 
-		//[sct::Variable|FQN]
+		//[sgraph::Variable|FQN]
 		public CrossReference getVarRefVariableCrossReference_0_0() { return cVarRefVariableCrossReference_0_0; }
 
 		//FQN
@@ -1455,19 +1477,19 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final RuleCall cValueExpressionParserRuleCall_2_1_0 = (RuleCall)cValueAssignment_2_1.eContents().get(0);
 		
 		//EventRaising:
-		//	"raise" event=[sct::Event|FQN] (":" value=Expression)?;
+		//	"raise" event=[sgraph::Event|FQN] (":" value=Expression)?;
 		public ParserRule getRule() { return rule; }
 
-		//"raise" event=[sct::Event|FQN] (":" value=Expression)?
+		//"raise" event=[sgraph::Event|FQN] (":" value=Expression)?
 		public Group getGroup() { return cGroup; }
 
 		//"raise"
 		public Keyword getRaiseKeyword_0() { return cRaiseKeyword_0; }
 
-		//event=[sct::Event|FQN]
+		//event=[sgraph::Event|FQN]
 		public Assignment getEventAssignment_1() { return cEventAssignment_1; }
 
-		//[sct::Event|FQN]
+		//[sgraph::Event|FQN]
 		public CrossReference getEventEventCrossReference_1_0() { return cEventEventCrossReference_1_0; }
 
 		//FQN
@@ -2082,19 +2104,19 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final RuleCall cValueDeclarationFQNParserRuleCall_1_0_1 = (RuleCall)cValueDeclarationCrossReference_1_0.eContents().get(1);
 		
 		//ElementReferenceExpression:
-		//	{ElementReferenceExpression} value=[sct::Declaration|FQN];
+		//	{ElementReferenceExpression} value=[sgraph::Declaration|FQN];
 		public ParserRule getRule() { return rule; }
 
-		//{ElementReferenceExpression} value=[sct::Declaration|FQN]
+		//{ElementReferenceExpression} value=[sgraph::Declaration|FQN]
 		public Group getGroup() { return cGroup; }
 
 		//{ElementReferenceExpression}
 		public Action getElementReferenceExpressionAction_0() { return cElementReferenceExpressionAction_0; }
 
-		//value=[sct::Declaration|FQN]
+		//value=[sgraph::Declaration|FQN]
 		public Assignment getValueAssignment_1() { return cValueAssignment_1; }
 
-		//[sct::Declaration|FQN]
+		//[sgraph::Declaration|FQN]
 		public CrossReference getValueDeclarationCrossReference_1_0() { return cValueDeclarationCrossReference_1_0; }
 
 		//FQN
@@ -2113,10 +2135,10 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final Keyword cRightParenthesisKeyword_4 = (Keyword)cGroup.eContents().get(4);
 		
 		//EventValueReferenceExpression:
-		//	{EventValueReferenceExpression} "valueof" "(" value=[sct::Event|FQN] ")";
+		//	{EventValueReferenceExpression} "valueof" "(" value=[sgraph::Event|FQN] ")";
 		public ParserRule getRule() { return rule; }
 
-		//{EventValueReferenceExpression} "valueof" "(" value=[sct::Event|FQN] ")"
+		//{EventValueReferenceExpression} "valueof" "(" value=[sgraph::Event|FQN] ")"
 		public Group getGroup() { return cGroup; }
 
 		//{EventValueReferenceExpression}
@@ -2128,10 +2150,10 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		//"("
 		public Keyword getLeftParenthesisKeyword_2() { return cLeftParenthesisKeyword_2; }
 
-		//value=[sct::Event|FQN]
+		//value=[sgraph::Event|FQN]
 		public Assignment getValueAssignment_3() { return cValueAssignment_3; }
 
-		//[sct::Event|FQN]
+		//[sgraph::Event|FQN]
 		public CrossReference getValueEventCrossReference_3_0() { return cValueEventCrossReference_3_0; }
 
 		//FQN
@@ -2153,10 +2175,10 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final Keyword cRightParenthesisKeyword_4 = (Keyword)cGroup.eContents().get(4);
 		
 		//EventRaisedReferenceExpression:
-		//	{EventRaisedReferenceExpression} "raised" "(" value=[sct::Event|FQN] ")";
+		//	{EventRaisedReferenceExpression} "raised" "(" value=[sgraph::Event|FQN] ")";
 		public ParserRule getRule() { return rule; }
 
-		//{EventRaisedReferenceExpression} "raised" "(" value=[sct::Event|FQN] ")"
+		//{EventRaisedReferenceExpression} "raised" "(" value=[sgraph::Event|FQN] ")"
 		public Group getGroup() { return cGroup; }
 
 		//{EventRaisedReferenceExpression}
@@ -2168,10 +2190,10 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		//"("
 		public Keyword getLeftParenthesisKeyword_2() { return cLeftParenthesisKeyword_2; }
 
-		//value=[sct::Event|FQN]
+		//value=[sgraph::Event|FQN]
 		public Assignment getValueAssignment_3() { return cValueAssignment_3; }
 
-		//[sct::Event|FQN]
+		//[sgraph::Event|FQN]
 		public CrossReference getValueEventCrossReference_3_0() { return cValueEventCrossReference_3_0; }
 
 		//FQN
@@ -2193,10 +2215,10 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		private final Keyword cRightParenthesisKeyword_4 = (Keyword)cGroup.eContents().get(4);
 		
 		//ActiveStateReferenceExpression:
-		//	{ActiveStateReferenceExpression} "active" "(" value=[sct::RegularState|FQN] ")";
+		//	{ActiveStateReferenceExpression} "active" "(" value=[sgraph::RegularState|FQN] ")";
 		public ParserRule getRule() { return rule; }
 
-		//{ActiveStateReferenceExpression} "active" "(" value=[sct::RegularState|FQN] ")"
+		//{ActiveStateReferenceExpression} "active" "(" value=[sgraph::RegularState|FQN] ")"
 		public Group getGroup() { return cGroup; }
 
 		//{ActiveStateReferenceExpression}
@@ -2208,10 +2230,10 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		//"("
 		public Keyword getLeftParenthesisKeyword_2() { return cLeftParenthesisKeyword_2; }
 
-		//value=[sct::RegularState|FQN]
+		//value=[sgraph::RegularState|FQN]
 		public Assignment getValueAssignment_3() { return cValueAssignment_3; }
 
-		//[sct::RegularState|FQN]
+		//[sgraph::RegularState|FQN]
 		public CrossReference getValueRegularStateCrossReference_3_0() { return cValueRegularStateCrossReference_3_0; }
 
 		//FQN
@@ -2799,58 +2821,6 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		//"ns"
 		public Keyword getNanosecondNsKeyword_2_0() { return cNanosecondNsKeyword_2_0; }
 	}
-
-	public class TypeElements extends AbstractEnumRuleElementFinder {
-		private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "Type");
-		private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
-		private final EnumLiteralDeclaration cVoidEnumLiteralDeclaration_0 = (EnumLiteralDeclaration)cAlternatives.eContents().get(0);
-		private final Keyword cVoidVoidKeyword_0_0 = (Keyword)cVoidEnumLiteralDeclaration_0.eContents().get(0);
-		private final EnumLiteralDeclaration cIntegerEnumLiteralDeclaration_1 = (EnumLiteralDeclaration)cAlternatives.eContents().get(1);
-		private final Keyword cIntegerIntegerKeyword_1_0 = (Keyword)cIntegerEnumLiteralDeclaration_1.eContents().get(0);
-		private final EnumLiteralDeclaration cRealEnumLiteralDeclaration_2 = (EnumLiteralDeclaration)cAlternatives.eContents().get(2);
-		private final Keyword cRealRealKeyword_2_0 = (Keyword)cRealEnumLiteralDeclaration_2.eContents().get(0);
-		private final EnumLiteralDeclaration cBooleanEnumLiteralDeclaration_3 = (EnumLiteralDeclaration)cAlternatives.eContents().get(3);
-		private final Keyword cBooleanBooleanKeyword_3_0 = (Keyword)cBooleanEnumLiteralDeclaration_3.eContents().get(0);
-		private final EnumLiteralDeclaration cStringEnumLiteralDeclaration_4 = (EnumLiteralDeclaration)cAlternatives.eContents().get(4);
-		private final Keyword cStringStringKeyword_4_0 = (Keyword)cStringEnumLiteralDeclaration_4.eContents().get(0);
-		
-		//enum Type:
-		//	void | integer | real | boolean | string;
-		public EnumRule getRule() { return rule; }
-
-		//void | integer | real | boolean | string
-		public Alternatives getAlternatives() { return cAlternatives; }
-
-		//void
-		public EnumLiteralDeclaration getVoidEnumLiteralDeclaration_0() { return cVoidEnumLiteralDeclaration_0; }
-
-		//"void"
-		public Keyword getVoidVoidKeyword_0_0() { return cVoidVoidKeyword_0_0; }
-
-		//integer
-		public EnumLiteralDeclaration getIntegerEnumLiteralDeclaration_1() { return cIntegerEnumLiteralDeclaration_1; }
-
-		//"integer"
-		public Keyword getIntegerIntegerKeyword_1_0() { return cIntegerIntegerKeyword_1_0; }
-
-		//real
-		public EnumLiteralDeclaration getRealEnumLiteralDeclaration_2() { return cRealEnumLiteralDeclaration_2; }
-
-		//"real"
-		public Keyword getRealRealKeyword_2_0() { return cRealRealKeyword_2_0; }
-
-		//boolean
-		public EnumLiteralDeclaration getBooleanEnumLiteralDeclaration_3() { return cBooleanEnumLiteralDeclaration_3; }
-
-		//"boolean"
-		public Keyword getBooleanBooleanKeyword_3_0() { return cBooleanBooleanKeyword_3_0; }
-
-		//string
-		public EnumLiteralDeclaration getStringEnumLiteralDeclaration_4() { return cStringEnumLiteralDeclaration_4; }
-
-		//"string"
-		public Keyword getStringStringKeyword_4_0() { return cStringStringKeyword_4_0; }
-	}
 	
 	private RootElements pRoot;
 	private DefRootElements pDefRoot;
@@ -2918,7 +2888,6 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	private UnaryOperatorElements unknownRuleUnaryOperator;
 	private RelationalOperatorElements unknownRuleRelationalOperator;
 	private TimeUnitElements unknownRuleTimeUnit;
-	private TypeElements unknownRuleType;
 	private ValueExpressionElements pValueExpression;
 	private PrimitiveValueExpressionElements pPrimitiveValueExpression;
 	private ElementReferenceExpressionElements pElementReferenceExpression;
@@ -3043,7 +3012,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 
 	/// * ---- scope rules ----
 	//Defines different kinds of scopes that contain element definitions. Scopes are used for element definitions in statechart, regions, and state 
-	// * / Scope returns sct::Scope:
+	// * / Scope returns sgraph::Scope:
 	//	StateScope | StatechartScope;
 	public ScopeElements getScopeAccess() {
 		return (pScope != null) ? pScope : (pScope = new ScopeElements());
@@ -3054,7 +3023,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	}
 
 	//// a SimpleScope is used for states and regions
-	//StateScope returns sct::Scope:
+	//StateScope returns sgraph::Scope:
 	//	{SimpleScope} declarations+=(LocalReaction | Entrypoint | Exitpoint)*;
 	public StateScopeElements getStateScopeAccess() {
 		return (pStateScope != null) ? pStateScope : (pStateScope = new StateScopeElements());
@@ -3065,7 +3034,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	}
 
 	//// defines the poosible scopes for statecharts
-	//StatechartScope returns sct::Scope:
+	//StatechartScope returns sgraph::Scope:
 	//	InterfaceScope | InternalScope;
 	public StatechartScopeElements getStatechartScopeAccess() {
 		return (pStatechartScope != null) ? pStatechartScope : (pStatechartScope = new StatechartScopeElements());
@@ -3075,7 +3044,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		return getStatechartScopeAccess().getRule();
 	}
 
-	//InterfaceScope returns sct::Scope:
+	//InterfaceScope returns sgraph::Scope:
 	//	{InterfaceScope} "interface" name=ID? ":" declarations+=(EventDefinition | VariableDefinition | Entrypoint |
 	//	Exitpoint)*;
 	public InterfaceScopeElements getInterfaceScopeAccess() {
@@ -3086,7 +3055,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		return getInterfaceScopeAccess().getRule();
 	}
 
-	//InternalScope returns sct::Scope:
+	//InternalScope returns sgraph::Scope:
 	//	{InternalScope} "internal" ":" declarations+=(EventDefinition | VariableDefinition | Operation | LocalReaction)*;
 	public InternalScopeElements getInternalScopeAccess() {
 		return (pInternalScope != null) ? pInternalScope : (pInternalScope = new InternalScopeElements());
@@ -3097,7 +3066,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	}
 
 	/// * ---- declarations ----
-	//a definition is a top level element of a definition scope. * / Declaration returns sct::Declaration:
+	//a definition is a top level element of a definition scope. * / Declaration returns sgraph::Declaration:
 	//	EventDefinition | VariableDefinition | Operation | LocalReaction | Entrypoint | Exitpoint;
 	public DeclarationElements getDeclarationAccess() {
 		return (pDeclaration != null) ? pDeclaration : (pDeclaration = new DeclarationElements());
@@ -3108,8 +3077,8 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	}
 
 	//// DataElement: EventDefinition | VariableDefinition;
-	/// * ---- event definition ---- * / EventDefinition returns sct::Event:
-	//	{EventDefinition} direction=Direction? "event" name=ID (":" type=Type)? derivation=EventDerivation?;
+	/// * ---- event definition ---- * / EventDefinition returns sgraph::Event:
+	//	{EventDefinition} direction=Direction? "event" name=ID (":" type=[types::Type|FQN])? derivation=EventDerivation?;
 	public EventDefinitionElements getEventDefinitionAccess() {
 		return (pEventDefinition != null) ? pEventDefinition : (pEventDefinition = new EventDefinitionElements());
 	}
@@ -3138,8 +3107,8 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		return getDirectionAccess().getRule();
 	}
 
-	/// * ---- variable definition ---- * / VariableDefinition returns sct::Variable:
-	//	{VariableDefinition} "var" (readonly?="readonly"? & external?="external"?) name=ID ":" type=Type ("="
+	/// * ---- variable definition ---- * / VariableDefinition returns sgraph::Variable:
+	//	{VariableDefinition} "var" (readonly?="readonly"? & external?="external"?) name=ID ":" type=[types::Type|FQN] ("="
 	//	initialValue=Expression)?;
 	public VariableDefinitionElements getVariableDefinitionAccess() {
 		return (pVariableDefinition != null) ? pVariableDefinition : (pVariableDefinition = new VariableDefinitionElements());
@@ -3149,8 +3118,9 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		return getVariableDefinitionAccess().getRule();
 	}
 
-	/// * ---- operation definition ---- * / Operation returns sct::Declaration:
-	//	{Operation} "operation" name=ID "(" (paramTypes+=Type ("," paramTypes+=Type)*)? ")" (":" type=Type)?;
+	/// * ---- operation definition ---- * / Operation returns sgraph::Declaration:
+	//	{Operation} "operation" name=ID "(" (paramTypes+=[types::Type|FQN] ("," paramTypes+=[types::Type|FQN])*)? ")" (":"
+	//	type=[types::Type|FQN])?;
 	public OperationElements getOperationAccess() {
 		return (pOperation != null) ? pOperation : (pOperation = new OperationElements());
 	}
@@ -3159,7 +3129,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		return getOperationAccess().getRule();
 	}
 
-	/// * ---- entrypoint definition ---- * / Entrypoint returns sct::Declaration:
+	/// * ---- entrypoint definition ---- * / Entrypoint returns sgraph::Declaration:
 	//	{Entrypoint} "entrypoint" name=ID;
 	public EntrypointElements getEntrypointAccess() {
 		return (pEntrypoint != null) ? pEntrypoint : (pEntrypoint = new EntrypointElements());
@@ -3169,7 +3139,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		return getEntrypointAccess().getRule();
 	}
 
-	/// * ---- exitpoint definition ---- * / Exitpoint returns sct::Declaration:
+	/// * ---- exitpoint definition ---- * / Exitpoint returns sgraph::Declaration:
 	//	{Exitpoint} "exitpoint" name=ID;
 	public ExitpointElements getExitpointAccess() {
 		return (pExitpoint != null) ? pExitpoint : (pExitpoint = new ExitpointElements());
@@ -3191,7 +3161,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 
 	/// * ---- reaction rules ----
 	//Define the structure of reactions that are central for describing the statecharts behavior. 
-	// * / Reaction returns sct::Reaction:
+	// * / Reaction returns sgraph::Reaction:
 	//	LocalReaction | TransitionReaction;
 	public ReactionElements getReactionAccess() {
 		return (pReaction != null) ? pReaction : (pReaction = new ReactionElements());
@@ -3221,7 +3191,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		return getTransitionReactionAccess().getRule();
 	}
 
-	//ReactionTrigger returns sct::Trigger:
+	//ReactionTrigger returns sgraph::Trigger:
 	//	{ReactionTrigger} (triggers+=EventSpec ("," triggers+=EventSpec)* ("[" guardExpression=Expression "]")? | "["
 	//	guardExpression=Expression "]");
 	public ReactionTriggerElements getReactionTriggerAccess() {
@@ -3232,7 +3202,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		return getReactionTriggerAccess().getRule();
 	}
 
-	//ReactionEffect returns sct::Effect:
+	//ReactionEffect returns sgraph::Effect:
 	//	{ReactionEffect} actions+=Statement (";" actions+=Statement)* ";"?;
 	public ReactionEffectElements getReactionEffectAccess() {
 		return (pReactionEffect != null) ? pReactionEffect : (pReactionEffect = new ReactionEffectElements());
@@ -3303,7 +3273,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	}
 
 	//RegularEventSpec:
-	//	event=[sct::Event|FQN];
+	//	event=[sgraph::Event|FQN];
 	public RegularEventSpecElements getRegularEventSpecAccess() {
 		return (pRegularEventSpec != null) ? pRegularEventSpec : (pRegularEventSpec = new RegularEventSpecElements());
 	}
@@ -3394,7 +3364,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		return getDefaultEventAccess().getRule();
 	}
 
-	/// * --- statements --- * / Statement returns sct::Statement:
+	/// * --- statements --- * / Statement returns sgraph::Statement:
 	//	Assignment | EventRaising | OperationCall;
 	public StatementElements getStatementAccess() {
 		return (pStatement != null) ? pStatement : (pStatement = new StatementElements());
@@ -3405,7 +3375,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	}
 
 	//Assignment:
-	//	varRef=[sct::Variable|FQN] operator=AssignmentOperator expression=Expression;
+	//	varRef=[sgraph::Variable|FQN] operator=AssignmentOperator expression=Expression;
 	public AssignmentElements getAssignmentAccess() {
 		return (pAssignment != null) ? pAssignment : (pAssignment = new AssignmentElements());
 	}
@@ -3426,7 +3396,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	}
 
 	//EventRaising:
-	//	"raise" event=[sct::Event|FQN] (":" value=Expression)?;
+	//	"raise" event=[sgraph::Event|FQN] (":" value=Expression)?;
 	public EventRaisingElements getEventRaisingAccess() {
 		return (pEventRaising != null) ? pEventRaising : (pEventRaising = new EventRaisingElements());
 	}
@@ -3645,16 +3615,6 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 		return getTimeUnitAccess().getRule();
 	}
 
-	//enum Type:
-	//	void | integer | real | boolean | string;
-	public TypeElements getTypeAccess() {
-		return (unknownRuleType != null) ? unknownRuleType : (unknownRuleType = new TypeElements());
-	}
-	
-	public EnumRule getTypeRule() {
-		return getTypeAccess().getRule();
-	}
-
 	//ValueExpression returns Expression:
 	//	PrimitiveValueExpression | ElementReferenceExpression | ActiveStateReferenceExpression | EventValueReferenceExpression
 	//	| EventRaisedReferenceExpression;
@@ -3677,7 +3637,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	}
 
 	//ElementReferenceExpression:
-	//	{ElementReferenceExpression} value=[sct::Declaration|FQN];
+	//	{ElementReferenceExpression} value=[sgraph::Declaration|FQN];
 	public ElementReferenceExpressionElements getElementReferenceExpressionAccess() {
 		return (pElementReferenceExpression != null) ? pElementReferenceExpression : (pElementReferenceExpression = new ElementReferenceExpressionElements());
 	}
@@ -3687,7 +3647,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	}
 
 	//EventValueReferenceExpression:
-	//	{EventValueReferenceExpression} "valueof" "(" value=[sct::Event|FQN] ")";
+	//	{EventValueReferenceExpression} "valueof" "(" value=[sgraph::Event|FQN] ")";
 	public EventValueReferenceExpressionElements getEventValueReferenceExpressionAccess() {
 		return (pEventValueReferenceExpression != null) ? pEventValueReferenceExpression : (pEventValueReferenceExpression = new EventValueReferenceExpressionElements());
 	}
@@ -3697,7 +3657,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	}
 
 	//EventRaisedReferenceExpression:
-	//	{EventRaisedReferenceExpression} "raised" "(" value=[sct::Event|FQN] ")";
+	//	{EventRaisedReferenceExpression} "raised" "(" value=[sgraph::Event|FQN] ")";
 	public EventRaisedReferenceExpressionElements getEventRaisedReferenceExpressionAccess() {
 		return (pEventRaisedReferenceExpression != null) ? pEventRaisedReferenceExpression : (pEventRaisedReferenceExpression = new EventRaisedReferenceExpressionElements());
 	}
@@ -3707,7 +3667,7 @@ public class STextGrammarAccess extends AbstractGrammarElementFinder {
 	}
 
 	//ActiveStateReferenceExpression:
-	//	{ActiveStateReferenceExpression} "active" "(" value=[sct::RegularState|FQN] ")";
+	//	{ActiveStateReferenceExpression} "active" "(" value=[sgraph::RegularState|FQN] ")";
 	public ActiveStateReferenceExpressionElements getActiveStateReferenceExpressionAccess() {
 		return (pActiveStateReferenceExpression != null) ? pActiveStateReferenceExpression : (pActiveStateReferenceExpression = new ActiveStateReferenceExpressionElements());
 	}

+ 7 - 8
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/EventDefinition.java

@@ -5,6 +5,8 @@
  */
 package org.yakindu.sct.model.stext.stext;
 
+import org.yakindu.base.types.Type;
+
 import org.yakindu.sct.model.sgraph.Event;
 
 /**
@@ -57,16 +59,14 @@ public interface EventDefinition extends Event
   void setDirection(Direction value);
 
   /**
-   * Returns the value of the '<em><b>Type</b></em>' attribute.
-   * The literals are from the enumeration {@link org.yakindu.sct.model.stext.stext.Type}.
+   * Returns the value of the '<em><b>Type</b></em>' reference.
    * <!-- begin-user-doc -->
    * <p>
-   * If the meaning of the '<em>Type</em>' attribute isn't clear,
+   * If the meaning of the '<em>Type</em>' reference isn't clear,
    * there really should be more of a description here...
    * </p>
    * <!-- end-user-doc -->
-   * @return the value of the '<em>Type</em>' attribute.
-   * @see org.yakindu.sct.model.stext.stext.Type
+   * @return the value of the '<em>Type</em>' reference.
    * @see #setType(Type)
    * @see org.yakindu.sct.model.stext.stext.StextPackage#getEventDefinition_Type()
    * @model
@@ -75,11 +75,10 @@ public interface EventDefinition extends Event
   Type getType();
 
   /**
-   * Sets the value of the '{@link org.yakindu.sct.model.stext.stext.EventDefinition#getType <em>Type</em>}' attribute.
+   * Sets the value of the '{@link org.yakindu.sct.model.stext.stext.EventDefinition#getType <em>Type</em>}' reference.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
-   * @param value the new value of the '<em>Type</em>' attribute.
-   * @see org.yakindu.sct.model.stext.stext.Type
+   * @param value the new value of the '<em>Type</em>' reference.
    * @see #getType()
    * @generated
    */

+ 12 - 15
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/Operation.java

@@ -7,6 +7,8 @@ package org.yakindu.sct.model.stext.stext;
 
 import org.eclipse.emf.common.util.EList;
 
+import org.yakindu.base.types.Type;
+
 import org.yakindu.sct.model.sgraph.Declaration;
 
 /**
@@ -29,34 +31,30 @@ import org.yakindu.sct.model.sgraph.Declaration;
 public interface Operation extends Declaration
 {
   /**
-   * Returns the value of the '<em><b>Param Types</b></em>' attribute list.
-   * The list contents are of type {@link org.yakindu.sct.model.stext.stext.Type}.
-   * The literals are from the enumeration {@link org.yakindu.sct.model.stext.stext.Type}.
+   * Returns the value of the '<em><b>Param Types</b></em>' reference list.
+   * The list contents are of type {@link org.yakindu.base.types.Type}.
    * <!-- begin-user-doc -->
    * <p>
-   * If the meaning of the '<em>Param Types</em>' attribute list isn't clear,
+   * If the meaning of the '<em>Param Types</em>' reference list isn't clear,
    * there really should be more of a description here...
    * </p>
    * <!-- end-user-doc -->
-   * @return the value of the '<em>Param Types</em>' attribute list.
-   * @see org.yakindu.sct.model.stext.stext.Type
+   * @return the value of the '<em>Param Types</em>' reference list.
    * @see org.yakindu.sct.model.stext.stext.StextPackage#getOperation_ParamTypes()
-   * @model unique="false"
+   * @model
    * @generated
    */
   EList<Type> getParamTypes();
 
   /**
-   * Returns the value of the '<em><b>Type</b></em>' attribute.
-   * The literals are from the enumeration {@link org.yakindu.sct.model.stext.stext.Type}.
+   * Returns the value of the '<em><b>Type</b></em>' reference.
    * <!-- begin-user-doc -->
    * <p>
-   * If the meaning of the '<em>Type</em>' attribute isn't clear,
+   * If the meaning of the '<em>Type</em>' reference isn't clear,
    * there really should be more of a description here...
    * </p>
    * <!-- end-user-doc -->
-   * @return the value of the '<em>Type</em>' attribute.
-   * @see org.yakindu.sct.model.stext.stext.Type
+   * @return the value of the '<em>Type</em>' reference.
    * @see #setType(Type)
    * @see org.yakindu.sct.model.stext.stext.StextPackage#getOperation_Type()
    * @model
@@ -65,11 +63,10 @@ public interface Operation extends Declaration
   Type getType();
 
   /**
-   * Sets the value of the '{@link org.yakindu.sct.model.stext.stext.Operation#getType <em>Type</em>}' attribute.
+   * Sets the value of the '{@link org.yakindu.sct.model.stext.stext.Operation#getType <em>Type</em>}' reference.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
-   * @param value the new value of the '<em>Type</em>' attribute.
-   * @see org.yakindu.sct.model.stext.stext.Type
+   * @param value the new value of the '<em>Type</em>' reference.
    * @see #getType()
    * @generated
    */

+ 24 - 54
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/StextPackage.java

@@ -1283,7 +1283,7 @@ public interface StextPackage extends EPackage
   int EVENT_DEFINITION__DIRECTION = SGraphPackage.EVENT_FEATURE_COUNT + 0;
 
   /**
-   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * The feature id for the '<em><b>Type</b></em>' reference.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
@@ -1347,7 +1347,7 @@ public interface StextPackage extends EPackage
   int VARIABLE_DEFINITION__EXTERNAL = SGraphPackage.VARIABLE_FEATURE_COUNT + 1;
 
   /**
-   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * The feature id for the '<em><b>Type</b></em>' reference.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
@@ -1393,7 +1393,7 @@ public interface StextPackage extends EPackage
   int OPERATION__NAME = SGraphPackage.DECLARATION__NAME;
 
   /**
-   * The feature id for the '<em><b>Param Types</b></em>' attribute list.
+   * The feature id for the '<em><b>Param Types</b></em>' reference list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
@@ -1402,7 +1402,7 @@ public interface StextPackage extends EPackage
   int OPERATION__PARAM_TYPES = SGraphPackage.DECLARATION_FEATURE_COUNT + 0;
 
   /**
-   * The feature id for the '<em><b>Type</b></em>' attribute.
+   * The feature id for the '<em><b>Type</b></em>' reference.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @generated
@@ -2175,16 +2175,6 @@ public interface StextPackage extends EPackage
    */
   int TIME_UNIT = 69;
 
-  /**
-   * The meta object id for the '{@link org.yakindu.sct.model.stext.stext.Type <em>Type</em>}' enum.
-   * <!-- begin-user-doc -->
-   * <!-- end-user-doc -->
-   * @see org.yakindu.sct.model.stext.stext.Type
-   * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getType()
-   * @generated
-   */
-  int TYPE = 70;
-
 
   /**
    * Returns the meta object for class '{@link org.yakindu.sct.model.stext.stext.Root <em>Root</em>}'.
@@ -2982,15 +2972,15 @@ public interface StextPackage extends EPackage
   EAttribute getEventDefinition_Direction();
 
   /**
-   * Returns the meta object for the attribute '{@link org.yakindu.sct.model.stext.stext.EventDefinition#getType <em>Type</em>}'.
+   * Returns the meta object for the reference '{@link org.yakindu.sct.model.stext.stext.EventDefinition#getType <em>Type</em>}'.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
-   * @return the meta object for the attribute '<em>Type</em>'.
+   * @return the meta object for the reference '<em>Type</em>'.
    * @see org.yakindu.sct.model.stext.stext.EventDefinition#getType()
    * @see #getEventDefinition()
    * @generated
    */
-  EAttribute getEventDefinition_Type();
+  EReference getEventDefinition_Type();
 
   /**
    * Returns the meta object for the containment reference '{@link org.yakindu.sct.model.stext.stext.EventDefinition#getDerivation <em>Derivation</em>}'.
@@ -3036,15 +3026,15 @@ public interface StextPackage extends EPackage
   EAttribute getVariableDefinition_External();
 
   /**
-   * Returns the meta object for the attribute '{@link org.yakindu.sct.model.stext.stext.VariableDefinition#getType <em>Type</em>}'.
+   * Returns the meta object for the reference '{@link org.yakindu.sct.model.stext.stext.VariableDefinition#getType <em>Type</em>}'.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
-   * @return the meta object for the attribute '<em>Type</em>'.
+   * @return the meta object for the reference '<em>Type</em>'.
    * @see org.yakindu.sct.model.stext.stext.VariableDefinition#getType()
    * @see #getVariableDefinition()
    * @generated
    */
-  EAttribute getVariableDefinition_Type();
+  EReference getVariableDefinition_Type();
 
   /**
    * Returns the meta object for the containment reference '{@link org.yakindu.sct.model.stext.stext.VariableDefinition#getInitialValue <em>Initial Value</em>}'.
@@ -3068,26 +3058,26 @@ public interface StextPackage extends EPackage
   EClass getOperation();
 
   /**
-   * Returns the meta object for the attribute list '{@link org.yakindu.sct.model.stext.stext.Operation#getParamTypes <em>Param Types</em>}'.
+   * Returns the meta object for the reference list '{@link org.yakindu.sct.model.stext.stext.Operation#getParamTypes <em>Param Types</em>}'.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
-   * @return the meta object for the attribute list '<em>Param Types</em>'.
+   * @return the meta object for the reference list '<em>Param Types</em>'.
    * @see org.yakindu.sct.model.stext.stext.Operation#getParamTypes()
    * @see #getOperation()
    * @generated
    */
-  EAttribute getOperation_ParamTypes();
+  EReference getOperation_ParamTypes();
 
   /**
-   * Returns the meta object for the attribute '{@link org.yakindu.sct.model.stext.stext.Operation#getType <em>Type</em>}'.
+   * Returns the meta object for the reference '{@link org.yakindu.sct.model.stext.stext.Operation#getType <em>Type</em>}'.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
-   * @return the meta object for the attribute '<em>Type</em>'.
+   * @return the meta object for the reference '<em>Type</em>'.
    * @see org.yakindu.sct.model.stext.stext.Operation#getType()
    * @see #getOperation()
    * @generated
    */
-  EAttribute getOperation_Type();
+  EReference getOperation_Type();
 
   /**
    * Returns the meta object for class '{@link org.yakindu.sct.model.stext.stext.Entrypoint <em>Entrypoint</em>}'.
@@ -3733,16 +3723,6 @@ public interface StextPackage extends EPackage
    */
   EEnum getTimeUnit();
 
-  /**
-   * Returns the meta object for enum '{@link org.yakindu.sct.model.stext.stext.Type <em>Type</em>}'.
-   * <!-- begin-user-doc -->
-   * <!-- end-user-doc -->
-   * @return the meta object for enum '<em>Type</em>'.
-   * @see org.yakindu.sct.model.stext.stext.Type
-   * @generated
-   */
-  EEnum getType();
-
   /**
    * Returns the factory that creates the instances of the model.
    * <!-- begin-user-doc -->
@@ -4457,12 +4437,12 @@ public interface StextPackage extends EPackage
     EAttribute EVENT_DEFINITION__DIRECTION = eINSTANCE.getEventDefinition_Direction();
 
     /**
-     * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
+     * The meta object literal for the '<em><b>Type</b></em>' reference feature.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @generated
      */
-    EAttribute EVENT_DEFINITION__TYPE = eINSTANCE.getEventDefinition_Type();
+    EReference EVENT_DEFINITION__TYPE = eINSTANCE.getEventDefinition_Type();
 
     /**
      * The meta object literal for the '<em><b>Derivation</b></em>' containment reference feature.
@@ -4499,12 +4479,12 @@ public interface StextPackage extends EPackage
     EAttribute VARIABLE_DEFINITION__EXTERNAL = eINSTANCE.getVariableDefinition_External();
 
     /**
-     * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
+     * The meta object literal for the '<em><b>Type</b></em>' reference feature.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @generated
      */
-    EAttribute VARIABLE_DEFINITION__TYPE = eINSTANCE.getVariableDefinition_Type();
+    EReference VARIABLE_DEFINITION__TYPE = eINSTANCE.getVariableDefinition_Type();
 
     /**
      * The meta object literal for the '<em><b>Initial Value</b></em>' containment reference feature.
@@ -4525,20 +4505,20 @@ public interface StextPackage extends EPackage
     EClass OPERATION = eINSTANCE.getOperation();
 
     /**
-     * The meta object literal for the '<em><b>Param Types</b></em>' attribute list feature.
+     * The meta object literal for the '<em><b>Param Types</b></em>' reference list feature.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @generated
      */
-    EAttribute OPERATION__PARAM_TYPES = eINSTANCE.getOperation_ParamTypes();
+    EReference OPERATION__PARAM_TYPES = eINSTANCE.getOperation_ParamTypes();
 
     /**
-     * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
+     * The meta object literal for the '<em><b>Type</b></em>' reference feature.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @generated
      */
-    EAttribute OPERATION__TYPE = eINSTANCE.getOperation_Type();
+    EReference OPERATION__TYPE = eINSTANCE.getOperation_Type();
 
     /**
      * The meta object literal for the '{@link org.yakindu.sct.model.stext.stext.impl.EntrypointImpl <em>Entrypoint</em>}' class.
@@ -5082,16 +5062,6 @@ public interface StextPackage extends EPackage
      */
     EEnum TIME_UNIT = eINSTANCE.getTimeUnit();
 
-    /**
-     * The meta object literal for the '{@link org.yakindu.sct.model.stext.stext.Type <em>Type</em>}' enum.
-     * <!-- begin-user-doc -->
-     * <!-- end-user-doc -->
-     * @see org.yakindu.sct.model.stext.stext.Type
-     * @see org.yakindu.sct.model.stext.stext.impl.StextPackageImpl#getType()
-     * @generated
-     */
-    EEnum TYPE = eINSTANCE.getType();
-
   }
 
 } //StextPackage

+ 7 - 8
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/VariableDefinition.java

@@ -5,6 +5,8 @@
  */
 package org.yakindu.sct.model.stext.stext;
 
+import org.yakindu.base.types.Type;
+
 import org.yakindu.sct.model.sgraph.Variable;
 
 /**
@@ -81,16 +83,14 @@ public interface VariableDefinition extends Variable
   void setExternal(boolean value);
 
   /**
-   * Returns the value of the '<em><b>Type</b></em>' attribute.
-   * The literals are from the enumeration {@link org.yakindu.sct.model.stext.stext.Type}.
+   * Returns the value of the '<em><b>Type</b></em>' reference.
    * <!-- begin-user-doc -->
    * <p>
-   * If the meaning of the '<em>Type</em>' attribute isn't clear,
+   * If the meaning of the '<em>Type</em>' reference isn't clear,
    * there really should be more of a description here...
    * </p>
    * <!-- end-user-doc -->
-   * @return the value of the '<em>Type</em>' attribute.
-   * @see org.yakindu.sct.model.stext.stext.Type
+   * @return the value of the '<em>Type</em>' reference.
    * @see #setType(Type)
    * @see org.yakindu.sct.model.stext.stext.StextPackage#getVariableDefinition_Type()
    * @model
@@ -99,11 +99,10 @@ public interface VariableDefinition extends Variable
   Type getType();
 
   /**
-   * Sets the value of the '{@link org.yakindu.sct.model.stext.stext.VariableDefinition#getType <em>Type</em>}' attribute.
+   * Sets the value of the '{@link org.yakindu.sct.model.stext.stext.VariableDefinition#getType <em>Type</em>}' reference.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
-   * @param value the new value of the '<em>Type</em>' attribute.
-   * @see org.yakindu.sct.model.stext.stext.Type
+   * @param value the new value of the '<em>Type</em>' reference.
    * @see #getType()
    * @generated
    */

+ 29 - 19
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/EventDefinitionImpl.java

@@ -13,13 +13,14 @@ import org.eclipse.emf.ecore.InternalEObject;
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.yakindu.base.types.Type;
+
 import org.yakindu.sct.model.sgraph.impl.EventImpl;
 
 import org.yakindu.sct.model.stext.stext.Direction;
 import org.yakindu.sct.model.stext.stext.EventDefinition;
 import org.yakindu.sct.model.stext.stext.EventDerivation;
 import org.yakindu.sct.model.stext.stext.StextPackage;
-import org.yakindu.sct.model.stext.stext.Type;
 
 /**
  * <!-- begin-user-doc -->
@@ -59,24 +60,14 @@ public class EventDefinitionImpl extends EventImpl implements EventDefinition
   protected Direction direction = DIRECTION_EDEFAULT;
 
   /**
-   * The default value of the '{@link #getType() <em>Type</em>}' attribute.
-   * <!-- begin-user-doc -->
-   * <!-- end-user-doc -->
-   * @see #getType()
-   * @generated
-   * @ordered
-   */
-  protected static final Type TYPE_EDEFAULT = Type.VOID;
-
-  /**
-   * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
+   * The cached value of the '{@link #getType() <em>Type</em>}' reference.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @see #getType()
    * @generated
    * @ordered
    */
-  protected Type type = TYPE_EDEFAULT;
+  protected Type type;
 
   /**
    * The cached value of the '{@link #getDerivation() <em>Derivation</em>}' containment reference.
@@ -138,6 +129,26 @@ public class EventDefinitionImpl extends EventImpl implements EventDefinition
    * @generated
    */
   public Type getType()
+  {
+    if (type != null && type.eIsProxy())
+    {
+      InternalEObject oldType = (InternalEObject)type;
+      type = (Type)eResolveProxy(oldType);
+      if (type != oldType)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, StextPackage.EVENT_DEFINITION__TYPE, oldType, type));
+      }
+    }
+    return type;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Type basicGetType()
   {
     return type;
   }
@@ -150,7 +161,7 @@ public class EventDefinitionImpl extends EventImpl implements EventDefinition
   public void setType(Type newType)
   {
     Type oldType = type;
-    type = newType == null ? TYPE_EDEFAULT : newType;
+    type = newType;
     if (eNotificationRequired())
       eNotify(new ENotificationImpl(this, Notification.SET, StextPackage.EVENT_DEFINITION__TYPE, oldType, type));
   }
@@ -232,7 +243,8 @@ public class EventDefinitionImpl extends EventImpl implements EventDefinition
       case StextPackage.EVENT_DEFINITION__DIRECTION:
         return getDirection();
       case StextPackage.EVENT_DEFINITION__TYPE:
-        return getType();
+        if (resolve) return getType();
+        return basicGetType();
       case StextPackage.EVENT_DEFINITION__DERIVATION:
         return getDerivation();
     }
@@ -276,7 +288,7 @@ public class EventDefinitionImpl extends EventImpl implements EventDefinition
         setDirection(DIRECTION_EDEFAULT);
         return;
       case StextPackage.EVENT_DEFINITION__TYPE:
-        setType(TYPE_EDEFAULT);
+        setType((Type)null);
         return;
       case StextPackage.EVENT_DEFINITION__DERIVATION:
         setDerivation((EventDerivation)null);
@@ -298,7 +310,7 @@ public class EventDefinitionImpl extends EventImpl implements EventDefinition
       case StextPackage.EVENT_DEFINITION__DIRECTION:
         return direction != DIRECTION_EDEFAULT;
       case StextPackage.EVENT_DEFINITION__TYPE:
-        return type != TYPE_EDEFAULT;
+        return type != null;
       case StextPackage.EVENT_DEFINITION__DERIVATION:
         return derivation != null;
     }
@@ -318,8 +330,6 @@ public class EventDefinitionImpl extends EventImpl implements EventDefinition
     StringBuffer result = new StringBuffer(super.toString());
     result.append(" (direction: ");
     result.append(direction);
-    result.append(", type: ");
-    result.append(type);
     result.append(')');
     return result.toString();
   }

+ 33 - 39
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/OperationImpl.java

@@ -12,16 +12,18 @@ import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.common.util.EList;
 
 import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
-import org.eclipse.emf.ecore.util.EDataTypeEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+import org.yakindu.base.types.Type;
 
 import org.yakindu.sct.model.sgraph.impl.DeclarationImpl;
 
 import org.yakindu.sct.model.stext.stext.Operation;
 import org.yakindu.sct.model.stext.stext.StextPackage;
-import org.yakindu.sct.model.stext.stext.Type;
 
 /**
  * <!-- begin-user-doc -->
@@ -40,7 +42,7 @@ import org.yakindu.sct.model.stext.stext.Type;
 public class OperationImpl extends DeclarationImpl implements Operation
 {
   /**
-   * The cached value of the '{@link #getParamTypes() <em>Param Types</em>}' attribute list.
+   * The cached value of the '{@link #getParamTypes() <em>Param Types</em>}' reference list.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @see #getParamTypes()
@@ -50,24 +52,14 @@ public class OperationImpl extends DeclarationImpl implements Operation
   protected EList<Type> paramTypes;
 
   /**
-   * The default value of the '{@link #getType() <em>Type</em>}' attribute.
+   * The cached value of the '{@link #getType() <em>Type</em>}' reference.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @see #getType()
    * @generated
    * @ordered
    */
-  protected static final Type TYPE_EDEFAULT = Type.VOID;
-
-  /**
-   * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
-   * <!-- begin-user-doc -->
-   * <!-- end-user-doc -->
-   * @see #getType()
-   * @generated
-   * @ordered
-   */
-  protected Type type = TYPE_EDEFAULT;
+  protected Type type;
 
   /**
    * <!-- begin-user-doc -->
@@ -99,7 +91,7 @@ public class OperationImpl extends DeclarationImpl implements Operation
   {
     if (paramTypes == null)
     {
-      paramTypes = new EDataTypeEList<Type>(Type.class, this, StextPackage.OPERATION__PARAM_TYPES);
+      paramTypes = new EObjectResolvingEList<Type>(Type.class, this, StextPackage.OPERATION__PARAM_TYPES);
     }
     return paramTypes;
   }
@@ -110,6 +102,26 @@ public class OperationImpl extends DeclarationImpl implements Operation
    * @generated
    */
   public Type getType()
+  {
+    if (type != null && type.eIsProxy())
+    {
+      InternalEObject oldType = (InternalEObject)type;
+      type = (Type)eResolveProxy(oldType);
+      if (type != oldType)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, StextPackage.OPERATION__TYPE, oldType, type));
+      }
+    }
+    return type;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Type basicGetType()
   {
     return type;
   }
@@ -122,7 +134,7 @@ public class OperationImpl extends DeclarationImpl implements Operation
   public void setType(Type newType)
   {
     Type oldType = type;
-    type = newType == null ? TYPE_EDEFAULT : newType;
+    type = newType;
     if (eNotificationRequired())
       eNotify(new ENotificationImpl(this, Notification.SET, StextPackage.OPERATION__TYPE, oldType, type));
   }
@@ -140,7 +152,8 @@ public class OperationImpl extends DeclarationImpl implements Operation
       case StextPackage.OPERATION__PARAM_TYPES:
         return getParamTypes();
       case StextPackage.OPERATION__TYPE:
-        return getType();
+        if (resolve) return getType();
+        return basicGetType();
     }
     return super.eGet(featureID, resolve, coreType);
   }
@@ -181,7 +194,7 @@ public class OperationImpl extends DeclarationImpl implements Operation
         getParamTypes().clear();
         return;
       case StextPackage.OPERATION__TYPE:
-        setType(TYPE_EDEFAULT);
+        setType((Type)null);
         return;
     }
     super.eUnset(featureID);
@@ -200,28 +213,9 @@ public class OperationImpl extends DeclarationImpl implements Operation
       case StextPackage.OPERATION__PARAM_TYPES:
         return paramTypes != null && !paramTypes.isEmpty();
       case StextPackage.OPERATION__TYPE:
-        return type != TYPE_EDEFAULT;
+        return type != null;
     }
     return super.eIsSet(featureID);
   }
 
-  /**
-   * <!-- begin-user-doc -->
-   * <!-- end-user-doc -->
-   * @generated
-   */
-  @Override
-  public String toString()
-  {
-    if (eIsProxy()) return super.toString();
-
-    StringBuffer result = new StringBuffer(super.toString());
-    result.append(" (paramTypes: ");
-    result.append(paramTypes);
-    result.append(", type: ");
-    result.append(type);
-    result.append(')');
-    return result.toString();
-  }
-
 } //OperationImpl

+ 0 - 26
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/StextFactoryImpl.java

@@ -162,8 +162,6 @@ public class StextFactoryImpl extends EFactoryImpl implements StextFactory
         return createRelationalOperatorFromString(eDataType, initialValue);
       case StextPackage.TIME_UNIT:
         return createTimeUnitFromString(eDataType, initialValue);
-      case StextPackage.TYPE:
-        return createTypeFromString(eDataType, initialValue);
       default:
         throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
     }
@@ -197,8 +195,6 @@ public class StextFactoryImpl extends EFactoryImpl implements StextFactory
         return convertRelationalOperatorToString(eDataType, instanceValue);
       case StextPackage.TIME_UNIT:
         return convertTimeUnitToString(eDataType, instanceValue);
-      case StextPackage.TYPE:
-        return convertTypeToString(eDataType, instanceValue);
       default:
         throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
     }
@@ -1073,28 +1069,6 @@ public class StextFactoryImpl extends EFactoryImpl implements StextFactory
     return instanceValue == null ? null : instanceValue.toString();
   }
 
-  /**
-   * <!-- begin-user-doc -->
-   * <!-- end-user-doc -->
-   * @generated
-   */
-  public Type createTypeFromString(EDataType eDataType, String initialValue)
-  {
-    Type result = Type.get(initialValue);
-    if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
-    return result;
-  }
-
-  /**
-   * <!-- begin-user-doc -->
-   * <!-- end-user-doc -->
-   * @generated
-   */
-  public String convertTypeToString(EDataType eDataType, Object instanceValue)
-  {
-    return instanceValue == null ? null : instanceValue.toString();
-  }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->

+ 20 - 42
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/StextPackageImpl.java

@@ -13,6 +13,8 @@ import org.eclipse.emf.ecore.EReference;
 
 import org.eclipse.emf.ecore.impl.EPackageImpl;
 
+import org.yakindu.base.types.TypesPackage;
+
 import org.yakindu.sct.model.sgraph.SGraphPackage;
 
 import org.yakindu.sct.model.stext.stext.ActiveStateReferenceExpression;
@@ -85,7 +87,6 @@ import org.yakindu.sct.model.stext.stext.TimeUnit;
 import org.yakindu.sct.model.stext.stext.TransitionReaction;
 import org.yakindu.sct.model.stext.stext.TransitionRoot;
 import org.yakindu.sct.model.stext.stext.TransitionSpecification;
-import org.yakindu.sct.model.stext.stext.Type;
 import org.yakindu.sct.model.stext.stext.UnaryOperator;
 import org.yakindu.sct.model.stext.stext.VariableDefinition;
 
@@ -587,13 +588,6 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage
    */
   private EEnum timeUnitEEnum = null;
 
-  /**
-   * <!-- begin-user-doc -->
-   * <!-- end-user-doc -->
-   * @generated
-   */
-  private EEnum typeEEnum = null;
-
   /**
    * Creates an instance of the model <b>Package</b>, registered with
    * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
@@ -643,6 +637,7 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage
     isInited = true;
 
     // Initialize simple dependencies
+    TypesPackage.eINSTANCE.eClass();
     SGraphPackage.eINSTANCE.eClass();
 
     // Create package meta-data objects
@@ -1425,9 +1420,9 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage
    * <!-- end-user-doc -->
    * @generated
    */
-  public EAttribute getEventDefinition_Type()
+  public EReference getEventDefinition_Type()
   {
-    return (EAttribute)eventDefinitionEClass.getEStructuralFeatures().get(1);
+    return (EReference)eventDefinitionEClass.getEStructuralFeatures().get(1);
   }
 
   /**
@@ -1475,9 +1470,9 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage
    * <!-- end-user-doc -->
    * @generated
    */
-  public EAttribute getVariableDefinition_Type()
+  public EReference getVariableDefinition_Type()
   {
-    return (EAttribute)variableDefinitionEClass.getEStructuralFeatures().get(2);
+    return (EReference)variableDefinitionEClass.getEStructuralFeatures().get(2);
   }
 
   /**
@@ -1505,9 +1500,9 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage
    * <!-- end-user-doc -->
    * @generated
    */
-  public EAttribute getOperation_ParamTypes()
+  public EReference getOperation_ParamTypes()
   {
-    return (EAttribute)operationEClass.getEStructuralFeatures().get(0);
+    return (EReference)operationEClass.getEStructuralFeatures().get(0);
   }
 
   /**
@@ -1515,9 +1510,9 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage
    * <!-- end-user-doc -->
    * @generated
    */
-  public EAttribute getOperation_Type()
+  public EReference getOperation_Type()
   {
-    return (EAttribute)operationEClass.getEStructuralFeatures().get(1);
+    return (EReference)operationEClass.getEStructuralFeatures().get(1);
   }
 
   /**
@@ -2130,16 +2125,6 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage
     return timeUnitEEnum;
   }
 
-  /**
-   * <!-- begin-user-doc -->
-   * <!-- end-user-doc -->
-   * @generated
-   */
-  public EEnum getType()
-  {
-    return typeEEnum;
-  }
-
   /**
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
@@ -2286,18 +2271,18 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage
 
     eventDefinitionEClass = createEClass(EVENT_DEFINITION);
     createEAttribute(eventDefinitionEClass, EVENT_DEFINITION__DIRECTION);
-    createEAttribute(eventDefinitionEClass, EVENT_DEFINITION__TYPE);
+    createEReference(eventDefinitionEClass, EVENT_DEFINITION__TYPE);
     createEReference(eventDefinitionEClass, EVENT_DEFINITION__DERIVATION);
 
     variableDefinitionEClass = createEClass(VARIABLE_DEFINITION);
     createEAttribute(variableDefinitionEClass, VARIABLE_DEFINITION__READONLY);
     createEAttribute(variableDefinitionEClass, VARIABLE_DEFINITION__EXTERNAL);
-    createEAttribute(variableDefinitionEClass, VARIABLE_DEFINITION__TYPE);
+    createEReference(variableDefinitionEClass, VARIABLE_DEFINITION__TYPE);
     createEReference(variableDefinitionEClass, VARIABLE_DEFINITION__INITIAL_VALUE);
 
     operationEClass = createEClass(OPERATION);
-    createEAttribute(operationEClass, OPERATION__PARAM_TYPES);
-    createEAttribute(operationEClass, OPERATION__TYPE);
+    createEReference(operationEClass, OPERATION__PARAM_TYPES);
+    createEReference(operationEClass, OPERATION__TYPE);
 
     entrypointEClass = createEClass(ENTRYPOINT);
 
@@ -2379,7 +2364,6 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage
     unaryOperatorEEnum = createEEnum(UNARY_OPERATOR);
     relationalOperatorEEnum = createEEnum(RELATIONAL_OPERATOR);
     timeUnitEEnum = createEEnum(TIME_UNIT);
-    typeEEnum = createEEnum(TYPE);
   }
 
   /**
@@ -2408,6 +2392,7 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage
 
     // Obtain other dependent packages
     SGraphPackage theSGraphPackage = (SGraphPackage)EPackage.Registry.INSTANCE.getEPackage(SGraphPackage.eNS_URI);
+    TypesPackage theTypesPackage = (TypesPackage)EPackage.Registry.INSTANCE.getEPackage(TypesPackage.eNS_URI);
 
     // Create type parameters
 
@@ -2584,18 +2569,18 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage
 
     initEClass(eventDefinitionEClass, EventDefinition.class, "EventDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
     initEAttribute(getEventDefinition_Direction(), this.getDirection(), "direction", null, 0, 1, EventDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-    initEAttribute(getEventDefinition_Type(), this.getType(), "type", null, 0, 1, EventDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getEventDefinition_Type(), theTypesPackage.getType(), null, "type", null, 0, 1, EventDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
     initEReference(getEventDefinition_Derivation(), this.getEventDerivation(), null, "derivation", null, 0, 1, EventDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
     initEClass(variableDefinitionEClass, VariableDefinition.class, "VariableDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
     initEAttribute(getVariableDefinition_Readonly(), ecorePackage.getEBoolean(), "readonly", null, 0, 1, VariableDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
     initEAttribute(getVariableDefinition_External(), ecorePackage.getEBoolean(), "external", null, 0, 1, VariableDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-    initEAttribute(getVariableDefinition_Type(), this.getType(), "type", null, 0, 1, VariableDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getVariableDefinition_Type(), theTypesPackage.getType(), null, "type", null, 0, 1, VariableDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
     initEReference(getVariableDefinition_InitialValue(), this.getExpression(), null, "initialValue", null, 0, 1, VariableDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
     initEClass(operationEClass, Operation.class, "Operation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-    initEAttribute(getOperation_ParamTypes(), this.getType(), "paramTypes", null, 0, -1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-    initEAttribute(getOperation_Type(), this.getType(), "type", null, 0, 1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getOperation_ParamTypes(), theTypesPackage.getType(), null, "paramTypes", null, 0, -1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+    initEReference(getOperation_Type(), theTypesPackage.getType(), null, "type", null, 0, 1, Operation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
     initEClass(entrypointEClass, Entrypoint.class, "Entrypoint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 
@@ -2721,13 +2706,6 @@ public class StextPackageImpl extends EPackageImpl implements StextPackage
     addEEnumLiteral(timeUnitEEnum, TimeUnit.MILLISECOND);
     addEEnumLiteral(timeUnitEEnum, TimeUnit.NANOSECOND);
 
-    initEEnum(typeEEnum, Type.class, "Type");
-    addEEnumLiteral(typeEEnum, Type.VOID);
-    addEEnumLiteral(typeEEnum, Type.INTEGER);
-    addEEnumLiteral(typeEEnum, Type.REAL);
-    addEEnumLiteral(typeEEnum, Type.BOOLEAN);
-    addEEnumLiteral(typeEEnum, Type.STRING);
-
     // Create resource
     createResource(eNS_URI);
   }

+ 29 - 19
plugins/org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/stext/impl/VariableDefinitionImpl.java

@@ -13,11 +13,12 @@ import org.eclipse.emf.ecore.InternalEObject;
 
 import org.eclipse.emf.ecore.impl.ENotificationImpl;
 
+import org.yakindu.base.types.Type;
+
 import org.yakindu.sct.model.sgraph.impl.VariableImpl;
 
 import org.yakindu.sct.model.stext.stext.Expression;
 import org.yakindu.sct.model.stext.stext.StextPackage;
-import org.yakindu.sct.model.stext.stext.Type;
 import org.yakindu.sct.model.stext.stext.VariableDefinition;
 
 /**
@@ -79,24 +80,14 @@ public class VariableDefinitionImpl extends VariableImpl implements VariableDefi
   protected boolean external = EXTERNAL_EDEFAULT;
 
   /**
-   * The default value of the '{@link #getType() <em>Type</em>}' attribute.
-   * <!-- begin-user-doc -->
-   * <!-- end-user-doc -->
-   * @see #getType()
-   * @generated
-   * @ordered
-   */
-  protected static final Type TYPE_EDEFAULT = Type.VOID;
-
-  /**
-   * The cached value of the '{@link #getType() <em>Type</em>}' attribute.
+   * The cached value of the '{@link #getType() <em>Type</em>}' reference.
    * <!-- begin-user-doc -->
    * <!-- end-user-doc -->
    * @see #getType()
    * @generated
    * @ordered
    */
-  protected Type type = TYPE_EDEFAULT;
+  protected Type type;
 
   /**
    * The cached value of the '{@link #getInitialValue() <em>Initial Value</em>}' containment reference.
@@ -181,6 +172,26 @@ public class VariableDefinitionImpl extends VariableImpl implements VariableDefi
    * @generated
    */
   public Type getType()
+  {
+    if (type != null && type.eIsProxy())
+    {
+      InternalEObject oldType = (InternalEObject)type;
+      type = (Type)eResolveProxy(oldType);
+      if (type != oldType)
+      {
+        if (eNotificationRequired())
+          eNotify(new ENotificationImpl(this, Notification.RESOLVE, StextPackage.VARIABLE_DEFINITION__TYPE, oldType, type));
+      }
+    }
+    return type;
+  }
+
+  /**
+   * <!-- begin-user-doc -->
+   * <!-- end-user-doc -->
+   * @generated
+   */
+  public Type basicGetType()
   {
     return type;
   }
@@ -193,7 +204,7 @@ public class VariableDefinitionImpl extends VariableImpl implements VariableDefi
   public void setType(Type newType)
   {
     Type oldType = type;
-    type = newType == null ? TYPE_EDEFAULT : newType;
+    type = newType;
     if (eNotificationRequired())
       eNotify(new ENotificationImpl(this, Notification.SET, StextPackage.VARIABLE_DEFINITION__TYPE, oldType, type));
   }
@@ -277,7 +288,8 @@ public class VariableDefinitionImpl extends VariableImpl implements VariableDefi
       case StextPackage.VARIABLE_DEFINITION__EXTERNAL:
         return isExternal();
       case StextPackage.VARIABLE_DEFINITION__TYPE:
-        return getType();
+        if (resolve) return getType();
+        return basicGetType();
       case StextPackage.VARIABLE_DEFINITION__INITIAL_VALUE:
         return getInitialValue();
     }
@@ -327,7 +339,7 @@ public class VariableDefinitionImpl extends VariableImpl implements VariableDefi
         setExternal(EXTERNAL_EDEFAULT);
         return;
       case StextPackage.VARIABLE_DEFINITION__TYPE:
-        setType(TYPE_EDEFAULT);
+        setType((Type)null);
         return;
       case StextPackage.VARIABLE_DEFINITION__INITIAL_VALUE:
         setInitialValue((Expression)null);
@@ -351,7 +363,7 @@ public class VariableDefinitionImpl extends VariableImpl implements VariableDefi
       case StextPackage.VARIABLE_DEFINITION__EXTERNAL:
         return external != EXTERNAL_EDEFAULT;
       case StextPackage.VARIABLE_DEFINITION__TYPE:
-        return type != TYPE_EDEFAULT;
+        return type != null;
       case StextPackage.VARIABLE_DEFINITION__INITIAL_VALUE:
         return initialValue != null;
     }
@@ -373,8 +385,6 @@ public class VariableDefinitionImpl extends VariableImpl implements VariableDefi
     result.append(readonly);
     result.append(", external: ");
     result.append(external);
-    result.append(", type: ");
-    result.append(type);
     result.append(')');
     return result.toString();
   }

+ 1 - 0
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/GenerateExpressions.mwe2

@@ -14,6 +14,7 @@ Workflow {
 	    scanClassPath = true
 		platformUri = "${runtimeProject}/.."
 		registerGenModelFile = "platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.genmodel"
+		registerGenModelFile = "platform:/resource/org.yakindu.base.types/model/types.genmodel"
 	}
 
 	component = DirectoryCleaner {

+ 30 - 29
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/SText.xtext

@@ -1,8 +1,11 @@
 grammar org.yakindu.sct.model.stext.SText with org.eclipse.xtext.common.Terminals
 
 generate stext "http://www.yakindu.org/sct/statechart/SText"
-import "platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore" as sct
+
 import "http://www.eclipse.org/emf/2002/Ecore" as ecore
+import "platform:/resource/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore" as sgraph
+import "platform:/resource/org.yakindu.base.types/model/types.ecore" as types
+
 /* ---- root rules ----
 These root rules are not relevant for the grammar integration in the statechart. They just integrate the different start rules consistently 
 into a single grammar. 
@@ -39,34 +42,34 @@ TransitionSpecification:
 	/* ---- scope rules ----
 Defines different kinds of scopes that contain element definitions. Scopes are used for element definitions in statechart, regions, and state 
 */
-Scope returns sct::Scope:
+Scope returns sgraph::Scope:
 	(StateScope | StatechartScope);
 
 	// a SimpleScope is used for states and regions
-StateScope returns sct::Scope:
+StateScope returns sgraph::Scope:
 	{SimpleScope} (declarations+=(LocalReaction | Entrypoint | Exitpoint))*;
 
 	// defines the poosible scopes for statecharts
-StatechartScope returns sct::Scope:
+StatechartScope returns sgraph::Scope:
 	InterfaceScope | InternalScope;
 
-InterfaceScope returns sct::Scope:
+InterfaceScope returns sgraph::Scope:
 	{InterfaceScope} 'interface' (name=ID)? ':' (declarations+=(EventDefinition | VariableDefinition | Entrypoint |
 	Exitpoint))*;
 
-InternalScope returns sct::Scope:
+InternalScope returns sgraph::Scope:
 	{InternalScope} 'internal' ':' (declarations+=(EventDefinition | VariableDefinition | Operation | LocalReaction))*;
 
 	/* ---- declarations ----
 a definition is a top level element of a definition scope. */
-Declaration returns sct::Declaration:
+Declaration returns sgraph::Declaration:
 	EventDefinition | VariableDefinition | Operation | LocalReaction | Entrypoint | Exitpoint;
 
 	// DataElement: EventDefinition | VariableDefinition;
 
 /* ---- event definition ---- */
-EventDefinition returns sct::Event:
-	{EventDefinition} (direction=Direction)? 'event' name=ID (':' type=Type)? (derivation=EventDerivation)?;
+EventDefinition returns sgraph::Event:
+	{EventDefinition} (direction=Direction)? 'event' name=ID (':' type=[types::Type|FQN])? (derivation=EventDerivation)?;
 
 EventDerivation:
 	'=' condition=Expression (':' value=Expression)?;
@@ -75,20 +78,20 @@ enum Direction:
 	LOCAL='local' | IN='in' | OUT='out';
 
 /* ---- variable definition ---- */
-VariableDefinition returns sct::Variable:
-	{VariableDefinition} 'var' ((readonly?='readonly')? & (external?='external')?) name=ID ':' type=Type ('='
+VariableDefinition returns sgraph::Variable:
+	{VariableDefinition} 'var' ((readonly?='readonly')? & (external?='external')?) name=ID ':' type=[types::Type|FQN] ('='
 	initialValue=Expression)?;
 
 /* ---- operation definition ---- */
-Operation returns sct::Declaration:
-	{Operation} 'operation' name=ID '(' (paramTypes+=Type (',' paramTypes+=Type)*)? ')' (':' type=Type)?;
+Operation returns sgraph::Declaration:
+	{Operation} 'operation' name=ID '(' (paramTypes+=[types::Type|FQN] (',' paramTypes+=[types::Type|FQN])*)? ')' (':' type=[types::Type|FQN])?;
 
 /* ---- entrypoint definition ---- */
-Entrypoint returns sct::Declaration:
+Entrypoint returns sgraph::Declaration:
 	{Entrypoint} 'entrypoint' name=ID;
 
 /* ---- exitpoint definition ---- */
-Exitpoint returns sct::Declaration:
+Exitpoint returns sgraph::Declaration:
 	{Exitpoint} 'exitpoint' name=ID;
 
 /* ---- Datatype rules ---- */
@@ -98,7 +101,7 @@ FQN:
 	/* ---- reaction rules ----
 Define the structure of reactions that are central for describing the statecharts behavior. 
 */
-Reaction returns sct::Reaction:
+Reaction returns sgraph::Reaction:
 	LocalReaction | TransitionReaction;
 
 LocalReaction:
@@ -107,11 +110,11 @@ LocalReaction:
 TransitionReaction:
 	{TransitionReaction} (trigger=ReactionTrigger)? ('/' effect=ReactionEffect)? ('#' properties=ReactionProperties)?;
 
-ReactionTrigger returns sct::Trigger:
+ReactionTrigger returns sgraph::Trigger:
 	{ReactionTrigger} ((triggers+=EventSpec ("," triggers+=EventSpec)* (=> '[' guardExpression=Expression ']')?)
 	| ('[' guardExpression=Expression ']'));
 
-ReactionEffect returns sct::Effect:
+ReactionEffect returns sgraph::Effect:
 	{ReactionEffect} actions+=Statement (';' actions+=Statement )* (';')?;
 
 ReactionProperties:
@@ -133,7 +136,7 @@ EventSpec:
 	RegularEventSpec | TimeEventSpec | BuiltinEventSpec;
 
 RegularEventSpec:
-	event=[sct::Event|FQN];
+	event=[sgraph::Event|FQN];
 
 	// TODO: redefine after trigger - we need to use it with clocks
 TimeEventSpec:
@@ -163,11 +166,11 @@ DefaultEvent:
 ;
 
 /* --- statements --- */
-Statement returns sct::Statement:
+Statement returns sgraph::Statement:
 	Assignment | EventRaising | OperationCall;
 
 Assignment:
-	varRef=[sct::Variable|FQN] operator=AssignmentOperator expression=Expression;
+	varRef=[sgraph::Variable|FQN] operator=AssignmentOperator expression=Expression;
 
 enum AssignmentOperator:
 	assign='='
@@ -183,7 +186,7 @@ enum AssignmentOperator:
 	| orAssign='|=';
 
 EventRaising:
-	'raise' event=[sct::Event|FQN] (':' value=Expression)?;
+	'raise' event=[sgraph::Event|FQN] (':' value=Expression)?;
 
 	//****************
 // Expression Grammar
@@ -266,11 +269,9 @@ enum RelationalOperator:
 enum TimeUnit:
 	second='s'
 	| millisecond='ms'
+	| microsend = 'µs'
 	| nanosecond='ns';
 
-enum Type:
-	void | integer | real | boolean | string;
-
 ValueExpression returns Expression:
 	PrimitiveValueExpression | ElementReferenceExpression | ActiveStateReferenceExpression | EventValueReferenceExpression
 	| EventRaisedReferenceExpression;
@@ -279,16 +280,16 @@ PrimitiveValueExpression returns Expression:
 	{PrimitiveValueExpression} value=Literal;
 
 ElementReferenceExpression:
-	{ElementReferenceExpression} value=[sct::Declaration|FQN];
+	{ElementReferenceExpression} value=[sgraph::Declaration|FQN];
 
 EventValueReferenceExpression:
-	{EventValueReferenceExpression} 'valueof' '(' value=[sct::Event|FQN] ')';
+	{EventValueReferenceExpression} 'valueof' '(' value=[sgraph::Event|FQN] ')';
 
 EventRaisedReferenceExpression:
-	{EventRaisedReferenceExpression} 'raised' '(' value=[sct::Event|FQN] ')';
+	{EventRaisedReferenceExpression} 'raised' '(' value=[sgraph::Event|FQN] ')';
 
 ActiveStateReferenceExpression:
-	{ActiveStateReferenceExpression} 'active' '(' value=[sct::RegularState|FQN] ')';
+	{ActiveStateReferenceExpression} 'active' '(' value=[sgraph::RegularState|FQN] ')';
 
 OperationCall returns Expression:
 	{OperationCall} operation=[Operation|FQN] '(' (args+=Expression (',' args+=Expression)*)? ')';

+ 44 - 35
plugins/org.yakindu.sct.model.stext/src/org/yakindu/sct/model/stext/validation/StaticTypeAnalyzer.xtend

@@ -40,6 +40,7 @@ import org.yakindu.sct.model.stext.stext.Type
 import com.google.inject.Inject
 import org.eclipse.xtext.validation.ValidationMessageAcceptor
 import org.yakindu.sct.model.stext.stext.EventDefinition
+import org.yakindu.base.types.Type
 
 /**
  * 
@@ -50,6 +51,20 @@ import org.yakindu.sct.model.stext.stext.EventDefinition
  */
 class StaticTypeAnalyzer {
 	
+// begin TODO: externalize this
+	def isBoolean(Type type){
+		return type != null && type.name == "boolean";	
+	}
+	
+	def isInteger(Type type){
+		return type != null && type.name =="integer";
+	}
+	
+	def isReal(Type type){
+		return type != null && type.name == "real";	
+	}
+// end TODO
+	
 	/**
 	 * Check Variable assignments
 	 */
@@ -57,22 +72,20 @@ class StaticTypeAnalyzer {
 		var valueType = assignment.expression.check
 		var ref = assignment.varRef
 		var type = (ref as VariableDefinition).getType()
-		switch(type){
-			case Type::BOOLEAN:
-				if(!(valueType == typeof(Boolean))){
-					error("Can not assign a value of type " + valueType.simpleName + " to a variable of type " + type)
-				}
-			case Type::INTEGER:
-				if(!(valueType == typeof(Number))){
-					error("Can not assign a value of type " + valueType.simpleName + " to a variable of type " + type)
-				}
-			case Type::REAL:
-				if(!(valueType == typeof(Number))){
-					error("Can not assign a value of type " + valueType.simpleName + " to a variable of type " + type)
-				}
+		if(isBoolean(type) && !(valueType == typeof(Boolean))){
+			error("Can not assign a value of type " + valueType.simpleName + " to a variable of type " + type)
+		}
+		else if(isInteger(type) && !(valueType == typeof(Number))){
+			error("Can not assign a value of type " + valueType.simpleName + " to a variable of type " + type)
+		}
+		else if(isReal(type) && !(valueType == typeof(Number))){
+			error("Can not assign a value of type " + valueType.simpleName + " to a variable of type " + type)
 		} 
 		return null 
 	}
+	
+	
+		
 	/**
 	 * Check Event value assignments
 	 */
@@ -80,19 +93,14 @@ class StaticTypeAnalyzer {
 		var valueType = eventRaising.value.check
 		var ref = eventRaising.event
 		var type = (ref as EventDefinition).getType()
-		switch(type){
-			case Type::BOOLEAN:
-				if(!(valueType == typeof(Boolean))){
-					error("Can not assign a value of type " + valueType.simpleName + " to an event of type " + type)
-				}
-			case Type::INTEGER:
-				if(!(valueType == typeof(Number))){
-					error("Can not assign a value of type " + valueType.simpleName + " to an event of type " + type)
-				}
-			case Type::REAL:
-				if(!(valueType == typeof(Number))){
-					error("Can not assign a value of type " + valueType.simpleName + " to an event  type " + type)
-				}
+		if(isBoolean(type) && !(valueType == typeof(Boolean))){
+			error("Can not assign a value of type " + valueType.simpleName + " to an event of type " + type)
+		}
+		else if (isInteger(type) && !(valueType == typeof(Number))){
+			error("Can not assign a value of type " + valueType.simpleName + " to an event of type " + type)
+		}
+		else if(isReal(type) && !(valueType == typeof(Number))){
+			error("Can not assign a value of type " + valueType.simpleName + " to an event  type " + type)
 		} 
 		return null 
 	}
@@ -132,7 +140,7 @@ class StaticTypeAnalyzer {
 		var leftType = expression.leftOperand.check
 		var rightType = expression.rightOperand.check
 		if(leftType != rightType){
-			error("Incompatible operands " +leftType.simpleName + " and " + rightType.simpleName + " for operator '" + expression.operator.literal+"'")
+			error("Incompatible operands " +leftType.name + " and " + rightType.name + " for operator '" + expression.operator.literal+"'")
 		}
 		//If both types are boolean, only relational operators Equals and not_Equals are allowed
 		if(leftType == typeof(Boolean) && rightType == typeof(Boolean)){
@@ -174,7 +182,7 @@ class StaticTypeAnalyzer {
 		return null;
 	}
 	def dispatch check(EventRaisedReferenceExpression expression){
-		//TODO: Impement me
+		return typeof(Boolean);
 	}
 	def dispatch check(EventValueReferenceExpression expression){
 		//TODO: Implement me
@@ -193,13 +201,14 @@ class StaticTypeAnalyzer {
 	}
 	
 	def toJavaType(Type type){
-		switch(type){
-			case Type::BOOLEAN:
-				return typeof(Boolean)
-			case Type::INTEGER:
-				return typeof(Number)
-			case Type::REAL:
-				return typeof(Number)
+		if(isBoolean(type)){
+			return typeof(Boolean)
+		}
+		else if(isInteger(type)){
+			return typeof(Number)
+		}
+		else if(isReal(type)){
+			return typeof(Number)
 		} 
 		return typeof(Void)
 	}

+ 4 - 4
plugins/org.yakindu.sct.simulation.core/plugin.xml

@@ -3,12 +3,12 @@
 <plugin>
    <extension-point id="org.yakindu.sct.simulation.core.executionfactory" name="ExecutionFactory" schema="schema/executionfactory.exsd"/>
 
-<extension point="org.eclipse.debug.core.launchConfigurationTypes">
-    <launchConfigurationType
+	<extension point="org.eclipse.debug.core.launchConfigurationTypes">
+    	<launchConfigurationType
           delegate="org.yakindu.sct.simulation.core.launch.StatechartLaunchConfigurationDelegate"
           id="org.yakindu.sct.simulation.core.launch.statechart"
           modes="run, debug"
           name="YAKINDU Statechart">
-    </launchConfigurationType>
-</extension>
+    	</launchConfigurationType>
+	</extension>
 </plugin>