Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2017-11-06 10:37:41 +0000
committerHenrik Rentz-Reichert2017-11-07 06:58:06 +0000
commit48d51b2b32f759e255f0cca154d2757c95d15e19 (patch)
treef1455e17e092e88c01feac4b6cf7f5ec2d2896ff /plugins/org.eclipse.etrice.core.genmodel.fsm
parentb09856b29bfcaea08e9e57b14da3744c0a201867 (diff)
downloadorg.eclipse.etrice-48d51b2b32f759e255f0cca154d2757c95d15e19.tar.gz
org.eclipse.etrice-48d51b2b32f759e255f0cca154d2757c95d15e19.tar.xz
org.eclipse.etrice-48d51b2b32f759e255f0cca154d2757c95d15e19.zip
Bug 511330 - [core.genmodel.fsm] introduce simplified generator model
for state machines * manually merged newfsmgen to newfsmgen_finalize because no rebase was possible due to structural changes * rebased on master * switch to Oxygen and Xtend 2.12 Change-Id: If9a8c7421f07fb8e8fa824b7bc6761b9142b7eaf
Diffstat (limited to 'plugins/org.eclipse.etrice.core.genmodel.fsm')
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/.classpath2
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/.project8
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/META-INF/MANIFEST.MF13
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/build.properties14
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.ecore179
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.genmodel136
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/plugin.properties14
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/plugin.xml16
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/CommonTrigger.java152
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FSMGenElement.java18
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenFactory.java96
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenPackage.java1333
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Graph.java126
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/GraphContainer.java158
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/GraphItem.java49
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Link.java219
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Node.java200
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/CommonTriggerImpl.java (renamed from plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/ActiveTriggerImpl.java)166
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FSMGenElementImpl.java39
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenFactoryImpl.java (renamed from plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenFactoryImpl.java)74
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java663
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphContainerImpl.java412
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphImpl.java372
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphItemImpl.java161
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/LinkImpl.java621
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/NodeImpl.java543
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenAdapterFactory.java (renamed from plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenAdapterFactory.java)138
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenSwitch.java (renamed from plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenSwitch.java)157
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.xtend166
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/ExtendedFsmGenBuilder.xtend239
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/FsmGenChecker.xtend122
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/FsmGenExtensions.xtend280
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/ICommonDataCalculator.java32
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/IDiagnostician.java (renamed from plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/IDiagnostician.java)2
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/ILogger.java (renamed from plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/base/ILogger.java)12
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/NullDiagnostician.java (renamed from plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/base/NullDiagnostician.java)3
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/NullLogger.java (renamed from plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/base/NullLogger.java)15
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/TriggerExtensions.xtend39
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/builder/FSMGeneratorModelBuilder.java56
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ActiveTrigger.java144
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ExpandedModelComponent.java342
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ExpandedRefinedState.java122
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenFactory.java78
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenPackage.java720
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ITransitionChainVisitor.java85
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/TransitionChain.java113
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/ExpandedModelComponentImpl.java1410
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/ExpandedRefinedStateImpl.java392
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java509
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/TransitionChainImpl.java381
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenResourceFactoryImpl.java50
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenResourceImpl.java37
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenUtil.java54
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.java323
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/ExtendedFsmGenBuilder.java291
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/FsmGenChecker.java194
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/FsmGenExtensions.java540
-rw-r--r--plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/TriggerExtensions.java49
59 files changed, 7850 insertions, 5036 deletions
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/.classpath b/plugins/org.eclipse.etrice.core.genmodel.fsm/.classpath
index 751c8f2e5..eda61faab 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/.classpath
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/.classpath
@@ -4,4 +4,6 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
+ <classpathentry kind="src" path="xtend-gen"/>
+ <classpathentry kind="src" path="src-gen"/>
</classpath>
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/.project b/plugins/org.eclipse.etrice.core.genmodel.fsm/.project
index 3b2beec41..854994ad4 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/.project
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/.project
@@ -6,6 +6,11 @@
</projects>
<buildSpec>
<buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
@@ -22,7 +27,8 @@
</buildCommand>
</buildSpec>
<natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.etrice.core.genmodel.fsm/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..f42de363a
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.core.genmodel.fsm/META-INF/MANIFEST.MF
index d1390cfed..15d2e4e6f 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/META-INF/MANIFEST.MF
@@ -4,17 +4,16 @@ Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.etrice.core.genmodel.fsm;singleton:=true
Bundle-Version: 1.1.1.qualifier
Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Export-Package: org.eclipse.etrice.core.genmodel.fsm,
+ org.eclipse.etrice.core.genmodel.fsm.fsmgen,
+ org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl,
+ org.eclipse.etrice.core.genmodel.fsm.fsmgen.util
Require-Bundle: org.eclipse.etrice.core.common;visibility:=reexport,
org.eclipse.etrice.core.fsm;bundle-version="1.1.1";visibility:=reexport,
org.eclipse.core.runtime,
org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.emf.ecore.xmi;visibility:=reexport
Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.etrice.core.genmodel.fsm.base,
- org.eclipse.etrice.core.genmodel.fsm.builder,
- org.eclipse.etrice.core.genmodel.fsm.fsmgen,
- org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl,
- org.eclipse.etrice.core.genmodel.fsm.fsmgen.util
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/build.properties b/plugins/org.eclipse.etrice.core.genmodel.fsm/build.properties
index 857b8ceb4..9e7a79cd1 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/build.properties
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/build.properties
@@ -1,12 +1,4 @@
-# Copyright (c) 2014 protos software gmbh (http://www.protos.de).
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# CONTRIBUTORS:
-# Henrik Rentz-Reichert (initial contribution)
-#
+#
bin.includes = .,\
model/,\
@@ -14,5 +6,7 @@ bin.includes = .,\
plugin.xml,\
plugin.properties
jars.compile.order = .
-source.. = src/
+source.. = src-gen/,\
+ xtend-gen/,\
+ src/
output.. = bin/
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.ecore b/plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.ecore
index 3f8349ccd..b8968421e 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.ecore
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.ecore
@@ -2,116 +2,79 @@
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="fsmgen" nsURI="http://www.eclipse.org/etrice/generator/fsm"
nsPrefix="fsmgen">
- <eClassifiers xsi:type="ecore:EClass" name="ActiveTrigger">
- <eStructuralFeatures xsi:type="ecore:EReference" name="msg" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="ifitem" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//AbstractInterfaceItem"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="trigger" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="transitions" upperBound="-1"
- eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//TriggeredTransition"/>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ExpandedModelComponent">
- <eOperations name="prepare">
- <eParameters name="validator" eType="#//IDiagnostician"/>
- </eOperations>
- <eOperations name="release"/>
- <eOperations name="addOwnObject">
- <eParameters name="obj" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//StateGraphItem"/>
- </eOperations>
- <eOperations name="isOwnObject" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
- <eParameters name="obj" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//StateGraphItem"/>
- </eOperations>
- <eOperations name="hasBaseTransitionDetailCode" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
- <eParameters name="trans" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//Transition"/>
- </eOperations>
- <eOperations name="hasStateMachine" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <eOperations name="getTriggerCodeName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eParameters name="mif" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//MessageFromIf"/>
- </eOperations>
- <eOperations name="getTriggerCodeName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eParameters name="at" eType="#//ActiveTrigger"/>
- </eOperations>
- <eOperations name="getOutgoingTransitions" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//Transition">
- <eParameters name="node" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//StateGraphNode"/>
- </eOperations>
- <eOperations name="getIncomingTransitions" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//Transition">
- <eParameters name="node" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//StateGraphNode"/>
- </eOperations>
- <eOperations name="getActiveTriggers" upperBound="-1" eType="#//ActiveTrigger">
- <eParameters name="state" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//State"/>
- </eOperations>
- <eOperations name="getTriggers" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//MessageFromIf"/>
- <eOperations name="getOwnTriggers" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//MessageFromIf"/>
- <eOperations name="getMessageID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eParameters name="mif" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//MessageFromIf"/>
- </eOperations>
- <eOperations name="getChain" eType="#//TransitionChain">
- <eParameters name="trans" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//Transition"/>
- </eOperations>
- <eOperations name="getChains" upperBound="-1" eType="#//TransitionChain">
- <eParameters name="trans" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//Transition"/>
- </eOperations>
- <eOperations name="getOwnTransitionChains" upperBound="-1" eType="#//TransitionChain"/>
- <eOperations name="getOwnInterfaceItems" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//AbstractInterfaceItem">
- <eParameters name="mc" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//ModelComponent"/>
- </eOperations>
- <eOperations name="getAllInterfaceItems" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//AbstractInterfaceItem"/>
- <eOperations name="isMatching" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
- <eParameters name="trig" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//Trigger"/>
- <eParameters name="trigstr" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eOperations>
- <eOperations name="getDefaultBranch" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//ContinuationTransition">
- <eParameters name="out" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//Transition"/>
- </eOperations>
- <eOperations name="getOrig" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject">
- <eParameters name="copy" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- </eOperations>
- <eOperations name="getCopy" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject">
- <eParameters name="orig" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- </eOperations>
- <eOperations name="getModelComponentName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <eOperations name="getData" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject">
- <eParameters name="trans" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//Transition"/>
- </eOperations>
- <eOperations name="getIncomingMessages" upperBound="-1" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject">
- <eParameters name="ifitem" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//AbstractInterfaceItem"/>
- </eOperations>
- <eOperations name="addTransitionChain" eType="#//TransitionChain">
- <eParameters name="trans" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//Transition"/>
- </eOperations>
- <eOperations name="getInterfaceItemLocalId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
- <eParameters name="ifitem" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//AbstractInterfaceItem"/>
- </eOperations>
- <eOperations name="computeCommonChainData" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject">
- <eParameters name="chains" upperBound="-1" eType="#//TransitionChain"/>
- </eOperations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="modelComponent" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//ModelComponent"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="stateMachine" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//StateGraph"
+ <eClassifiers xsi:type="ecore:EClass" name="GraphContainer" eSuperTypes="#//FSMGenElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="graph" eType="#//Graph"
containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="transitionChains" upperBound="-1"
- eType="#//TransitionChain" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="component" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//ModelComponent"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="initializedTriggersInStates"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="initializedChainHeads"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="initializedCommonData"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ExpandedRefinedState" eSuperTypes="../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//SimpleState">
- <eOperations name="init">
- <eParameters name="rs" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//RefinedState"/>
- </eOperations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="inheritedEntry" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
- containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="inheritedExit" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
- containment="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="inheritedDo" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//DetailCode"
- containment="true"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Graph" eSuperTypes="#//FSMGenElement">
+ <eOperations name="toString" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="StringBuilder result = new StringBuilder();&#xD;&#xA;result.append(&quot;StateGraph {\n&quot;);&#xD;&#xA;for (Node n : getNodes()) {&#xD;&#xA;&#x9;result.append(&quot; &quot; + n.toString() + &quot;\n&quot;);&#xD;&#xA;}&#xD;&#xA;for (Link l : getLinks()) {&#xD;&#xA;&#x9;result.append(&quot; &quot; + l.toString() + &quot;\n&quot;);&#xD;&#xA;}&#xD;&#xA;result.append(&quot;}&quot;);&#xD;&#xA;return result.toString();"/>
+ </eAnnotations>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="nodes" upperBound="-1"
+ eType="#//Node" containment="true" eOpposite="#//Node/graph"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="links" upperBound="-1"
+ eType="#//Link" containment="true" eOpposite="#//Link/graph"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="stateGraph" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//StateGraph"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="node" eType="#//Node" eOpposite="#//Node/subgraph"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="IDiagnostician" instanceTypeName="IDiagnostician"
- abstract="true" interface="true"/>
- <eClassifiers xsi:type="ecore:EClass" name="ITransitionChainVisitor" instanceTypeName="ITransitionChainVisitor"
- abstract="true" interface="true"/>
- <eClassifiers xsi:type="ecore:EClass" name="TransitionChain">
- <eOperations name="getStateContext" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//State"/>
- <eOperations name="isHandler" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <eOperations name="genExecuteChain" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
- <eParameters name="tcv" eType="#//ITransitionChainVisitor"/>
- </eOperations>
- <eStructuralFeatures xsi:type="ecore:EReference" name="transition" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//Transition"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="data" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <eClassifiers xsi:type="ecore:EClass" name="GraphItem" eSuperTypes="#//FSMGenElement">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="inherited" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="false"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Node" eSuperTypes="#//GraphItem">
+ <eOperations name="toString" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="String type = &quot;?&quot;;&#xD;&#xA;if (getStateGraphNode() instanceof &lt;%org.eclipse.etrice.core.fsm.fSM.RefinedState%>) {&#xD;&#xA;&#x9;type = &quot;RefinedState&quot;;&#xD;&#xA;}&#xD;&#xA;else if (getStateGraphNode() instanceof &lt;%org.eclipse.etrice.core.fsm.fSM.SimpleState%>) {&#xD;&#xA;&#x9;type = &quot;SimpleState&quot;;&#xD;&#xA;}&#xD;&#xA;else if (getStateGraphNode() instanceof &lt;%org.eclipse.etrice.core.fsm.fSM.TrPoint%>) {&#xD;&#xA;&#x9;type = &quot;TrPoint&quot;;&#xD;&#xA;}&#xD;&#xA;else if (getStateGraphNode() instanceof &lt;%org.eclipse.etrice.core.fsm.fSM.ChoicePoint%>) {&#xD;&#xA;&#x9;type = &quot;ChoicePoint&quot;;&#xD;&#xA;}&#xD;&#xA;return &quot;Node &quot; + getStateGraphNode().getName() + &quot; (&quot; + type + &quot;)&quot;;"/>
+ </eAnnotations>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="graph" eType="#//Graph"
+ eOpposite="#//Graph/nodes"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="subgraph" eType="#//Graph"
+ containment="true" eOpposite="#//Graph/node"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="outgoing" upperBound="-1"
+ eType="#//Link" eOpposite="#//Link/source"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="incoming" upperBound="-1"
+ eType="#//Link" eOpposite="#//Link/target"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="stateGraphNode" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//StateGraphNode"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="caughtTriggers" upperBound="-1"
+ eType="#//CommonTrigger" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="inheritanceLevel" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Link" eSuperTypes="#//GraphItem">
+ <eOperations name="toString" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="if (getTransition() instanceof &lt;%org.eclipse.etrice.core.fsm.fSM.InitialTransition%>) {&#xD;&#xA;&#x9;return &quot;Link initial -> &quot; + getTarget().toString() + &quot; (InitialTransition)&quot;;&#xD;&#xA;}&#xD;&#xA;else if (getTransition() instanceof &lt;%org.eclipse.etrice.core.fsm.fSM.NonInitialTransition%>) {&#xD;&#xA;&#x9;return &quot;Link &quot; + getSource().toString() + &quot; -> &quot; + getTarget().toString() + &quot; (InitialTransition)&quot;;&#xD;&#xA;}&#xD;&#xA;else if (getTransition() instanceof &lt;%org.eclipse.etrice.core.fsm.fSM.RefinedTransition%>) {&#xD;&#xA;&#x9;return &quot;RefinedTransition&quot;;&#xD;&#xA;}&#xD;&#xA;return &quot;?&quot;;"/>
+ </eAnnotations>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="graph" eType="#//Graph"
+ eOpposite="#//Graph/links"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="source" eType="#//Node"
+ eOpposite="#//Node/outgoing"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="target" eType="#//Node"
+ eOpposite="#//Node/incoming"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="chainHeads" upperBound="-1"
+ eType="#//Link"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="ifitemTriggered" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="commonData" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="transition" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//TransitionBase"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="CommonTrigger" eSuperTypes="#//FSMGenElement">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="msg" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ifitem" eType="ecore:EClass ../../org.eclipse.etrice.core.fsm/model/generated/FSM.ecore#//AbstractInterfaceItem"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="hasGuard" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="trigger" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="links" upperBound="-1"
+ eType="#//Link"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="FSMGenElement"/>
</ecore:EPackage>
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.genmodel b/plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.genmodel
index 76c00dbb8..109b764a1 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.genmodel
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/model/fsmgen.genmodel
@@ -1,106 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText=" Copyright (c) 2014 protos software gmbh (http://www.protos.de).&#xD;&#xA; All rights reserved. This program and the accompanying materials&#xD;&#xA; are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA; which accompanies this distribution, and is available at&#xD;&#xA; http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA; &#xD;&#xA; CONTRIBUTORS:&#xD;&#xA; &#x9;&#x9;Henrik Rentz-Reichert (initial contribution)&#xD;&#xA; "
- modelDirectory="/org.eclipse.etrice.core.genmodel.fsm/src" modelPluginID="org.eclipse.etrice.core.genmodel.fsm"
- modelName="FsmGen" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
- importerID="org.eclipse.emf.importer.ecore" complianceLevel="6.0" copyrightFields="false"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.eclipse.etrice.core.genmodel.fsm/src-gen"
+ editDirectory="/org.eclipse.etrice.core.genmodel.fsm.edit/src" editorDirectory="/org.eclipse.etrice.core.genmodel.fsm.editor/src"
+ modelPluginID="org.eclipse.etrice.core.genmodel.fsm" modelName="Fsmgen" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
+ importerID="org.eclipse.emf.importer.ecore" complianceLevel="7.0" copyrightFields="false"
+ editPluginID="org.eclipse.etrice.core.genmodel.fsm.edit" editorPluginID="org.eclipse.etrice.core.genmodel.fsm.editor"
usedGenPackages="../../org.eclipse.etrice.core.common/src-gen/org/eclipse/etrice/core/common/Base.genmodel#//base ../../org.eclipse.etrice.core.fsm/model/generated/FSM.genmodel#//fSM"
- importOrganizing="true">
+ operationReflection="true" importOrganizing="true">
<foreignModel>fsmgen.ecore</foreignModel>
<genPackages prefix="FsmGen" basePackage="org.eclipse.etrice.core.genmodel.fsm"
- resource="XMI" disposableProviderFactory="true" ecorePackage="fsmgen.ecore#/">
- <genClasses ecoreClass="fsmgen.ecore#//ActiveTrigger">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//ActiveTrigger/msg"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//ActiveTrigger/ifitem"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute fsmgen.ecore#//ActiveTrigger/trigger"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//ActiveTrigger/transitions"/>
+ disposableProviderFactory="true" fileExtensions="fsmgen2" ecorePackage="fsmgen.ecore#/">
+ <genClasses ecoreClass="fsmgen.ecore#//GraphContainer">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference fsmgen.ecore#//GraphContainer/graph"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//GraphContainer/component"/>
</genClasses>
- <genClasses image="false" ecoreClass="fsmgen.ecore#//ExpandedModelComponent">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//ExpandedModelComponent/modelComponent"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference fsmgen.ecore#//ExpandedModelComponent/stateMachine"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference fsmgen.ecore#//ExpandedModelComponent/transitionChains"/>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/prepare">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/prepare/validator"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/release"/>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/addOwnObject">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/addOwnObject/obj"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/isOwnObject">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/isOwnObject/obj"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/hasStateMachine"/>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getTriggerCodeName">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/getTriggerCodeName/mif"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getTriggerCodeName.1">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/getTriggerCodeName.1/at"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getOutgoingTransitions">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/getOutgoingTransitions/node"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getIncomingTransitions">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/getIncomingTransitions/node"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getActiveTriggers">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/getActiveTriggers/state"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getTriggers"/>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getOwnTriggers"/>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getMessageID">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/getMessageID/mif"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getChain">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/getChain/trans"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getOwnTransitionChains"/>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getOwnInterfaceItems"/>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getAllInterfaceItems"/>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/isMatching">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/isMatching/trig"/>
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/isMatching/trigstr"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getDefaultBranch">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/getDefaultBranch/out"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getOrig">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/getOrig/copy"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getModelComponentName"/>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getData">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/getData/trans"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getIncomingMessages">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/getIncomingMessages/ifitem"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/addTransitionChain">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/addTransitionChain/trans"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/getInterfaceItemLocalId">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/getInterfaceItemLocalId/ifitem"/>
- </genOperations>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedModelComponent/computeCommonChainData">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedModelComponent/computeCommonChainData/chains"/>
- </genOperations>
+ <genClasses ecoreClass="fsmgen.ecore#//Graph">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference fsmgen.ecore#//Graph/nodes"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference fsmgen.ecore#//Graph/links"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//Graph/stateGraph"/>
+ <genOperations ecoreOperation="fsmgen.ecore#//Graph/toString"/>
</genClasses>
- <genClasses ecoreClass="fsmgen.ecore#//ExpandedRefinedState">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference fsmgen.ecore#//ExpandedRefinedState/inheritedEntry"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference fsmgen.ecore#//ExpandedRefinedState/inheritedExit"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference fsmgen.ecore#//ExpandedRefinedState/inheritedDo"/>
- <genOperations ecoreOperation="fsmgen.ecore#//ExpandedRefinedState/init">
- <genParameters ecoreParameter="fsmgen.ecore#//ExpandedRefinedState/init/rs"/>
- </genOperations>
+ <genClasses ecoreClass="fsmgen.ecore#//GraphItem">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute fsmgen.ecore#//GraphItem/inherited"/>
</genClasses>
- <genClasses image="false" ecoreClass="fsmgen.ecore#//IDiagnostician"/>
- <genClasses image="false" ecoreClass="fsmgen.ecore#//ITransitionChainVisitor"/>
- <genClasses ecoreClass="fsmgen.ecore#//TransitionChain">
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//TransitionChain/transition"/>
- <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//TransitionChain/data"/>
- <genOperations ecoreOperation="fsmgen.ecore#//TransitionChain/getStateContext"/>
- <genOperations ecoreOperation="fsmgen.ecore#//TransitionChain/isHandler"/>
- <genOperations ecoreOperation="fsmgen.ecore#//TransitionChain/genExecuteChain">
- <genParameters ecoreParameter="fsmgen.ecore#//TransitionChain/genExecuteChain/tcv"/>
- </genOperations>
+ <genClasses ecoreClass="fsmgen.ecore#//Node">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference fsmgen.ecore#//Node/graph"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference fsmgen.ecore#//Node/subgraph"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//Node/outgoing"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//Node/incoming"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//Node/stateGraphNode"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference fsmgen.ecore#//Node/caughtTriggers"/>
+ <genOperations ecoreOperation="fsmgen.ecore#//Node/toString"/>
+ </genClasses>
+ <genClasses ecoreClass="fsmgen.ecore#//Link">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference fsmgen.ecore#//Link/graph"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//Link/source"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//Link/target"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//Link/chainHeads"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute fsmgen.ecore#//Link/ifitemTriggered"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//Link/commonData"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//Link/transition"/>
+ <genOperations ecoreOperation="fsmgen.ecore#//Link/toString"/>
+ </genClasses>
+ <genClasses ecoreClass="fsmgen.ecore#//CommonTrigger">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//CommonTrigger/msg"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//CommonTrigger/ifitem"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute fsmgen.ecore#//CommonTrigger/trigger"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference fsmgen.ecore#//CommonTrigger/transitions"/>
</genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/plugin.properties b/plugins/org.eclipse.etrice.core.genmodel.fsm/plugin.properties
index 661884708..5f7d8ec87 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/plugin.properties
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/plugin.properties
@@ -1,12 +1,4 @@
-# Copyright (c) 2014 protos software gmbh (http://www.protos.de).
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# CONTRIBUTORS:
-# Henrik Rentz-Reichert (initial contribution)
-#
+#
-pluginName = FsmGen Model
-providerName = www.example.org
+pluginName = Fine State Machine Generator Model
+providerName = Eclipse eTrice
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/plugin.xml b/plugins/org.eclipse.etrice.core.genmodel.fsm/plugin.xml
index 9cd2ee340..ca5612d8b 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/plugin.xml
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/plugin.xml
@@ -2,15 +2,6 @@
<?eclipse version="3.0"?>
<!--
- Copyright (c) 2014 protos software gmbh (http://www.protos.de).
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
- CONTRIBUTORS:
- Henrik Rentz-Reichert (initial contribution)
-
-->
<plugin>
@@ -23,11 +14,4 @@
genModel="model/fsmgen.genmodel"/>
</extension>
- <extension point="org.eclipse.emf.ecore.extension_parser">
- <!-- @generated fsmgen -->
- <parser
- type="fsmgen"
- class="org.eclipse.etrice.core.genmodel.fsm.fsmgen.util.FsmGenResourceFactoryImpl"/>
- </extension>
-
</plugin>
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/CommonTrigger.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/CommonTrigger.java
new file mode 100644
index 000000000..84a78c3c4
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/CommonTrigger.java
@@ -0,0 +1,152 @@
+/**
+ */
+package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.etrice.core.fsm.fSM.AbstractInterfaceItem;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Common Trigger</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#getMsg <em>Msg</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#getIfitem <em>Ifitem</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#isHasGuard <em>Has Guard</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#getTrigger <em>Trigger</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#getLinks <em>Links</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getCommonTrigger()
+ * @model
+ * @generated
+ */
+public interface CommonTrigger extends FSMGenElement {
+ /**
+ * Returns the value of the '<em><b>Msg</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Msg</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Msg</em>' reference.
+ * @see #setMsg(EObject)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getCommonTrigger_Msg()
+ * @model
+ * @generated
+ */
+ EObject getMsg();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#getMsg <em>Msg</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Msg</em>' reference.
+ * @see #getMsg()
+ * @generated
+ */
+ void setMsg(EObject value);
+
+ /**
+ * Returns the value of the '<em><b>Ifitem</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Ifitem</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Ifitem</em>' reference.
+ * @see #setIfitem(AbstractInterfaceItem)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getCommonTrigger_Ifitem()
+ * @model
+ * @generated
+ */
+ AbstractInterfaceItem getIfitem();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#getIfitem <em>Ifitem</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Ifitem</em>' reference.
+ * @see #getIfitem()
+ * @generated
+ */
+ void setIfitem(AbstractInterfaceItem value);
+
+ /**
+ * Returns the value of the '<em><b>Trigger</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Trigger</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Trigger</em>' attribute.
+ * @see #setTrigger(String)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getCommonTrigger_Trigger()
+ * @model
+ * @generated
+ */
+ String getTrigger();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#getTrigger <em>Trigger</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Trigger</em>' attribute.
+ * @see #getTrigger()
+ * @generated
+ */
+ void setTrigger(String value);
+
+ /**
+ * Returns the value of the '<em><b>Links</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Links</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>Links</em>' reference list.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getCommonTrigger_Links()
+ * @model
+ * @generated
+ */
+ EList<Link> getLinks();
+
+ /**
+ * Returns the value of the '<em><b>Has Guard</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Has Guard</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Has Guard</em>' attribute.
+ * @see #setHasGuard(boolean)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getCommonTrigger_HasGuard()
+ * @model
+ * @generated
+ */
+ boolean isHasGuard();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#isHasGuard <em>Has Guard</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Has Guard</em>' attribute.
+ * @see #isHasGuard()
+ * @generated
+ */
+ void setHasGuard(boolean value);
+
+} // CommonTrigger
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FSMGenElement.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FSMGenElement.java
new file mode 100644
index 000000000..c54c1f195
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FSMGenElement.java
@@ -0,0 +1,18 @@
+/**
+ */
+package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>FSM Gen Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getFSMGenElement()
+ * @model
+ * @generated
+ */
+public interface FSMGenElement extends EObject {
+} // FSMGenElement
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenFactory.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenFactory.java
new file mode 100644
index 000000000..c7b2e0478
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenFactory.java
@@ -0,0 +1,96 @@
+/**
+ */
+package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage
+ * @generated
+ */
+public interface FsmGenFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ FsmGenFactory eINSTANCE = org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Graph Container</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Graph Container</em>'.
+ * @generated
+ */
+ GraphContainer createGraphContainer();
+
+ /**
+ * Returns a new object of class '<em>Graph</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Graph</em>'.
+ * @generated
+ */
+ Graph createGraph();
+
+ /**
+ * Returns a new object of class '<em>Graph Item</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Graph Item</em>'.
+ * @generated
+ */
+ GraphItem createGraphItem();
+
+ /**
+ * Returns a new object of class '<em>Node</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Node</em>'.
+ * @generated
+ */
+ Node createNode();
+
+ /**
+ * Returns a new object of class '<em>Link</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Link</em>'.
+ * @generated
+ */
+ Link createLink();
+
+ /**
+ * Returns a new object of class '<em>Common Trigger</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Common Trigger</em>'.
+ * @generated
+ */
+ CommonTrigger createCommonTrigger();
+
+ /**
+ * Returns a new object of class '<em>FSM Gen Element</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>FSM Gen Element</em>'.
+ * @generated
+ */
+ FSMGenElement createFSMGenElement();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ FsmGenPackage getFsmGenPackage();
+
+} //FsmGenFactory
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenPackage.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenPackage.java
new file mode 100644
index 000000000..0fdae6956
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenPackage.java
@@ -0,0 +1,1333 @@
+/**
+ */
+package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface FsmGenPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "fsmgen";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/etrice/generator/fsm";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "fsmgen";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ FsmGenPackage eINSTANCE = org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FSMGenElementImpl <em>FSM Gen Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FSMGenElementImpl
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getFSMGenElement()
+ * @generated
+ */
+ int FSM_GEN_ELEMENT = 6;
+
+ /**
+ * The number of structural features of the '<em>FSM Gen Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FSM_GEN_ELEMENT_FEATURE_COUNT = 0;
+
+ /**
+ * The number of operations of the '<em>FSM Gen Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int FSM_GEN_ELEMENT_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphContainerImpl <em>Graph Container</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphContainerImpl
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getGraphContainer()
+ * @generated
+ */
+ int GRAPH_CONTAINER = 0;
+
+ /**
+ * The feature id for the '<em><b>Graph</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH_CONTAINER__GRAPH = FSM_GEN_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Component</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH_CONTAINER__COMPONENT = FSM_GEN_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Initialized Triggers In States</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH_CONTAINER__INITIALIZED_TRIGGERS_IN_STATES = FSM_GEN_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Initialized Chain Heads</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH_CONTAINER__INITIALIZED_CHAIN_HEADS = FSM_GEN_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Initialized Common Data</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH_CONTAINER__INITIALIZED_COMMON_DATA = FSM_GEN_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The number of structural features of the '<em>Graph Container</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH_CONTAINER_FEATURE_COUNT = FSM_GEN_ELEMENT_FEATURE_COUNT + 5;
+
+ /**
+ * The number of operations of the '<em>Graph Container</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH_CONTAINER_OPERATION_COUNT = FSM_GEN_ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphImpl <em>Graph</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphImpl
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getGraph()
+ * @generated
+ */
+ int GRAPH = 1;
+
+ /**
+ * The feature id for the '<em><b>Nodes</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH__NODES = FSM_GEN_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Links</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH__LINKS = FSM_GEN_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>State Graph</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH__STATE_GRAPH = FSM_GEN_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Node</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH__NODE = FSM_GEN_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>Graph</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH_FEATURE_COUNT = FSM_GEN_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The operation id for the '<em>To String</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH___TO_STRING = FSM_GEN_ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Graph</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH_OPERATION_COUNT = FSM_GEN_ELEMENT_OPERATION_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphItemImpl <em>Graph Item</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphItemImpl
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getGraphItem()
+ * @generated
+ */
+ int GRAPH_ITEM = 2;
+
+ /**
+ * The feature id for the '<em><b>Inherited</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH_ITEM__INHERITED = FSM_GEN_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Graph Item</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH_ITEM_FEATURE_COUNT = FSM_GEN_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of operations of the '<em>Graph Item</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH_ITEM_OPERATION_COUNT = FSM_GEN_ELEMENT_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.NodeImpl <em>Node</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.NodeImpl
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getNode()
+ * @generated
+ */
+ int NODE = 3;
+
+ /**
+ * The feature id for the '<em><b>Inherited</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE__INHERITED = GRAPH_ITEM__INHERITED;
+
+ /**
+ * The feature id for the '<em><b>Graph</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE__GRAPH = GRAPH_ITEM_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Subgraph</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE__SUBGRAPH = GRAPH_ITEM_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Outgoing</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE__OUTGOING = GRAPH_ITEM_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Incoming</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE__INCOMING = GRAPH_ITEM_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>State Graph Node</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE__STATE_GRAPH_NODE = GRAPH_ITEM_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Caught Triggers</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE__CAUGHT_TRIGGERS = GRAPH_ITEM_FEATURE_COUNT + 5;
+
+ /**
+ * The feature id for the '<em><b>Inheritance Level</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE__INHERITANCE_LEVEL = GRAPH_ITEM_FEATURE_COUNT + 6;
+
+ /**
+ * The number of structural features of the '<em>Node</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_FEATURE_COUNT = GRAPH_ITEM_FEATURE_COUNT + 7;
+
+ /**
+ * The operation id for the '<em>To String</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE___TO_STRING = GRAPH_ITEM_OPERATION_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Node</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int NODE_OPERATION_COUNT = GRAPH_ITEM_OPERATION_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.LinkImpl <em>Link</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.LinkImpl
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getLink()
+ * @generated
+ */
+ int LINK = 4;
+
+ /**
+ * The feature id for the '<em><b>Inherited</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK__INHERITED = GRAPH_ITEM__INHERITED;
+
+ /**
+ * The feature id for the '<em><b>Graph</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK__GRAPH = GRAPH_ITEM_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Source</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK__SOURCE = GRAPH_ITEM_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Target</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK__TARGET = GRAPH_ITEM_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Chain Heads</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK__CHAIN_HEADS = GRAPH_ITEM_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Ifitem Triggered</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK__IFITEM_TRIGGERED = GRAPH_ITEM_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Common Data</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK__COMMON_DATA = GRAPH_ITEM_FEATURE_COUNT + 5;
+
+ /**
+ * The feature id for the '<em><b>Transition</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK__TRANSITION = GRAPH_ITEM_FEATURE_COUNT + 6;
+
+ /**
+ * The number of structural features of the '<em>Link</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK_FEATURE_COUNT = GRAPH_ITEM_FEATURE_COUNT + 7;
+
+ /**
+ * The operation id for the '<em>To String</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK___TO_STRING = GRAPH_ITEM_OPERATION_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Link</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int LINK_OPERATION_COUNT = GRAPH_ITEM_OPERATION_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.CommonTriggerImpl <em>Common Trigger</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.CommonTriggerImpl
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getCommonTrigger()
+ * @generated
+ */
+ int COMMON_TRIGGER = 5;
+
+ /**
+ * The feature id for the '<em><b>Msg</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMMON_TRIGGER__MSG = FSM_GEN_ELEMENT_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Ifitem</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMMON_TRIGGER__IFITEM = FSM_GEN_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Has Guard</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMMON_TRIGGER__HAS_GUARD = FSM_GEN_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Trigger</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMMON_TRIGGER__TRIGGER = FSM_GEN_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Links</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMMON_TRIGGER__LINKS = FSM_GEN_ELEMENT_FEATURE_COUNT + 4;
+
+ /**
+ * The number of structural features of the '<em>Common Trigger</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMMON_TRIGGER_FEATURE_COUNT = FSM_GEN_ELEMENT_FEATURE_COUNT + 5;
+
+ /**
+ * The number of operations of the '<em>Common Trigger</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COMMON_TRIGGER_OPERATION_COUNT = FSM_GEN_ELEMENT_OPERATION_COUNT + 0;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer <em>Graph Container</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Graph Container</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer
+ * @generated
+ */
+ EClass getGraphContainer();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#getGraph <em>Graph</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Graph</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#getGraph()
+ * @see #getGraphContainer()
+ * @generated
+ */
+ EReference getGraphContainer_Graph();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#getComponent <em>Component</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Component</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#getComponent()
+ * @see #getGraphContainer()
+ * @generated
+ */
+ EReference getGraphContainer_Component();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#isInitializedTriggersInStates <em>Initialized Triggers In States</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Initialized Triggers In States</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#isInitializedTriggersInStates()
+ * @see #getGraphContainer()
+ * @generated
+ */
+ EAttribute getGraphContainer_InitializedTriggersInStates();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#isInitializedChainHeads <em>Initialized Chain Heads</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Initialized Chain Heads</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#isInitializedChainHeads()
+ * @see #getGraphContainer()
+ * @generated
+ */
+ EAttribute getGraphContainer_InitializedChainHeads();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#isInitializedCommonData <em>Initialized Common Data</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Initialized Common Data</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#isInitializedCommonData()
+ * @see #getGraphContainer()
+ * @generated
+ */
+ EAttribute getGraphContainer_InitializedCommonData();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph <em>Graph</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Graph</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph
+ * @generated
+ */
+ EClass getGraph();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNodes <em>Nodes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Nodes</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNodes()
+ * @see #getGraph()
+ * @generated
+ */
+ EReference getGraph_Nodes();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getLinks <em>Links</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Links</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getLinks()
+ * @see #getGraph()
+ * @generated
+ */
+ EReference getGraph_Links();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getStateGraph <em>State Graph</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>State Graph</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getStateGraph()
+ * @see #getGraph()
+ * @generated
+ */
+ EReference getGraph_StateGraph();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNode <em>Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Node</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNode()
+ * @see #getGraph()
+ * @generated
+ */
+ EReference getGraph_Node();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#toString() <em>To String</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the '<em>To String</em>' operation.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#toString()
+ * @generated
+ */
+ EOperation getGraph__ToString();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphItem <em>Graph Item</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Graph Item</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphItem
+ * @generated
+ */
+ EClass getGraphItem();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphItem#isInherited <em>Inherited</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Inherited</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphItem#isInherited()
+ * @see #getGraphItem()
+ * @generated
+ */
+ EAttribute getGraphItem_Inherited();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node <em>Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Node</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node
+ * @generated
+ */
+ EClass getNode();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getGraph <em>Graph</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Graph</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getGraph()
+ * @see #getNode()
+ * @generated
+ */
+ EReference getNode_Graph();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getSubgraph <em>Subgraph</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Subgraph</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getSubgraph()
+ * @see #getNode()
+ * @generated
+ */
+ EReference getNode_Subgraph();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getOutgoing <em>Outgoing</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Outgoing</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getOutgoing()
+ * @see #getNode()
+ * @generated
+ */
+ EReference getNode_Outgoing();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getIncoming <em>Incoming</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Incoming</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getIncoming()
+ * @see #getNode()
+ * @generated
+ */
+ EReference getNode_Incoming();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getStateGraphNode <em>State Graph Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>State Graph Node</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getStateGraphNode()
+ * @see #getNode()
+ * @generated
+ */
+ EReference getNode_StateGraphNode();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getCaughtTriggers <em>Caught Triggers</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Caught Triggers</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getCaughtTriggers()
+ * @see #getNode()
+ * @generated
+ */
+ EReference getNode_CaughtTriggers();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getInheritanceLevel <em>Inheritance Level</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Inheritance Level</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getInheritanceLevel()
+ * @see #getNode()
+ * @generated
+ */
+ EAttribute getNode_InheritanceLevel();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#toString() <em>To String</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the '<em>To String</em>' operation.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#toString()
+ * @generated
+ */
+ EOperation getNode__ToString();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link <em>Link</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Link</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link
+ * @generated
+ */
+ EClass getLink();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getGraph <em>Graph</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the container reference '<em>Graph</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getGraph()
+ * @see #getLink()
+ * @generated
+ */
+ EReference getLink_Graph();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getSource <em>Source</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Source</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getSource()
+ * @see #getLink()
+ * @generated
+ */
+ EReference getLink_Source();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getTarget <em>Target</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Target</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getTarget()
+ * @see #getLink()
+ * @generated
+ */
+ EReference getLink_Target();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getChainHeads <em>Chain Heads</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Chain Heads</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getChainHeads()
+ * @see #getLink()
+ * @generated
+ */
+ EReference getLink_ChainHeads();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#isIfitemTriggered <em>Ifitem Triggered</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Ifitem Triggered</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#isIfitemTriggered()
+ * @see #getLink()
+ * @generated
+ */
+ EAttribute getLink_IfitemTriggered();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getCommonData <em>Common Data</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Common Data</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getCommonData()
+ * @see #getLink()
+ * @generated
+ */
+ EReference getLink_CommonData();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getTransition <em>Transition</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Transition</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getTransition()
+ * @see #getLink()
+ * @generated
+ */
+ EReference getLink_Transition();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#toString() <em>To String</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the '<em>To String</em>' operation.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#toString()
+ * @generated
+ */
+ EOperation getLink__ToString();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger <em>Common Trigger</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Common Trigger</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger
+ * @generated
+ */
+ EClass getCommonTrigger();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#getMsg <em>Msg</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Msg</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#getMsg()
+ * @see #getCommonTrigger()
+ * @generated
+ */
+ EReference getCommonTrigger_Msg();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#getIfitem <em>Ifitem</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Ifitem</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#getIfitem()
+ * @see #getCommonTrigger()
+ * @generated
+ */
+ EReference getCommonTrigger_Ifitem();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#getTrigger <em>Trigger</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Trigger</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#getTrigger()
+ * @see #getCommonTrigger()
+ * @generated
+ */
+ EAttribute getCommonTrigger_Trigger();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#getLinks <em>Links</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Links</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#getLinks()
+ * @see #getCommonTrigger()
+ * @generated
+ */
+ EReference getCommonTrigger_Links();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.FSMGenElement <em>FSM Gen Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>FSM Gen Element</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FSMGenElement
+ * @generated
+ */
+ EClass getFSMGenElement();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#isHasGuard <em>Has Guard</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Has Guard</em>'.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger#isHasGuard()
+ * @see #getCommonTrigger()
+ * @generated
+ */
+ EAttribute getCommonTrigger_HasGuard();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ FsmGenFactory getFsmGenFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphContainerImpl <em>Graph Container</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphContainerImpl
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getGraphContainer()
+ * @generated
+ */
+ EClass GRAPH_CONTAINER = eINSTANCE.getGraphContainer();
+
+ /**
+ * The meta object literal for the '<em><b>Graph</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference GRAPH_CONTAINER__GRAPH = eINSTANCE.getGraphContainer_Graph();
+
+ /**
+ * The meta object literal for the '<em><b>Component</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference GRAPH_CONTAINER__COMPONENT = eINSTANCE.getGraphContainer_Component();
+
+ /**
+ * The meta object literal for the '<em><b>Initialized Triggers In States</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute GRAPH_CONTAINER__INITIALIZED_TRIGGERS_IN_STATES = eINSTANCE.getGraphContainer_InitializedTriggersInStates();
+
+ /**
+ * The meta object literal for the '<em><b>Initialized Chain Heads</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute GRAPH_CONTAINER__INITIALIZED_CHAIN_HEADS = eINSTANCE.getGraphContainer_InitializedChainHeads();
+
+ /**
+ * The meta object literal for the '<em><b>Initialized Common Data</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute GRAPH_CONTAINER__INITIALIZED_COMMON_DATA = eINSTANCE.getGraphContainer_InitializedCommonData();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphImpl <em>Graph</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphImpl
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getGraph()
+ * @generated
+ */
+ EClass GRAPH = eINSTANCE.getGraph();
+
+ /**
+ * The meta object literal for the '<em><b>Nodes</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference GRAPH__NODES = eINSTANCE.getGraph_Nodes();
+
+ /**
+ * The meta object literal for the '<em><b>Links</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference GRAPH__LINKS = eINSTANCE.getGraph_Links();
+
+ /**
+ * The meta object literal for the '<em><b>State Graph</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference GRAPH__STATE_GRAPH = eINSTANCE.getGraph_StateGraph();
+
+ /**
+ * The meta object literal for the '<em><b>Node</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference GRAPH__NODE = eINSTANCE.getGraph_Node();
+
+ /**
+ * The meta object literal for the '<em><b>To String</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EOperation GRAPH___TO_STRING = eINSTANCE.getGraph__ToString();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphItemImpl <em>Graph Item</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphItemImpl
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getGraphItem()
+ * @generated
+ */
+ EClass GRAPH_ITEM = eINSTANCE.getGraphItem();
+
+ /**
+ * The meta object literal for the '<em><b>Inherited</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute GRAPH_ITEM__INHERITED = eINSTANCE.getGraphItem_Inherited();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.NodeImpl <em>Node</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.NodeImpl
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getNode()
+ * @generated
+ */
+ EClass NODE = eINSTANCE.getNode();
+
+ /**
+ * The meta object literal for the '<em><b>Graph</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference NODE__GRAPH = eINSTANCE.getNode_Graph();
+
+ /**
+ * The meta object literal for the '<em><b>Subgraph</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference NODE__SUBGRAPH = eINSTANCE.getNode_Subgraph();
+
+ /**
+ * The meta object literal for the '<em><b>Outgoing</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference NODE__OUTGOING = eINSTANCE.getNode_Outgoing();
+
+ /**
+ * The meta object literal for the '<em><b>Incoming</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference NODE__INCOMING = eINSTANCE.getNode_Incoming();
+
+ /**
+ * The meta object literal for the '<em><b>State Graph Node</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference NODE__STATE_GRAPH_NODE = eINSTANCE.getNode_StateGraphNode();
+
+ /**
+ * The meta object literal for the '<em><b>Caught Triggers</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference NODE__CAUGHT_TRIGGERS = eINSTANCE.getNode_CaughtTriggers();
+
+ /**
+ * The meta object literal for the '<em><b>Inheritance Level</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute NODE__INHERITANCE_LEVEL = eINSTANCE.getNode_InheritanceLevel();
+
+ /**
+ * The meta object literal for the '<em><b>To String</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EOperation NODE___TO_STRING = eINSTANCE.getNode__ToString();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.LinkImpl <em>Link</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.LinkImpl
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getLink()
+ * @generated
+ */
+ EClass LINK = eINSTANCE.getLink();
+
+ /**
+ * The meta object literal for the '<em><b>Graph</b></em>' container reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LINK__GRAPH = eINSTANCE.getLink_Graph();
+
+ /**
+ * The meta object literal for the '<em><b>Source</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LINK__SOURCE = eINSTANCE.getLink_Source();
+
+ /**
+ * The meta object literal for the '<em><b>Target</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LINK__TARGET = eINSTANCE.getLink_Target();
+
+ /**
+ * The meta object literal for the '<em><b>Chain Heads</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LINK__CHAIN_HEADS = eINSTANCE.getLink_ChainHeads();
+
+ /**
+ * The meta object literal for the '<em><b>Ifitem Triggered</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute LINK__IFITEM_TRIGGERED = eINSTANCE.getLink_IfitemTriggered();
+
+ /**
+ * The meta object literal for the '<em><b>Common Data</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LINK__COMMON_DATA = eINSTANCE.getLink_CommonData();
+
+ /**
+ * The meta object literal for the '<em><b>Transition</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference LINK__TRANSITION = eINSTANCE.getLink_Transition();
+
+ /**
+ * The meta object literal for the '<em><b>To String</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EOperation LINK___TO_STRING = eINSTANCE.getLink__ToString();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.CommonTriggerImpl <em>Common Trigger</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.CommonTriggerImpl
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getCommonTrigger()
+ * @generated
+ */
+ EClass COMMON_TRIGGER = eINSTANCE.getCommonTrigger();
+
+ /**
+ * The meta object literal for the '<em><b>Msg</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference COMMON_TRIGGER__MSG = eINSTANCE.getCommonTrigger_Msg();
+
+ /**
+ * The meta object literal for the '<em><b>Ifitem</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference COMMON_TRIGGER__IFITEM = eINSTANCE.getCommonTrigger_Ifitem();
+
+ /**
+ * The meta object literal for the '<em><b>Trigger</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute COMMON_TRIGGER__TRIGGER = eINSTANCE.getCommonTrigger_Trigger();
+
+ /**
+ * The meta object literal for the '<em><b>Links</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference COMMON_TRIGGER__LINKS = eINSTANCE.getCommonTrigger_Links();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FSMGenElementImpl <em>FSM Gen Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FSMGenElementImpl
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getFSMGenElement()
+ * @generated
+ */
+ EClass FSM_GEN_ELEMENT = eINSTANCE.getFSMGenElement();
+
+ /**
+ * The meta object literal for the '<em><b>Has Guard</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute COMMON_TRIGGER__HAS_GUARD = eINSTANCE.getCommonTrigger_HasGuard();
+
+ }
+
+} //FsmGenPackage
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Graph.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Graph.java
new file mode 100644
index 000000000..81760bb60
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Graph.java
@@ -0,0 +1,126 @@
+/**
+ */
+package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.etrice.core.fsm.fSM.StateGraph;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Graph</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNodes <em>Nodes</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getLinks <em>Links</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getStateGraph <em>State Graph</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNode <em>Node</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getGraph()
+ * @model
+ * @generated
+ */
+public interface Graph extends FSMGenElement {
+ /**
+ * Returns the value of the '<em><b>Nodes</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getGraph <em>Graph</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Nodes</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Nodes</em>' containment reference list.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getGraph_Nodes()
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getGraph
+ * @model opposite="graph" containment="true"
+ * @generated
+ */
+ EList<Node> getNodes();
+
+ /**
+ * Returns the value of the '<em><b>Links</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getGraph <em>Graph</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Links</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Links</em>' containment reference list.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getGraph_Links()
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getGraph
+ * @model opposite="graph" containment="true"
+ * @generated
+ */
+ EList<Link> getLinks();
+
+ /**
+ * Returns the value of the '<em><b>State Graph</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>State Graph</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>State Graph</em>' reference.
+ * @see #setStateGraph(StateGraph)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getGraph_StateGraph()
+ * @model
+ * @generated
+ */
+ StateGraph getStateGraph();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getStateGraph <em>State Graph</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>State Graph</em>' reference.
+ * @see #getStateGraph()
+ * @generated
+ */
+ void setStateGraph(StateGraph value);
+
+ /**
+ * Returns the value of the '<em><b>Node</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getSubgraph <em>Subgraph</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Node</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Node</em>' container reference.
+ * @see #setNode(Node)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getGraph_Node()
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getSubgraph
+ * @model opposite="subgraph" transient="false"
+ * @generated
+ */
+ Node getNode();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNode <em>Node</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Node</em>' container reference.
+ * @see #getNode()
+ * @generated
+ */
+ void setNode(Node value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='StringBuilder result = new StringBuilder();\r\nresult.append(\"StateGraph {\\n\");\r\nfor (Node n : getNodes()) {\r\n\tresult.append(\" \" + n.toString() + \"\\n\");\r\n}\r\nfor (Link l : getLinks()) {\r\n\tresult.append(\" \" + l.toString() + \"\\n\");\r\n}\r\nresult.append(\"}\");\r\nreturn result.toString();'"
+ * @generated
+ */
+ String toString();
+
+} // Graph
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/GraphContainer.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/GraphContainer.java
new file mode 100644
index 000000000..8f1f699d0
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/GraphContainer.java
@@ -0,0 +1,158 @@
+/**
+ */
+package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
+
+import org.eclipse.etrice.core.fsm.fSM.ModelComponent;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Graph Container</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#getGraph <em>Graph</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#getComponent <em>Component</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#isInitializedTriggersInStates <em>Initialized Triggers In States</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#isInitializedChainHeads <em>Initialized Chain Heads</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#isInitializedCommonData <em>Initialized Common Data</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getGraphContainer()
+ * @model
+ * @generated
+ */
+public interface GraphContainer extends FSMGenElement {
+ /**
+ * Returns the value of the '<em><b>Graph</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Graph</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Graph</em>' containment reference.
+ * @see #setGraph(Graph)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getGraphContainer_Graph()
+ * @model containment="true"
+ * @generated
+ */
+ Graph getGraph();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#getGraph <em>Graph</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Graph</em>' containment reference.
+ * @see #getGraph()
+ * @generated
+ */
+ void setGraph(Graph value);
+
+ /**
+ * Returns the value of the '<em><b>Component</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Component</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Component</em>' reference.
+ * @see #setComponent(ModelComponent)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getGraphContainer_Component()
+ * @model
+ * @generated
+ */
+ ModelComponent getComponent();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#getComponent <em>Component</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Component</em>' reference.
+ * @see #getComponent()
+ * @generated
+ */
+ void setComponent(ModelComponent value);
+
+ /**
+ * Returns the value of the '<em><b>Initialized Triggers In States</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Initialized Triggers In States</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Initialized Triggers In States</em>' attribute.
+ * @see #setInitializedTriggersInStates(boolean)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getGraphContainer_InitializedTriggersInStates()
+ * @model
+ * @generated
+ */
+ boolean isInitializedTriggersInStates();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#isInitializedTriggersInStates <em>Initialized Triggers In States</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Initialized Triggers In States</em>' attribute.
+ * @see #isInitializedTriggersInStates()
+ * @generated
+ */
+ void setInitializedTriggersInStates(boolean value);
+
+ /**
+ * Returns the value of the '<em><b>Initialized Chain Heads</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Initialized Chain Heads</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Initialized Chain Heads</em>' attribute.
+ * @see #setInitializedChainHeads(boolean)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getGraphContainer_InitializedChainHeads()
+ * @model
+ * @generated
+ */
+ boolean isInitializedChainHeads();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#isInitializedChainHeads <em>Initialized Chain Heads</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Initialized Chain Heads</em>' attribute.
+ * @see #isInitializedChainHeads()
+ * @generated
+ */
+ void setInitializedChainHeads(boolean value);
+
+ /**
+ * Returns the value of the '<em><b>Initialized Common Data</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Initialized Common Data</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Initialized Common Data</em>' attribute.
+ * @see #setInitializedCommonData(boolean)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getGraphContainer_InitializedCommonData()
+ * @model
+ * @generated
+ */
+ boolean isInitializedCommonData();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer#isInitializedCommonData <em>Initialized Common Data</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Initialized Common Data</em>' attribute.
+ * @see #isInitializedCommonData()
+ * @generated
+ */
+ void setInitializedCommonData(boolean value);
+
+} // GraphContainer
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/GraphItem.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/GraphItem.java
new file mode 100644
index 000000000..83f2d32e2
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/GraphItem.java
@@ -0,0 +1,49 @@
+/**
+ */
+package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Graph Item</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphItem#isInherited <em>Inherited</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getGraphItem()
+ * @model
+ * @generated
+ */
+public interface GraphItem extends FSMGenElement {
+ /**
+ * Returns the value of the '<em><b>Inherited</b></em>' attribute.
+ * The default value is <code>"false"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Inherited</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Inherited</em>' attribute.
+ * @see #setInherited(boolean)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getGraphItem_Inherited()
+ * @model default="false"
+ * @generated
+ */
+ boolean isInherited();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphItem#isInherited <em>Inherited</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Inherited</em>' attribute.
+ * @see #isInherited()
+ * @generated
+ */
+ void setInherited(boolean value);
+
+} // GraphItem
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Link.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Link.java
new file mode 100644
index 000000000..bbceb1278
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Link.java
@@ -0,0 +1,219 @@
+/**
+ */
+package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.etrice.core.fsm.fSM.TransitionBase;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Link</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getGraph <em>Graph</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getSource <em>Source</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getTarget <em>Target</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getChainHeads <em>Chain Heads</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#isIfitemTriggered <em>Ifitem Triggered</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getCommonData <em>Common Data</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getTransition <em>Transition</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getLink()
+ * @model
+ * @generated
+ */
+public interface Link extends GraphItem {
+ /**
+ * Returns the value of the '<em><b>Graph</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getLinks <em>Links</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Graph</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Graph</em>' container reference.
+ * @see #setGraph(Graph)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getLink_Graph()
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getLinks
+ * @model opposite="links" transient="false"
+ * @generated
+ */
+ Graph getGraph();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getGraph <em>Graph</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Graph</em>' container reference.
+ * @see #getGraph()
+ * @generated
+ */
+ void setGraph(Graph value);
+
+ /**
+ * Returns the value of the '<em><b>Source</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getOutgoing <em>Outgoing</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Source</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Source</em>' reference.
+ * @see #setSource(Node)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getLink_Source()
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getOutgoing
+ * @model opposite="outgoing"
+ * @generated
+ */
+ Node getSource();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getSource <em>Source</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Source</em>' reference.
+ * @see #getSource()
+ * @generated
+ */
+ void setSource(Node value);
+
+ /**
+ * Returns the value of the '<em><b>Target</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getIncoming <em>Incoming</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Target</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Target</em>' reference.
+ * @see #setTarget(Node)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getLink_Target()
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getIncoming
+ * @model opposite="incoming"
+ * @generated
+ */
+ Node getTarget();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getTarget <em>Target</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Target</em>' reference.
+ * @see #getTarget()
+ * @generated
+ */
+ void setTarget(Node value);
+
+ /**
+ * Returns the value of the '<em><b>Chain Heads</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Chain Heads</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>Chain Heads</em>' reference list.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getLink_ChainHeads()
+ * @model
+ * @generated
+ */
+ EList<Link> getChainHeads();
+
+ /**
+ * Returns the value of the '<em><b>Ifitem Triggered</b></em>' attribute.
+ * The default value is <code>"true"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Ifitem Triggered</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Ifitem Triggered</em>' attribute.
+ * @see #setIfitemTriggered(boolean)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getLink_IfitemTriggered()
+ * @model default="true"
+ * @generated
+ */
+ boolean isIfitemTriggered();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#isIfitemTriggered <em>Ifitem Triggered</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Ifitem Triggered</em>' attribute.
+ * @see #isIfitemTriggered()
+ * @generated
+ */
+ void setIfitemTriggered(boolean value);
+
+ /**
+ * Returns the value of the '<em><b>Common Data</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Common Data</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Common Data</em>' reference.
+ * @see #setCommonData(EObject)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getLink_CommonData()
+ * @model
+ * @generated
+ */
+ EObject getCommonData();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getCommonData <em>Common Data</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Common Data</em>' reference.
+ * @see #getCommonData()
+ * @generated
+ */
+ void setCommonData(EObject value);
+
+ /**
+ * Returns the value of the '<em><b>Transition</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Transition</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Transition</em>' reference.
+ * @see #setTransition(TransitionBase)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getLink_Transition()
+ * @model
+ * @generated
+ */
+ TransitionBase getTransition();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getTransition <em>Transition</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Transition</em>' reference.
+ * @see #getTransition()
+ * @generated
+ */
+ void setTransition(TransitionBase value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='if (getTransition() instanceof <%org.eclipse.etrice.core.fsm.fSM.InitialTransition%>) {\r\n\treturn \"Link initial -> \" + getTarget().toString() + \" (InitialTransition)\";\r\n}\r\nelse if (getTransition() instanceof <%org.eclipse.etrice.core.fsm.fSM.NonInitialTransition%>) {\r\n\treturn \"Link \" + getSource().toString() + \" -> \" + getTarget().toString() + \" (InitialTransition)\";\r\n}\r\nelse if (getTransition() instanceof <%org.eclipse.etrice.core.fsm.fSM.RefinedTransition%>) {\r\n\treturn \"RefinedTransition\";\r\n}\r\nreturn \"?\";'"
+ * @generated
+ */
+ String toString();
+
+} // Link
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Node.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Node.java
new file mode 100644
index 000000000..3b0530b00
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/Node.java
@@ -0,0 +1,200 @@
+/**
+ */
+package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.etrice.core.fsm.fSM.StateGraphNode;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Node</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getGraph <em>Graph</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getSubgraph <em>Subgraph</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getOutgoing <em>Outgoing</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getIncoming <em>Incoming</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getStateGraphNode <em>State Graph Node</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getCaughtTriggers <em>Caught Triggers</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getInheritanceLevel <em>Inheritance Level</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getNode()
+ * @model
+ * @generated
+ */
+public interface Node extends GraphItem {
+ /**
+ * Returns the value of the '<em><b>Graph</b></em>' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNodes <em>Nodes</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Graph</em>' container reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Graph</em>' container reference.
+ * @see #setGraph(Graph)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getNode_Graph()
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNodes
+ * @model opposite="nodes" transient="false"
+ * @generated
+ */
+ Graph getGraph();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getGraph <em>Graph</em>}' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Graph</em>' container reference.
+ * @see #getGraph()
+ * @generated
+ */
+ void setGraph(Graph value);
+
+ /**
+ * Returns the value of the '<em><b>Subgraph</b></em>' containment reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNode <em>Node</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Subgraph</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Subgraph</em>' containment reference.
+ * @see #setSubgraph(Graph)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getNode_Subgraph()
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph#getNode
+ * @model opposite="node" containment="true"
+ * @generated
+ */
+ Graph getSubgraph();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getSubgraph <em>Subgraph</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Subgraph</em>' containment reference.
+ * @see #getSubgraph()
+ * @generated
+ */
+ void setSubgraph(Graph value);
+
+ /**
+ * Returns the value of the '<em><b>Outgoing</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getSource <em>Source</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Outgoing</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>Outgoing</em>' reference list.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getNode_Outgoing()
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getSource
+ * @model opposite="source"
+ * @generated
+ */
+ EList<Link> getOutgoing();
+
+ /**
+ * Returns the value of the '<em><b>Incoming</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getTarget <em>Target</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Incoming</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>Incoming</em>' reference list.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getNode_Incoming()
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link#getTarget
+ * @model opposite="target"
+ * @generated
+ */
+ EList<Link> getIncoming();
+
+ /**
+ * Returns the value of the '<em><b>State Graph Node</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>State Graph Node</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>State Graph Node</em>' reference.
+ * @see #setStateGraphNode(StateGraphNode)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getNode_StateGraphNode()
+ * @model
+ * @generated
+ */
+ StateGraphNode getStateGraphNode();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getStateGraphNode <em>State Graph Node</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>State Graph Node</em>' reference.
+ * @see #getStateGraphNode()
+ * @generated
+ */
+ void setStateGraphNode(StateGraphNode value);
+
+ /**
+ * Returns the value of the '<em><b>Caught Triggers</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Caught Triggers</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Caught Triggers</em>' containment reference list.
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getNode_CaughtTriggers()
+ * @model containment="true"
+ * @generated
+ */
+ EList<CommonTrigger> getCaughtTriggers();
+
+ /**
+ * Returns the value of the '<em><b>Inheritance Level</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Inheritance Level</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Inheritance Level</em>' attribute.
+ * @see #setInheritanceLevel(int)
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getNode_InheritanceLevel()
+ * @model
+ * @generated
+ */
+ int getInheritanceLevel();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node#getInheritanceLevel <em>Inheritance Level</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Inheritance Level</em>' attribute.
+ * @see #getInheritanceLevel()
+ * @generated
+ */
+ void setInheritanceLevel(int value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='String type = \"?\";\r\nif (getStateGraphNode() instanceof <%org.eclipse.etrice.core.fsm.fSM.RefinedState%>) {\r\n\ttype = \"RefinedState\";\r\n}\r\nelse if (getStateGraphNode() instanceof <%org.eclipse.etrice.core.fsm.fSM.SimpleState%>) {\r\n\ttype = \"SimpleState\";\r\n}\r\nelse if (getStateGraphNode() instanceof <%org.eclipse.etrice.core.fsm.fSM.TrPoint%>) {\r\n\ttype = \"TrPoint\";\r\n}\r\nelse if (getStateGraphNode() instanceof <%org.eclipse.etrice.core.fsm.fSM.ChoicePoint%>) {\r\n\ttype = \"ChoicePoint\";\r\n}\r\nreturn \"Node \" + getStateGraphNode().getName() + \" (\" + type + \")\";'"
+ * @generated
+ */
+ String toString();
+
+} // Node
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/ActiveTriggerImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/CommonTriggerImpl.java
index 3757729c1..cf7e61ca7 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/ActiveTriggerImpl.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/CommonTriggerImpl.java
@@ -1,48 +1,43 @@
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
+/**
+ */
package org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl;
import java.util.Collection;
+
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.EObject;
import org.eclipse.emf.ecore.InternalEObject;
+
import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
import org.eclipse.etrice.core.fsm.fSM.AbstractInterfaceItem;
-import org.eclipse.etrice.core.fsm.fSM.TriggeredTransition;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger;
import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link;
/**
* <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Active Trigger</b></em>'.
+ * An implementation of the model object '<em><b>Common Trigger</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
+ * </p>
* <ul>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ActiveTriggerImpl#getMsg <em>Msg</em>}</li>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ActiveTriggerImpl#getIfitem <em>Ifitem</em>}</li>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ActiveTriggerImpl#getTrigger <em>Trigger</em>}</li>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ActiveTriggerImpl#getTransitions <em>Transitions</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.CommonTriggerImpl#getMsg <em>Msg</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.CommonTriggerImpl#getIfitem <em>Ifitem</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.CommonTriggerImpl#isHasGuard <em>Has Guard</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.CommonTriggerImpl#getTrigger <em>Trigger</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.CommonTriggerImpl#getLinks <em>Links</em>}</li>
* </ul>
- * </p>
*
* @generated
*/
-public class ActiveTriggerImpl extends MinimalEObjectImpl.Container implements ActiveTrigger {
+public class CommonTriggerImpl extends FSMGenElementImpl implements CommonTrigger {
/**
* The cached value of the '{@link #getMsg() <em>Msg</em>}' reference.
* <!-- begin-user-doc -->
@@ -64,6 +59,26 @@ public class ActiveTriggerImpl extends MinimalEObjectImpl.Container implements A
protected AbstractInterfaceItem ifitem;
/**
+ * The default value of the '{@link #isHasGuard() <em>Has Guard</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isHasGuard()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean HAS_GUARD_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isHasGuard() <em>Has Guard</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isHasGuard()
+ * @generated
+ * @ordered
+ */
+ protected boolean hasGuard = HAS_GUARD_EDEFAULT;
+
+ /**
* The default value of the '{@link #getTrigger() <em>Trigger</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -84,21 +99,21 @@ public class ActiveTriggerImpl extends MinimalEObjectImpl.Container implements A
protected String trigger = TRIGGER_EDEFAULT;
/**
- * The cached value of the '{@link #getTransitions() <em>Transitions</em>}' reference list.
+ * The cached value of the '{@link #getLinks() <em>Links</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see #getTransitions()
+ * @see #getLinks()
* @generated
* @ordered
*/
- protected EList<TriggeredTransition> transitions;
+ protected EList<Link> links;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected ActiveTriggerImpl() {
+ protected CommonTriggerImpl() {
super();
}
@@ -109,7 +124,7 @@ public class ActiveTriggerImpl extends MinimalEObjectImpl.Container implements A
*/
@Override
protected EClass eStaticClass() {
- return FsmGenPackage.Literals.ACTIVE_TRIGGER;
+ return FsmGenPackage.Literals.COMMON_TRIGGER;
}
/**
@@ -123,7 +138,7 @@ public class ActiveTriggerImpl extends MinimalEObjectImpl.Container implements A
msg = eResolveProxy(oldMsg);
if (msg != oldMsg) {
if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmGenPackage.ACTIVE_TRIGGER__MSG, oldMsg, msg));
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmGenPackage.COMMON_TRIGGER__MSG, oldMsg, msg));
}
}
return msg;
@@ -147,7 +162,7 @@ public class ActiveTriggerImpl extends MinimalEObjectImpl.Container implements A
EObject oldMsg = msg;
msg = newMsg;
if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.ACTIVE_TRIGGER__MSG, oldMsg, msg));
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.COMMON_TRIGGER__MSG, oldMsg, msg));
}
/**
@@ -161,7 +176,7 @@ public class ActiveTriggerImpl extends MinimalEObjectImpl.Container implements A
ifitem = (AbstractInterfaceItem)eResolveProxy(oldIfitem);
if (ifitem != oldIfitem) {
if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmGenPackage.ACTIVE_TRIGGER__IFITEM, oldIfitem, ifitem));
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmGenPackage.COMMON_TRIGGER__IFITEM, oldIfitem, ifitem));
}
}
return ifitem;
@@ -185,7 +200,7 @@ public class ActiveTriggerImpl extends MinimalEObjectImpl.Container implements A
AbstractInterfaceItem oldIfitem = ifitem;
ifitem = newIfitem;
if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.ACTIVE_TRIGGER__IFITEM, oldIfitem, ifitem));
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.COMMON_TRIGGER__IFITEM, oldIfitem, ifitem));
}
/**
@@ -206,7 +221,7 @@ public class ActiveTriggerImpl extends MinimalEObjectImpl.Container implements A
String oldTrigger = trigger;
trigger = newTrigger;
if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.ACTIVE_TRIGGER__TRIGGER, oldTrigger, trigger));
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.COMMON_TRIGGER__TRIGGER, oldTrigger, trigger));
}
/**
@@ -214,11 +229,32 @@ public class ActiveTriggerImpl extends MinimalEObjectImpl.Container implements A
* <!-- end-user-doc -->
* @generated
*/
- public EList<TriggeredTransition> getTransitions() {
- if (transitions == null) {
- transitions = new EObjectResolvingEList<TriggeredTransition>(TriggeredTransition.class, this, FsmGenPackage.ACTIVE_TRIGGER__TRANSITIONS);
+ public EList<Link> getLinks() {
+ if (links == null) {
+ links = new EObjectResolvingEList<Link>(Link.class, this, FsmGenPackage.COMMON_TRIGGER__LINKS);
}
- return transitions;
+ return links;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isHasGuard() {
+ return hasGuard;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setHasGuard(boolean newHasGuard) {
+ boolean oldHasGuard = hasGuard;
+ hasGuard = newHasGuard;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.COMMON_TRIGGER__HAS_GUARD, oldHasGuard, hasGuard));
}
/**
@@ -229,16 +265,18 @@ public class ActiveTriggerImpl extends MinimalEObjectImpl.Container implements A
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case FsmGenPackage.ACTIVE_TRIGGER__MSG:
+ case FsmGenPackage.COMMON_TRIGGER__MSG:
if (resolve) return getMsg();
return basicGetMsg();
- case FsmGenPackage.ACTIVE_TRIGGER__IFITEM:
+ case FsmGenPackage.COMMON_TRIGGER__IFITEM:
if (resolve) return getIfitem();
return basicGetIfitem();
- case FsmGenPackage.ACTIVE_TRIGGER__TRIGGER:
+ case FsmGenPackage.COMMON_TRIGGER__HAS_GUARD:
+ return isHasGuard();
+ case FsmGenPackage.COMMON_TRIGGER__TRIGGER:
return getTrigger();
- case FsmGenPackage.ACTIVE_TRIGGER__TRANSITIONS:
- return getTransitions();
+ case FsmGenPackage.COMMON_TRIGGER__LINKS:
+ return getLinks();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -252,18 +290,21 @@ public class ActiveTriggerImpl extends MinimalEObjectImpl.Container implements A
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case FsmGenPackage.ACTIVE_TRIGGER__MSG:
+ case FsmGenPackage.COMMON_TRIGGER__MSG:
setMsg((EObject)newValue);
return;
- case FsmGenPackage.ACTIVE_TRIGGER__IFITEM:
+ case FsmGenPackage.COMMON_TRIGGER__IFITEM:
setIfitem((AbstractInterfaceItem)newValue);
return;
- case FsmGenPackage.ACTIVE_TRIGGER__TRIGGER:
+ case FsmGenPackage.COMMON_TRIGGER__HAS_GUARD:
+ setHasGuard((Boolean)newValue);
+ return;
+ case FsmGenPackage.COMMON_TRIGGER__TRIGGER:
setTrigger((String)newValue);
return;
- case FsmGenPackage.ACTIVE_TRIGGER__TRANSITIONS:
- getTransitions().clear();
- getTransitions().addAll((Collection<? extends TriggeredTransition>)newValue);
+ case FsmGenPackage.COMMON_TRIGGER__LINKS:
+ getLinks().clear();
+ getLinks().addAll((Collection<? extends Link>)newValue);
return;
}
super.eSet(featureID, newValue);
@@ -277,17 +318,20 @@ public class ActiveTriggerImpl extends MinimalEObjectImpl.Container implements A
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case FsmGenPackage.ACTIVE_TRIGGER__MSG:
+ case FsmGenPackage.COMMON_TRIGGER__MSG:
setMsg((EObject)null);
return;
- case FsmGenPackage.ACTIVE_TRIGGER__IFITEM:
+ case FsmGenPackage.COMMON_TRIGGER__IFITEM:
setIfitem((AbstractInterfaceItem)null);
return;
- case FsmGenPackage.ACTIVE_TRIGGER__TRIGGER:
+ case FsmGenPackage.COMMON_TRIGGER__HAS_GUARD:
+ setHasGuard(HAS_GUARD_EDEFAULT);
+ return;
+ case FsmGenPackage.COMMON_TRIGGER__TRIGGER:
setTrigger(TRIGGER_EDEFAULT);
return;
- case FsmGenPackage.ACTIVE_TRIGGER__TRANSITIONS:
- getTransitions().clear();
+ case FsmGenPackage.COMMON_TRIGGER__LINKS:
+ getLinks().clear();
return;
}
super.eUnset(featureID);
@@ -301,14 +345,16 @@ public class ActiveTriggerImpl extends MinimalEObjectImpl.Container implements A
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case FsmGenPackage.ACTIVE_TRIGGER__MSG:
+ case FsmGenPackage.COMMON_TRIGGER__MSG:
return msg != null;
- case FsmGenPackage.ACTIVE_TRIGGER__IFITEM:
+ case FsmGenPackage.COMMON_TRIGGER__IFITEM:
return ifitem != null;
- case FsmGenPackage.ACTIVE_TRIGGER__TRIGGER:
+ case FsmGenPackage.COMMON_TRIGGER__HAS_GUARD:
+ return hasGuard != HAS_GUARD_EDEFAULT;
+ case FsmGenPackage.COMMON_TRIGGER__TRIGGER:
return TRIGGER_EDEFAULT == null ? trigger != null : !TRIGGER_EDEFAULT.equals(trigger);
- case FsmGenPackage.ACTIVE_TRIGGER__TRANSITIONS:
- return transitions != null && !transitions.isEmpty();
+ case FsmGenPackage.COMMON_TRIGGER__LINKS:
+ return links != null && !links.isEmpty();
}
return super.eIsSet(featureID);
}
@@ -323,10 +369,12 @@ public class ActiveTriggerImpl extends MinimalEObjectImpl.Container implements A
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
- result.append(" (trigger: ");
+ result.append(" (hasGuard: ");
+ result.append(hasGuard);
+ result.append(", trigger: ");
result.append(trigger);
result.append(')');
return result.toString();
}
-} //ActiveTriggerImpl
+} //CommonTriggerImpl
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FSMGenElementImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FSMGenElementImpl.java
new file mode 100644
index 000000000..4fb50270e
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FSMGenElementImpl.java
@@ -0,0 +1,39 @@
+/**
+ */
+package org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FSMGenElement;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>FSM Gen Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class FSMGenElementImpl extends MinimalEObjectImpl.Container implements FSMGenElement {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected FSMGenElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FsmGenPackage.Literals.FSM_GEN_ELEMENT;
+ }
+
+} //FSMGenElementImpl
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenFactoryImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenFactoryImpl.java
index 7d585d39d..32092c0b0 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenFactoryImpl.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenFactoryImpl.java
@@ -1,13 +1,4 @@
/**
- * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- *
*/
package org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl;
@@ -65,10 +56,13 @@ public class FsmGenFactoryImpl extends EFactoryImpl implements FsmGenFactory {
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
- case FsmGenPackage.ACTIVE_TRIGGER: return createActiveTrigger();
- case FsmGenPackage.EXPANDED_MODEL_COMPONENT: return createExpandedModelComponent();
- case FsmGenPackage.EXPANDED_REFINED_STATE: return createExpandedRefinedState();
- case FsmGenPackage.TRANSITION_CHAIN: return createTransitionChain();
+ case FsmGenPackage.GRAPH_CONTAINER: return createGraphContainer();
+ case FsmGenPackage.GRAPH: return createGraph();
+ case FsmGenPackage.GRAPH_ITEM: return createGraphItem();
+ case FsmGenPackage.NODE: return createNode();
+ case FsmGenPackage.LINK: return createLink();
+ case FsmGenPackage.COMMON_TRIGGER: return createCommonTrigger();
+ case FsmGenPackage.FSM_GEN_ELEMENT: return createFSMGenElement();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -79,9 +73,9 @@ public class FsmGenFactoryImpl extends EFactoryImpl implements FsmGenFactory {
* <!-- end-user-doc -->
* @generated
*/
- public ActiveTrigger createActiveTrigger() {
- ActiveTriggerImpl activeTrigger = new ActiveTriggerImpl();
- return activeTrigger;
+ public GraphContainer createGraphContainer() {
+ GraphContainerImpl graphContainer = new GraphContainerImpl();
+ return graphContainer;
}
/**
@@ -89,9 +83,9 @@ public class FsmGenFactoryImpl extends EFactoryImpl implements FsmGenFactory {
* <!-- end-user-doc -->
* @generated
*/
- public ExpandedModelComponent createExpandedModelComponent() {
- ExpandedModelComponentImpl expandedModelComponent = new ExpandedModelComponentImpl();
- return expandedModelComponent;
+ public Graph createGraph() {
+ GraphImpl graph = new GraphImpl();
+ return graph;
}
/**
@@ -99,9 +93,9 @@ public class FsmGenFactoryImpl extends EFactoryImpl implements FsmGenFactory {
* <!-- end-user-doc -->
* @generated
*/
- public ExpandedRefinedState createExpandedRefinedState() {
- ExpandedRefinedStateImpl expandedRefinedState = new ExpandedRefinedStateImpl();
- return expandedRefinedState;
+ public GraphItem createGraphItem() {
+ GraphItemImpl graphItem = new GraphItemImpl();
+ return graphItem;
}
/**
@@ -109,9 +103,39 @@ public class FsmGenFactoryImpl extends EFactoryImpl implements FsmGenFactory {
* <!-- end-user-doc -->
* @generated
*/
- public TransitionChain createTransitionChain() {
- TransitionChainImpl transitionChain = new TransitionChainImpl();
- return transitionChain;
+ public Node createNode() {
+ NodeImpl node = new NodeImpl();
+ return node;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Link createLink() {
+ LinkImpl link = new LinkImpl();
+ return link;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CommonTrigger createCommonTrigger() {
+ CommonTriggerImpl commonTrigger = new CommonTriggerImpl();
+ return commonTrigger;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FSMGenElement createFSMGenElement() {
+ FSMGenElementImpl fsmGenElement = new FSMGenElementImpl();
+ return fsmGenElement;
}
/**
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java
new file mode 100644
index 000000000..e20daf7a2
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java
@@ -0,0 +1,663 @@
+/**
+ */
+package org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.eclipse.etrice.core.fsm.fSM.FSMPackage;
+
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FSMGenElement;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenFactory;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphItem;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class FsmGenPackageImpl extends EPackageImpl implements FsmGenPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass graphContainerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass graphEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass graphItemEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass nodeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass linkEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass commonTriggerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass fsmGenElementEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private FsmGenPackageImpl() {
+ super(eNS_URI, FsmGenFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link FsmGenPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static FsmGenPackage init() {
+ if (isInited) return (FsmGenPackage)EPackage.Registry.INSTANCE.getEPackage(FsmGenPackage.eNS_URI);
+
+ // Obtain or create and register package
+ FsmGenPackageImpl theFsmGenPackage = (FsmGenPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FsmGenPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FsmGenPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ FSMPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theFsmGenPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theFsmGenPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theFsmGenPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(FsmGenPackage.eNS_URI, theFsmGenPackage);
+ return theFsmGenPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getGraphContainer() {
+ return graphContainerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getGraphContainer_Graph() {
+ return (EReference)graphContainerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getGraphContainer_Component() {
+ return (EReference)graphContainerEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getGraphContainer_InitializedTriggersInStates() {
+ return (EAttribute)graphContainerEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getGraphContainer_InitializedChainHeads() {
+ return (EAttribute)graphContainerEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getGraphContainer_InitializedCommonData() {
+ return (EAttribute)graphContainerEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getGraph() {
+ return graphEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getGraph_Nodes() {
+ return (EReference)graphEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getGraph_Links() {
+ return (EReference)graphEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getGraph_StateGraph() {
+ return (EReference)graphEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getGraph_Node() {
+ return (EReference)graphEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EOperation getGraph__ToString() {
+ return graphEClass.getEOperations().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getGraphItem() {
+ return graphItemEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getGraphItem_Inherited() {
+ return (EAttribute)graphItemEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getNode() {
+ return nodeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getNode_Graph() {
+ return (EReference)nodeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getNode_Subgraph() {
+ return (EReference)nodeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getNode_Outgoing() {
+ return (EReference)nodeEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getNode_Incoming() {
+ return (EReference)nodeEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getNode_StateGraphNode() {
+ return (EReference)nodeEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getNode_CaughtTriggers() {
+ return (EReference)nodeEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getNode_InheritanceLevel() {
+ return (EAttribute)nodeEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EOperation getNode__ToString() {
+ return nodeEClass.getEOperations().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getLink() {
+ return linkEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLink_Graph() {
+ return (EReference)linkEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLink_Source() {
+ return (EReference)linkEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLink_Target() {
+ return (EReference)linkEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLink_ChainHeads() {
+ return (EReference)linkEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getLink_IfitemTriggered() {
+ return (EAttribute)linkEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLink_CommonData() {
+ return (EReference)linkEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getLink_Transition() {
+ return (EReference)linkEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EOperation getLink__ToString() {
+ return linkEClass.getEOperations().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getCommonTrigger() {
+ return commonTriggerEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getCommonTrigger_Msg() {
+ return (EReference)commonTriggerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getCommonTrigger_Ifitem() {
+ return (EReference)commonTriggerEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCommonTrigger_Trigger() {
+ return (EAttribute)commonTriggerEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getCommonTrigger_Links() {
+ return (EReference)commonTriggerEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getFSMGenElement() {
+ return fsmGenElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCommonTrigger_HasGuard() {
+ return (EAttribute)commonTriggerEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FsmGenFactory getFsmGenFactory() {
+ return (FsmGenFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ graphContainerEClass = createEClass(GRAPH_CONTAINER);
+ createEReference(graphContainerEClass, GRAPH_CONTAINER__GRAPH);
+ createEReference(graphContainerEClass, GRAPH_CONTAINER__COMPONENT);
+ createEAttribute(graphContainerEClass, GRAPH_CONTAINER__INITIALIZED_TRIGGERS_IN_STATES);
+ createEAttribute(graphContainerEClass, GRAPH_CONTAINER__INITIALIZED_CHAIN_HEADS);
+ createEAttribute(graphContainerEClass, GRAPH_CONTAINER__INITIALIZED_COMMON_DATA);
+
+ graphEClass = createEClass(GRAPH);
+ createEReference(graphEClass, GRAPH__NODES);
+ createEReference(graphEClass, GRAPH__LINKS);
+ createEReference(graphEClass, GRAPH__STATE_GRAPH);
+ createEReference(graphEClass, GRAPH__NODE);
+ createEOperation(graphEClass, GRAPH___TO_STRING);
+
+ graphItemEClass = createEClass(GRAPH_ITEM);
+ createEAttribute(graphItemEClass, GRAPH_ITEM__INHERITED);
+
+ nodeEClass = createEClass(NODE);
+ createEReference(nodeEClass, NODE__GRAPH);
+ createEReference(nodeEClass, NODE__SUBGRAPH);
+ createEReference(nodeEClass, NODE__OUTGOING);
+ createEReference(nodeEClass, NODE__INCOMING);
+ createEReference(nodeEClass, NODE__STATE_GRAPH_NODE);
+ createEReference(nodeEClass, NODE__CAUGHT_TRIGGERS);
+ createEAttribute(nodeEClass, NODE__INHERITANCE_LEVEL);
+ createEOperation(nodeEClass, NODE___TO_STRING);
+
+ linkEClass = createEClass(LINK);
+ createEReference(linkEClass, LINK__GRAPH);
+ createEReference(linkEClass, LINK__SOURCE);
+ createEReference(linkEClass, LINK__TARGET);
+ createEReference(linkEClass, LINK__CHAIN_HEADS);
+ createEAttribute(linkEClass, LINK__IFITEM_TRIGGERED);
+ createEReference(linkEClass, LINK__COMMON_DATA);
+ createEReference(linkEClass, LINK__TRANSITION);
+ createEOperation(linkEClass, LINK___TO_STRING);
+
+ commonTriggerEClass = createEClass(COMMON_TRIGGER);
+ createEReference(commonTriggerEClass, COMMON_TRIGGER__MSG);
+ createEReference(commonTriggerEClass, COMMON_TRIGGER__IFITEM);
+ createEAttribute(commonTriggerEClass, COMMON_TRIGGER__HAS_GUARD);
+ createEAttribute(commonTriggerEClass, COMMON_TRIGGER__TRIGGER);
+ createEReference(commonTriggerEClass, COMMON_TRIGGER__LINKS);
+
+ fsmGenElementEClass = createEClass(FSM_GEN_ELEMENT);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ FSMPackage theFSMPackage = (FSMPackage)EPackage.Registry.INSTANCE.getEPackage(FSMPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ graphContainerEClass.getESuperTypes().add(this.getFSMGenElement());
+ graphEClass.getESuperTypes().add(this.getFSMGenElement());
+ graphItemEClass.getESuperTypes().add(this.getFSMGenElement());
+ nodeEClass.getESuperTypes().add(this.getGraphItem());
+ linkEClass.getESuperTypes().add(this.getGraphItem());
+ commonTriggerEClass.getESuperTypes().add(this.getFSMGenElement());
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(graphContainerEClass, GraphContainer.class, "GraphContainer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getGraphContainer_Graph(), this.getGraph(), null, "graph", null, 0, 1, GraphContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getGraphContainer_Component(), theFSMPackage.getModelComponent(), null, "component", null, 0, 1, GraphContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getGraphContainer_InitializedTriggersInStates(), ecorePackage.getEBoolean(), "initializedTriggersInStates", null, 0, 1, GraphContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getGraphContainer_InitializedChainHeads(), ecorePackage.getEBoolean(), "initializedChainHeads", null, 0, 1, GraphContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getGraphContainer_InitializedCommonData(), ecorePackage.getEBoolean(), "initializedCommonData", null, 0, 1, GraphContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(graphEClass, Graph.class, "Graph", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getGraph_Nodes(), this.getNode(), this.getNode_Graph(), "nodes", null, 0, -1, Graph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getGraph_Links(), this.getLink(), this.getLink_Graph(), "links", null, 0, -1, Graph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getGraph_StateGraph(), theFSMPackage.getStateGraph(), null, "stateGraph", null, 0, 1, Graph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getGraph_Node(), this.getNode(), this.getNode_Subgraph(), "node", null, 0, 1, Graph.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEOperation(getGraph__ToString(), ecorePackage.getEString(), "toString", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ initEClass(graphItemEClass, GraphItem.class, "GraphItem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getGraphItem_Inherited(), ecorePackage.getEBoolean(), "inherited", "false", 0, 1, GraphItem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(nodeEClass, Node.class, "Node", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getNode_Graph(), this.getGraph(), this.getGraph_Nodes(), "graph", null, 0, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getNode_Subgraph(), this.getGraph(), this.getGraph_Node(), "subgraph", null, 0, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getNode_Outgoing(), this.getLink(), this.getLink_Source(), "outgoing", null, 0, -1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getNode_Incoming(), this.getLink(), this.getLink_Target(), "incoming", null, 0, -1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getNode_StateGraphNode(), theFSMPackage.getStateGraphNode(), null, "stateGraphNode", null, 0, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getNode_CaughtTriggers(), this.getCommonTrigger(), null, "caughtTriggers", null, 0, -1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getNode_InheritanceLevel(), ecorePackage.getEInt(), "inheritanceLevel", null, 0, 1, Node.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEOperation(getNode__ToString(), ecorePackage.getEString(), "toString", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ initEClass(linkEClass, Link.class, "Link", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getLink_Graph(), this.getGraph(), this.getGraph_Links(), "graph", null, 0, 1, Link.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getLink_Source(), this.getNode(), this.getNode_Outgoing(), "source", null, 0, 1, Link.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getLink_Target(), this.getNode(), this.getNode_Incoming(), "target", null, 0, 1, Link.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getLink_ChainHeads(), this.getLink(), null, "chainHeads", null, 0, -1, Link.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getLink_IfitemTriggered(), ecorePackage.getEBoolean(), "ifitemTriggered", "true", 0, 1, Link.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getLink_CommonData(), ecorePackage.getEObject(), null, "commonData", null, 0, 1, Link.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getLink_Transition(), theFSMPackage.getTransitionBase(), null, "transition", null, 0, 1, Link.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEOperation(getLink__ToString(), ecorePackage.getEString(), "toString", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ initEClass(commonTriggerEClass, CommonTrigger.class, "CommonTrigger", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getCommonTrigger_Msg(), ecorePackage.getEObject(), null, "msg", null, 0, 1, CommonTrigger.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCommonTrigger_Ifitem(), theFSMPackage.getAbstractInterfaceItem(), null, "ifitem", null, 0, 1, CommonTrigger.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getCommonTrigger_HasGuard(), ecorePackage.getEBoolean(), "hasGuard", null, 0, 1, CommonTrigger.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getCommonTrigger_Trigger(), ecorePackage.getEString(), "trigger", null, 0, 1, CommonTrigger.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCommonTrigger_Links(), this.getLink(), null, "links", null, 0, -1, CommonTrigger.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(fsmGenElementEClass, FSMGenElement.class, "FSMGenElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //FsmGenPackageImpl
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphContainerImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphContainerImpl.java
new file mode 100644
index 000000000..6b2c3afdf
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphContainerImpl.java
@@ -0,0 +1,412 @@
+/**
+ */
+package org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.etrice.core.fsm.fSM.ModelComponent;
+
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Graph Container</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphContainerImpl#getGraph <em>Graph</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphContainerImpl#getComponent <em>Component</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphContainerImpl#isInitializedTriggersInStates <em>Initialized Triggers In States</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphContainerImpl#isInitializedChainHeads <em>Initialized Chain Heads</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphContainerImpl#isInitializedCommonData <em>Initialized Common Data</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class GraphContainerImpl extends FSMGenElementImpl implements GraphContainer {
+ /**
+ * The cached value of the '{@link #getGraph() <em>Graph</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getGraph()
+ * @generated
+ * @ordered
+ */
+ protected Graph graph;
+
+ /**
+ * The cached value of the '{@link #getComponent() <em>Component</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getComponent()
+ * @generated
+ * @ordered
+ */
+ protected ModelComponent component;
+
+ /**
+ * The default value of the '{@link #isInitializedTriggersInStates() <em>Initialized Triggers In States</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isInitializedTriggersInStates()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean INITIALIZED_TRIGGERS_IN_STATES_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isInitializedTriggersInStates() <em>Initialized Triggers In States</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isInitializedTriggersInStates()
+ * @generated
+ * @ordered
+ */
+ protected boolean initializedTriggersInStates = INITIALIZED_TRIGGERS_IN_STATES_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isInitializedChainHeads() <em>Initialized Chain Heads</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isInitializedChainHeads()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean INITIALIZED_CHAIN_HEADS_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isInitializedChainHeads() <em>Initialized Chain Heads</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isInitializedChainHeads()
+ * @generated
+ * @ordered
+ */
+ protected boolean initializedChainHeads = INITIALIZED_CHAIN_HEADS_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isInitializedCommonData() <em>Initialized Common Data</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isInitializedCommonData()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean INITIALIZED_COMMON_DATA_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isInitializedCommonData() <em>Initialized Common Data</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isInitializedCommonData()
+ * @generated
+ * @ordered
+ */
+ protected boolean initializedCommonData = INITIALIZED_COMMON_DATA_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GraphContainerImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FsmGenPackage.Literals.GRAPH_CONTAINER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Graph getGraph() {
+ return graph;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetGraph(Graph newGraph, NotificationChain msgs) {
+ Graph oldGraph = graph;
+ graph = newGraph;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FsmGenPackage.GRAPH_CONTAINER__GRAPH, oldGraph, newGraph);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setGraph(Graph newGraph) {
+ if (newGraph != graph) {
+ NotificationChain msgs = null;
+ if (graph != null)
+ msgs = ((InternalEObject)graph).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FsmGenPackage.GRAPH_CONTAINER__GRAPH, null, msgs);
+ if (newGraph != null)
+ msgs = ((InternalEObject)newGraph).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FsmGenPackage.GRAPH_CONTAINER__GRAPH, null, msgs);
+ msgs = basicSetGraph(newGraph, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.GRAPH_CONTAINER__GRAPH, newGraph, newGraph));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelComponent getComponent() {
+ if (component != null && component.eIsProxy()) {
+ InternalEObject oldComponent = (InternalEObject)component;
+ component = (ModelComponent)eResolveProxy(oldComponent);
+ if (component != oldComponent) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmGenPackage.GRAPH_CONTAINER__COMPONENT, oldComponent, component));
+ }
+ }
+ return component;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelComponent basicGetComponent() {
+ return component;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setComponent(ModelComponent newComponent) {
+ ModelComponent oldComponent = component;
+ component = newComponent;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.GRAPH_CONTAINER__COMPONENT, oldComponent, component));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isInitializedTriggersInStates() {
+ return initializedTriggersInStates;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInitializedTriggersInStates(boolean newInitializedTriggersInStates) {
+ boolean oldInitializedTriggersInStates = initializedTriggersInStates;
+ initializedTriggersInStates = newInitializedTriggersInStates;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.GRAPH_CONTAINER__INITIALIZED_TRIGGERS_IN_STATES, oldInitializedTriggersInStates, initializedTriggersInStates));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isInitializedChainHeads() {
+ return initializedChainHeads;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInitializedChainHeads(boolean newInitializedChainHeads) {
+ boolean oldInitializedChainHeads = initializedChainHeads;
+ initializedChainHeads = newInitializedChainHeads;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.GRAPH_CONTAINER__INITIALIZED_CHAIN_HEADS, oldInitializedChainHeads, initializedChainHeads));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isInitializedCommonData() {
+ return initializedCommonData;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInitializedCommonData(boolean newInitializedCommonData) {
+ boolean oldInitializedCommonData = initializedCommonData;
+ initializedCommonData = newInitializedCommonData;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.GRAPH_CONTAINER__INITIALIZED_COMMON_DATA, oldInitializedCommonData, initializedCommonData));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FsmGenPackage.GRAPH_CONTAINER__GRAPH:
+ return basicSetGraph(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FsmGenPackage.GRAPH_CONTAINER__GRAPH:
+ return getGraph();
+ case FsmGenPackage.GRAPH_CONTAINER__COMPONENT:
+ if (resolve) return getComponent();
+ return basicGetComponent();
+ case FsmGenPackage.GRAPH_CONTAINER__INITIALIZED_TRIGGERS_IN_STATES:
+ return isInitializedTriggersInStates();
+ case FsmGenPackage.GRAPH_CONTAINER__INITIALIZED_CHAIN_HEADS:
+ return isInitializedChainHeads();
+ case FsmGenPackage.GRAPH_CONTAINER__INITIALIZED_COMMON_DATA:
+ return isInitializedCommonData();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FsmGenPackage.GRAPH_CONTAINER__GRAPH:
+ setGraph((Graph)newValue);
+ return;
+ case FsmGenPackage.GRAPH_CONTAINER__COMPONENT:
+ setComponent((ModelComponent)newValue);
+ return;
+ case FsmGenPackage.GRAPH_CONTAINER__INITIALIZED_TRIGGERS_IN_STATES:
+ setInitializedTriggersInStates((Boolean)newValue);
+ return;
+ case FsmGenPackage.GRAPH_CONTAINER__INITIALIZED_CHAIN_HEADS:
+ setInitializedChainHeads((Boolean)newValue);
+ return;
+ case FsmGenPackage.GRAPH_CONTAINER__INITIALIZED_COMMON_DATA:
+ setInitializedCommonData((Boolean)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FsmGenPackage.GRAPH_CONTAINER__GRAPH:
+ setGraph((Graph)null);
+ return;
+ case FsmGenPackage.GRAPH_CONTAINER__COMPONENT:
+ setComponent((ModelComponent)null);
+ return;
+ case FsmGenPackage.GRAPH_CONTAINER__INITIALIZED_TRIGGERS_IN_STATES:
+ setInitializedTriggersInStates(INITIALIZED_TRIGGERS_IN_STATES_EDEFAULT);
+ return;
+ case FsmGenPackage.GRAPH_CONTAINER__INITIALIZED_CHAIN_HEADS:
+ setInitializedChainHeads(INITIALIZED_CHAIN_HEADS_EDEFAULT);
+ return;
+ case FsmGenPackage.GRAPH_CONTAINER__INITIALIZED_COMMON_DATA:
+ setInitializedCommonData(INITIALIZED_COMMON_DATA_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FsmGenPackage.GRAPH_CONTAINER__GRAPH:
+ return graph != null;
+ case FsmGenPackage.GRAPH_CONTAINER__COMPONENT:
+ return component != null;
+ case FsmGenPackage.GRAPH_CONTAINER__INITIALIZED_TRIGGERS_IN_STATES:
+ return initializedTriggersInStates != INITIALIZED_TRIGGERS_IN_STATES_EDEFAULT;
+ case FsmGenPackage.GRAPH_CONTAINER__INITIALIZED_CHAIN_HEADS:
+ return initializedChainHeads != INITIALIZED_CHAIN_HEADS_EDEFAULT;
+ case FsmGenPackage.GRAPH_CONTAINER__INITIALIZED_COMMON_DATA:
+ return initializedCommonData != INITIALIZED_COMMON_DATA_EDEFAULT;
+ }
+ 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(" (initializedTriggersInStates: ");
+ result.append(initializedTriggersInStates);
+ result.append(", initializedChainHeads: ");
+ result.append(initializedChainHeads);
+ result.append(", initializedCommonData: ");
+ result.append(initializedCommonData);
+ result.append(')');
+ return result.toString();
+ }
+
+} //GraphContainerImpl
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphImpl.java
new file mode 100644
index 000000000..b6dadf54c
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphImpl.java
@@ -0,0 +1,372 @@
+/**
+ */
+package org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+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.EObjectContainmentWithInverseEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.etrice.core.fsm.fSM.StateGraph;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Graph</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphImpl#getNodes <em>Nodes</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphImpl#getLinks <em>Links</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphImpl#getStateGraph <em>State Graph</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphImpl#getNode <em>Node</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class GraphImpl extends FSMGenElementImpl implements Graph {
+ /**
+ * The cached value of the '{@link #getNodes() <em>Nodes</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getNodes()
+ * @generated
+ * @ordered
+ */
+ protected EList<Node> nodes;
+
+ /**
+ * The cached value of the '{@link #getLinks() <em>Links</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLinks()
+ * @generated
+ * @ordered
+ */
+ protected EList<Link> links;
+
+ /**
+ * The cached value of the '{@link #getStateGraph() <em>State Graph</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStateGraph()
+ * @generated
+ * @ordered
+ */
+ protected StateGraph stateGraph;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GraphImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FsmGenPackage.Literals.GRAPH;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Node> getNodes() {
+ if (nodes == null) {
+ nodes = new EObjectContainmentWithInverseEList<Node>(Node.class, this, FsmGenPackage.GRAPH__NODES, FsmGenPackage.NODE__GRAPH);
+ }
+ return nodes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Link> getLinks() {
+ if (links == null) {
+ links = new EObjectContainmentWithInverseEList<Link>(Link.class, this, FsmGenPackage.GRAPH__LINKS, FsmGenPackage.LINK__GRAPH);
+ }
+ return links;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StateGraph getStateGraph() {
+ if (stateGraph != null && stateGraph.eIsProxy()) {
+ InternalEObject oldStateGraph = (InternalEObject)stateGraph;
+ stateGraph = (StateGraph)eResolveProxy(oldStateGraph);
+ if (stateGraph != oldStateGraph) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmGenPackage.GRAPH__STATE_GRAPH, oldStateGraph, stateGraph));
+ }
+ }
+ return stateGraph;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StateGraph basicGetStateGraph() {
+ return stateGraph;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setStateGraph(StateGraph newStateGraph) {
+ StateGraph oldStateGraph = stateGraph;
+ stateGraph = newStateGraph;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.GRAPH__STATE_GRAPH, oldStateGraph, stateGraph));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Node getNode() {
+ if (eContainerFeatureID() != FsmGenPackage.GRAPH__NODE) return null;
+ return (Node)eInternalContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetNode(Node newNode, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newNode, FsmGenPackage.GRAPH__NODE, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setNode(Node newNode) {
+ if (newNode != eInternalContainer() || (eContainerFeatureID() != FsmGenPackage.GRAPH__NODE && newNode != null)) {
+ if (EcoreUtil.isAncestor(this, newNode))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newNode != null)
+ msgs = ((InternalEObject)newNode).eInverseAdd(this, FsmGenPackage.NODE__SUBGRAPH, Node.class, msgs);
+ msgs = basicSetNode(newNode, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.GRAPH__NODE, newNode, newNode));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString() {
+ StringBuilder result = new StringBuilder();
+ result.append("StateGraph {\n");
+ for (Node n : getNodes()) {
+ result.append(" " + n.toString() + "\n");
+ }
+ for (Link l : getLinks()) {
+ result.append(" " + l.toString() + "\n");
+ }
+ result.append("}");
+ return result.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FsmGenPackage.GRAPH__NODES:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getNodes()).basicAdd(otherEnd, msgs);
+ case FsmGenPackage.GRAPH__LINKS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getLinks()).basicAdd(otherEnd, msgs);
+ case FsmGenPackage.GRAPH__NODE:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetNode((Node)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FsmGenPackage.GRAPH__NODES:
+ return ((InternalEList<?>)getNodes()).basicRemove(otherEnd, msgs);
+ case FsmGenPackage.GRAPH__LINKS:
+ return ((InternalEList<?>)getLinks()).basicRemove(otherEnd, msgs);
+ case FsmGenPackage.GRAPH__NODE:
+ return basicSetNode(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case FsmGenPackage.GRAPH__NODE:
+ return eInternalContainer().eInverseRemove(this, FsmGenPackage.NODE__SUBGRAPH, Node.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FsmGenPackage.GRAPH__NODES:
+ return getNodes();
+ case FsmGenPackage.GRAPH__LINKS:
+ return getLinks();
+ case FsmGenPackage.GRAPH__STATE_GRAPH:
+ if (resolve) return getStateGraph();
+ return basicGetStateGraph();
+ case FsmGenPackage.GRAPH__NODE:
+ return getNode();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FsmGenPackage.GRAPH__NODES:
+ getNodes().clear();
+ getNodes().addAll((Collection<? extends Node>)newValue);
+ return;
+ case FsmGenPackage.GRAPH__LINKS:
+ getLinks().clear();
+ getLinks().addAll((Collection<? extends Link>)newValue);
+ return;
+ case FsmGenPackage.GRAPH__STATE_GRAPH:
+ setStateGraph((StateGraph)newValue);
+ return;
+ case FsmGenPackage.GRAPH__NODE:
+ setNode((Node)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FsmGenPackage.GRAPH__NODES:
+ getNodes().clear();
+ return;
+ case FsmGenPackage.GRAPH__LINKS:
+ getLinks().clear();
+ return;
+ case FsmGenPackage.GRAPH__STATE_GRAPH:
+ setStateGraph((StateGraph)null);
+ return;
+ case FsmGenPackage.GRAPH__NODE:
+ setNode((Node)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FsmGenPackage.GRAPH__NODES:
+ return nodes != null && !nodes.isEmpty();
+ case FsmGenPackage.GRAPH__LINKS:
+ return links != null && !links.isEmpty();
+ case FsmGenPackage.GRAPH__STATE_GRAPH:
+ return stateGraph != null;
+ case FsmGenPackage.GRAPH__NODE:
+ return getNode() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case FsmGenPackage.GRAPH___TO_STRING:
+ return toString();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+} //GraphImpl
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphItemImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphItemImpl.java
new file mode 100644
index 000000000..239cfd8aa
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/GraphItemImpl.java
@@ -0,0 +1,161 @@
+/**
+ */
+package org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphItem;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Graph Item</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.GraphItemImpl#isInherited <em>Inherited</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class GraphItemImpl extends FSMGenElementImpl implements GraphItem {
+ /**
+ * The default value of the '{@link #isInherited() <em>Inherited</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isInherited()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean INHERITED_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isInherited() <em>Inherited</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isInherited()
+ * @generated
+ * @ordered
+ */
+ protected boolean inherited = INHERITED_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GraphItemImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FsmGenPackage.Literals.GRAPH_ITEM;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isInherited() {
+ return inherited;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInherited(boolean newInherited) {
+ boolean oldInherited = inherited;
+ inherited = newInherited;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.GRAPH_ITEM__INHERITED, oldInherited, inherited));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FsmGenPackage.GRAPH_ITEM__INHERITED:
+ return isInherited();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FsmGenPackage.GRAPH_ITEM__INHERITED:
+ setInherited((Boolean)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FsmGenPackage.GRAPH_ITEM__INHERITED:
+ setInherited(INHERITED_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FsmGenPackage.GRAPH_ITEM__INHERITED:
+ return inherited != INHERITED_EDEFAULT;
+ }
+ 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(" (inherited: ");
+ result.append(inherited);
+ result.append(')');
+ return result.toString();
+ }
+
+} //GraphItemImpl
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/LinkImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/LinkImpl.java
new file mode 100644
index 000000000..e3190f0c8
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/LinkImpl.java
@@ -0,0 +1,621 @@
+/**
+ */
+package org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collection;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+import org.eclipse.etrice.core.fsm.fSM.InitialTransition;
+import org.eclipse.etrice.core.fsm.fSM.NonInitialTransition;
+import org.eclipse.etrice.core.fsm.fSM.RefinedTransition;
+import org.eclipse.etrice.core.fsm.fSM.TransitionBase;
+
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Link</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.LinkImpl#getGraph <em>Graph</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.LinkImpl#getSource <em>Source</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.LinkImpl#getTarget <em>Target</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.LinkImpl#getChainHeads <em>Chain Heads</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.LinkImpl#isIfitemTriggered <em>Ifitem Triggered</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.LinkImpl#getCommonData <em>Common Data</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.LinkImpl#getTransition <em>Transition</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class LinkImpl extends GraphItemImpl implements Link {
+ /**
+ * The cached value of the '{@link #getSource() <em>Source</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSource()
+ * @generated
+ * @ordered
+ */
+ protected Node source;
+
+ /**
+ * The cached value of the '{@link #getTarget() <em>Target</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTarget()
+ * @generated
+ * @ordered
+ */
+ protected Node target;
+
+ /**
+ * The cached value of the '{@link #getChainHeads() <em>Chain Heads</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getChainHeads()
+ * @generated
+ * @ordered
+ */
+ protected EList<Link> chainHeads;
+
+ /**
+ * The default value of the '{@link #isIfitemTriggered() <em>Ifitem Triggered</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isIfitemTriggered()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean IFITEM_TRIGGERED_EDEFAULT = true;
+
+ /**
+ * The cached value of the '{@link #isIfitemTriggered() <em>Ifitem Triggered</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isIfitemTriggered()
+ * @generated
+ * @ordered
+ */
+ protected boolean ifitemTriggered = IFITEM_TRIGGERED_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getCommonData() <em>Common Data</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCommonData()
+ * @generated
+ * @ordered
+ */
+ protected EObject commonData;
+
+ /**
+ * The cached value of the '{@link #getTransition() <em>Transition</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTransition()
+ * @generated
+ * @ordered
+ */
+ protected TransitionBase transition;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected LinkImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FsmGenPackage.Literals.LINK;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Graph getGraph() {
+ if (eContainerFeatureID() != FsmGenPackage.LINK__GRAPH) return null;
+ return (Graph)eInternalContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetGraph(Graph newGraph, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newGraph, FsmGenPackage.LINK__GRAPH, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setGraph(Graph newGraph) {
+ if (newGraph != eInternalContainer() || (eContainerFeatureID() != FsmGenPackage.LINK__GRAPH && newGraph != null)) {
+ if (EcoreUtil.isAncestor(this, newGraph))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newGraph != null)
+ msgs = ((InternalEObject)newGraph).eInverseAdd(this, FsmGenPackage.GRAPH__LINKS, Graph.class, msgs);
+ msgs = basicSetGraph(newGraph, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.LINK__GRAPH, newGraph, newGraph));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Node getSource() {
+ if (source != null && source.eIsProxy()) {
+ InternalEObject oldSource = (InternalEObject)source;
+ source = (Node)eResolveProxy(oldSource);
+ if (source != oldSource) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmGenPackage.LINK__SOURCE, oldSource, source));
+ }
+ }
+ return source;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Node basicGetSource() {
+ return source;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetSource(Node newSource, NotificationChain msgs) {
+ Node oldSource = source;
+ source = newSource;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FsmGenPackage.LINK__SOURCE, oldSource, newSource);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSource(Node newSource) {
+ if (newSource != source) {
+ NotificationChain msgs = null;
+ if (source != null)
+ msgs = ((InternalEObject)source).eInverseRemove(this, FsmGenPackage.NODE__OUTGOING, Node.class, msgs);
+ if (newSource != null)
+ msgs = ((InternalEObject)newSource).eInverseAdd(this, FsmGenPackage.NODE__OUTGOING, Node.class, msgs);
+ msgs = basicSetSource(newSource, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.LINK__SOURCE, newSource, newSource));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Node getTarget() {
+ if (target != null && target.eIsProxy()) {
+ InternalEObject oldTarget = (InternalEObject)target;
+ target = (Node)eResolveProxy(oldTarget);
+ if (target != oldTarget) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmGenPackage.LINK__TARGET, oldTarget, target));
+ }
+ }
+ return target;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Node basicGetTarget() {
+ return target;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetTarget(Node newTarget, NotificationChain msgs) {
+ Node oldTarget = target;
+ target = newTarget;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FsmGenPackage.LINK__TARGET, oldTarget, newTarget);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTarget(Node newTarget) {
+ if (newTarget != target) {
+ NotificationChain msgs = null;
+ if (target != null)
+ msgs = ((InternalEObject)target).eInverseRemove(this, FsmGenPackage.NODE__INCOMING, Node.class, msgs);
+ if (newTarget != null)
+ msgs = ((InternalEObject)newTarget).eInverseAdd(this, FsmGenPackage.NODE__INCOMING, Node.class, msgs);
+ msgs = basicSetTarget(newTarget, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.LINK__TARGET, newTarget, newTarget));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Link> getChainHeads() {
+ if (chainHeads == null) {
+ chainHeads = new EObjectResolvingEList<Link>(Link.class, this, FsmGenPackage.LINK__CHAIN_HEADS);
+ }
+ return chainHeads;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isIfitemTriggered() {
+ return ifitemTriggered;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setIfitemTriggered(boolean newIfitemTriggered) {
+ boolean oldIfitemTriggered = ifitemTriggered;
+ ifitemTriggered = newIfitemTriggered;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.LINK__IFITEM_TRIGGERED, oldIfitemTriggered, ifitemTriggered));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject getCommonData() {
+ if (commonData != null && commonData.eIsProxy()) {
+ InternalEObject oldCommonData = (InternalEObject)commonData;
+ commonData = eResolveProxy(oldCommonData);
+ if (commonData != oldCommonData) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmGenPackage.LINK__COMMON_DATA, oldCommonData, commonData));
+ }
+ }
+ return commonData;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EObject basicGetCommonData() {
+ return commonData;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCommonData(EObject newCommonData) {
+ EObject oldCommonData = commonData;
+ commonData = newCommonData;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.LINK__COMMON_DATA, oldCommonData, commonData));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TransitionBase getTransition() {
+ if (transition != null && transition.eIsProxy()) {
+ InternalEObject oldTransition = (InternalEObject)transition;
+ transition = (TransitionBase)eResolveProxy(oldTransition);
+ if (transition != oldTransition) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmGenPackage.LINK__TRANSITION, oldTransition, transition));
+ }
+ }
+ return transition;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TransitionBase basicGetTransition() {
+ return transition;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTransition(TransitionBase newTransition) {
+ TransitionBase oldTransition = transition;
+ transition = newTransition;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.LINK__TRANSITION, oldTransition, transition));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString() {
+ if (getTransition() instanceof InitialTransition) {
+ return "Link initial -> " + getTarget().toString() + " (InitialTransition)";
+ }
+ else if (getTransition() instanceof NonInitialTransition) {
+ return "Link " + getSource().toString() + " -> " + getTarget().toString() + " (NonInitialTransition)";
+ }
+ else if (getTransition() instanceof RefinedTransition) {
+ return "RefinedTransition";
+ }
+ return "?";
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FsmGenPackage.LINK__GRAPH:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetGraph((Graph)otherEnd, msgs);
+ case FsmGenPackage.LINK__SOURCE:
+ if (source != null)
+ msgs = ((InternalEObject)source).eInverseRemove(this, FsmGenPackage.NODE__OUTGOING, Node.class, msgs);
+ return basicSetSource((Node)otherEnd, msgs);
+ case FsmGenPackage.LINK__TARGET:
+ if (target != null)
+ msgs = ((InternalEObject)target).eInverseRemove(this, FsmGenPackage.NODE__INCOMING, Node.class, msgs);
+ return basicSetTarget((Node)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FsmGenPackage.LINK__GRAPH:
+ return basicSetGraph(null, msgs);
+ case FsmGenPackage.LINK__SOURCE:
+ return basicSetSource(null, msgs);
+ case FsmGenPackage.LINK__TARGET:
+ return basicSetTarget(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case FsmGenPackage.LINK__GRAPH:
+ return eInternalContainer().eInverseRemove(this, FsmGenPackage.GRAPH__LINKS, Graph.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FsmGenPackage.LINK__GRAPH:
+ return getGraph();
+ case FsmGenPackage.LINK__SOURCE:
+ if (resolve) return getSource();
+ return basicGetSource();
+ case FsmGenPackage.LINK__TARGET:
+ if (resolve) return getTarget();
+ return basicGetTarget();
+ case FsmGenPackage.LINK__CHAIN_HEADS:
+ return getChainHeads();
+ case FsmGenPackage.LINK__IFITEM_TRIGGERED:
+ return isIfitemTriggered();
+ case FsmGenPackage.LINK__COMMON_DATA:
+ if (resolve) return getCommonData();
+ return basicGetCommonData();
+ case FsmGenPackage.LINK__TRANSITION:
+ if (resolve) return getTransition();
+ return basicGetTransition();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FsmGenPackage.LINK__GRAPH:
+ setGraph((Graph)newValue);
+ return;
+ case FsmGenPackage.LINK__SOURCE:
+ setSource((Node)newValue);
+ return;
+ case FsmGenPackage.LINK__TARGET:
+ setTarget((Node)newValue);
+ return;
+ case FsmGenPackage.LINK__CHAIN_HEADS:
+ getChainHeads().clear();
+ getChainHeads().addAll((Collection<? extends Link>)newValue);
+ return;
+ case FsmGenPackage.LINK__IFITEM_TRIGGERED:
+ setIfitemTriggered((Boolean)newValue);
+ return;
+ case FsmGenPackage.LINK__COMMON_DATA:
+ setCommonData((EObject)newValue);
+ return;
+ case FsmGenPackage.LINK__TRANSITION:
+ setTransition((TransitionBase)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FsmGenPackage.LINK__GRAPH:
+ setGraph((Graph)null);
+ return;
+ case FsmGenPackage.LINK__SOURCE:
+ setSource((Node)null);
+ return;
+ case FsmGenPackage.LINK__TARGET:
+ setTarget((Node)null);
+ return;
+ case FsmGenPackage.LINK__CHAIN_HEADS:
+ getChainHeads().clear();
+ return;
+ case FsmGenPackage.LINK__IFITEM_TRIGGERED:
+ setIfitemTriggered(IFITEM_TRIGGERED_EDEFAULT);
+ return;
+ case FsmGenPackage.LINK__COMMON_DATA:
+ setCommonData((EObject)null);
+ return;
+ case FsmGenPackage.LINK__TRANSITION:
+ setTransition((TransitionBase)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FsmGenPackage.LINK__GRAPH:
+ return getGraph() != null;
+ case FsmGenPackage.LINK__SOURCE:
+ return source != null;
+ case FsmGenPackage.LINK__TARGET:
+ return target != null;
+ case FsmGenPackage.LINK__CHAIN_HEADS:
+ return chainHeads != null && !chainHeads.isEmpty();
+ case FsmGenPackage.LINK__IFITEM_TRIGGERED:
+ return ifitemTriggered != IFITEM_TRIGGERED_EDEFAULT;
+ case FsmGenPackage.LINK__COMMON_DATA:
+ return commonData != null;
+ case FsmGenPackage.LINK__TRANSITION:
+ return transition != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case FsmGenPackage.LINK___TO_STRING:
+ return toString();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+} //LinkImpl
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/NodeImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/NodeImpl.java
new file mode 100644
index 000000000..edd491e7c
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/NodeImpl.java
@@ -0,0 +1,543 @@
+/**
+ */
+package org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+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.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.etrice.core.fsm.fSM.ChoicePoint;
+import org.eclipse.etrice.core.fsm.fSM.RefinedState;
+import org.eclipse.etrice.core.fsm.fSM.SimpleState;
+import org.eclipse.etrice.core.fsm.fSM.StateGraphNode;
+
+import org.eclipse.etrice.core.fsm.fSM.TrPoint;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Node</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.NodeImpl#getGraph <em>Graph</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.NodeImpl#getSubgraph <em>Subgraph</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.NodeImpl#getOutgoing <em>Outgoing</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.NodeImpl#getIncoming <em>Incoming</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.NodeImpl#getStateGraphNode <em>State Graph Node</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.NodeImpl#getCaughtTriggers <em>Caught Triggers</em>}</li>
+ * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.NodeImpl#getInheritanceLevel <em>Inheritance Level</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class NodeImpl extends GraphItemImpl implements Node {
+ /**
+ * The cached value of the '{@link #getSubgraph() <em>Subgraph</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSubgraph()
+ * @generated
+ * @ordered
+ */
+ protected Graph subgraph;
+
+ /**
+ * The cached value of the '{@link #getOutgoing() <em>Outgoing</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOutgoing()
+ * @generated
+ * @ordered
+ */
+ protected EList<Link> outgoing;
+
+ /**
+ * The cached value of the '{@link #getIncoming() <em>Incoming</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIncoming()
+ * @generated
+ * @ordered
+ */
+ protected EList<Link> incoming;
+
+ /**
+ * The cached value of the '{@link #getStateGraphNode() <em>State Graph Node</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStateGraphNode()
+ * @generated
+ * @ordered
+ */
+ protected StateGraphNode stateGraphNode;
+
+ /**
+ * The cached value of the '{@link #getCaughtTriggers() <em>Caught Triggers</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCaughtTriggers()
+ * @generated
+ * @ordered
+ */
+ protected EList<CommonTrigger> caughtTriggers;
+
+ /**
+ * The default value of the '{@link #getInheritanceLevel() <em>Inheritance Level</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInheritanceLevel()
+ * @generated
+ * @ordered
+ */
+ protected static final int INHERITANCE_LEVEL_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getInheritanceLevel() <em>Inheritance Level</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInheritanceLevel()
+ * @generated
+ * @ordered
+ */
+ protected int inheritanceLevel = INHERITANCE_LEVEL_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected NodeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FsmGenPackage.Literals.NODE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Graph getGraph() {
+ if (eContainerFeatureID() != FsmGenPackage.NODE__GRAPH) return null;
+ return (Graph)eInternalContainer();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetGraph(Graph newGraph, NotificationChain msgs) {
+ msgs = eBasicSetContainer((InternalEObject)newGraph, FsmGenPackage.NODE__GRAPH, msgs);
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setGraph(Graph newGraph) {
+ if (newGraph != eInternalContainer() || (eContainerFeatureID() != FsmGenPackage.NODE__GRAPH && newGraph != null)) {
+ if (EcoreUtil.isAncestor(this, newGraph))
+ throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
+ NotificationChain msgs = null;
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ if (newGraph != null)
+ msgs = ((InternalEObject)newGraph).eInverseAdd(this, FsmGenPackage.GRAPH__NODES, Graph.class, msgs);
+ msgs = basicSetGraph(newGraph, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.NODE__GRAPH, newGraph, newGraph));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Graph getSubgraph() {
+ return subgraph;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetSubgraph(Graph newSubgraph, NotificationChain msgs) {
+ Graph oldSubgraph = subgraph;
+ subgraph = newSubgraph;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FsmGenPackage.NODE__SUBGRAPH, oldSubgraph, newSubgraph);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSubgraph(Graph newSubgraph) {
+ if (newSubgraph != subgraph) {
+ NotificationChain msgs = null;
+ if (subgraph != null)
+ msgs = ((InternalEObject)subgraph).eInverseRemove(this, FsmGenPackage.GRAPH__NODE, Graph.class, msgs);
+ if (newSubgraph != null)
+ msgs = ((InternalEObject)newSubgraph).eInverseAdd(this, FsmGenPackage.GRAPH__NODE, Graph.class, msgs);
+ msgs = basicSetSubgraph(newSubgraph, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.NODE__SUBGRAPH, newSubgraph, newSubgraph));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Link> getOutgoing() {
+ if (outgoing == null) {
+ outgoing = new EObjectWithInverseResolvingEList<Link>(Link.class, this, FsmGenPackage.NODE__OUTGOING, FsmGenPackage.LINK__SOURCE);
+ }
+ return outgoing;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Link> getIncoming() {
+ if (incoming == null) {
+ incoming = new EObjectWithInverseResolvingEList<Link>(Link.class, this, FsmGenPackage.NODE__INCOMING, FsmGenPackage.LINK__TARGET);
+ }
+ return incoming;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StateGraphNode getStateGraphNode() {
+ if (stateGraphNode != null && stateGraphNode.eIsProxy()) {
+ InternalEObject oldStateGraphNode = (InternalEObject)stateGraphNode;
+ stateGraphNode = (StateGraphNode)eResolveProxy(oldStateGraphNode);
+ if (stateGraphNode != oldStateGraphNode) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmGenPackage.NODE__STATE_GRAPH_NODE, oldStateGraphNode, stateGraphNode));
+ }
+ }
+ return stateGraphNode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StateGraphNode basicGetStateGraphNode() {
+ return stateGraphNode;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setStateGraphNode(StateGraphNode newStateGraphNode) {
+ StateGraphNode oldStateGraphNode = stateGraphNode;
+ stateGraphNode = newStateGraphNode;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.NODE__STATE_GRAPH_NODE, oldStateGraphNode, stateGraphNode));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<CommonTrigger> getCaughtTriggers() {
+ if (caughtTriggers == null) {
+ caughtTriggers = new EObjectContainmentEList<CommonTrigger>(CommonTrigger.class, this, FsmGenPackage.NODE__CAUGHT_TRIGGERS);
+ }
+ return caughtTriggers;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getInheritanceLevel() {
+ return inheritanceLevel;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setInheritanceLevel(int newInheritanceLevel) {
+ int oldInheritanceLevel = inheritanceLevel;
+ inheritanceLevel = newInheritanceLevel;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.NODE__INHERITANCE_LEVEL, oldInheritanceLevel, inheritanceLevel));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String toString() {
+ String type = "?";
+ if (getStateGraphNode() instanceof RefinedState) {
+ type = "RefinedState";
+ }
+ else if (getStateGraphNode() instanceof SimpleState) {
+ type = "SimpleState";
+ }
+ else if (getStateGraphNode() instanceof TrPoint) {
+ type = "TrPoint";
+ }
+ else if (getStateGraphNode() instanceof ChoicePoint) {
+ type = "ChoicePoint";
+ }
+ return "Node " + getStateGraphNode().getName() + " (" + type + ")";
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FsmGenPackage.NODE__GRAPH:
+ if (eInternalContainer() != null)
+ msgs = eBasicRemoveFromContainer(msgs);
+ return basicSetGraph((Graph)otherEnd, msgs);
+ case FsmGenPackage.NODE__SUBGRAPH:
+ if (subgraph != null)
+ msgs = ((InternalEObject)subgraph).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FsmGenPackage.NODE__SUBGRAPH, null, msgs);
+ return basicSetSubgraph((Graph)otherEnd, msgs);
+ case FsmGenPackage.NODE__OUTGOING:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getOutgoing()).basicAdd(otherEnd, msgs);
+ case FsmGenPackage.NODE__INCOMING:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getIncoming()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case FsmGenPackage.NODE__GRAPH:
+ return basicSetGraph(null, msgs);
+ case FsmGenPackage.NODE__SUBGRAPH:
+ return basicSetSubgraph(null, msgs);
+ case FsmGenPackage.NODE__OUTGOING:
+ return ((InternalEList<?>)getOutgoing()).basicRemove(otherEnd, msgs);
+ case FsmGenPackage.NODE__INCOMING:
+ return ((InternalEList<?>)getIncoming()).basicRemove(otherEnd, msgs);
+ case FsmGenPackage.NODE__CAUGHT_TRIGGERS:
+ return ((InternalEList<?>)getCaughtTriggers()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
+ switch (eContainerFeatureID()) {
+ case FsmGenPackage.NODE__GRAPH:
+ return eInternalContainer().eInverseRemove(this, FsmGenPackage.GRAPH__NODES, Graph.class, msgs);
+ }
+ return super.eBasicRemoveFromContainerFeature(msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FsmGenPackage.NODE__GRAPH:
+ return getGraph();
+ case FsmGenPackage.NODE__SUBGRAPH:
+ return getSubgraph();
+ case FsmGenPackage.NODE__OUTGOING:
+ return getOutgoing();
+ case FsmGenPackage.NODE__INCOMING:
+ return getIncoming();
+ case FsmGenPackage.NODE__STATE_GRAPH_NODE:
+ if (resolve) return getStateGraphNode();
+ return basicGetStateGraphNode();
+ case FsmGenPackage.NODE__CAUGHT_TRIGGERS:
+ return getCaughtTriggers();
+ case FsmGenPackage.NODE__INHERITANCE_LEVEL:
+ return getInheritanceLevel();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FsmGenPackage.NODE__GRAPH:
+ setGraph((Graph)newValue);
+ return;
+ case FsmGenPackage.NODE__SUBGRAPH:
+ setSubgraph((Graph)newValue);
+ return;
+ case FsmGenPackage.NODE__OUTGOING:
+ getOutgoing().clear();
+ getOutgoing().addAll((Collection<? extends Link>)newValue);
+ return;
+ case FsmGenPackage.NODE__INCOMING:
+ getIncoming().clear();
+ getIncoming().addAll((Collection<? extends Link>)newValue);
+ return;
+ case FsmGenPackage.NODE__STATE_GRAPH_NODE:
+ setStateGraphNode((StateGraphNode)newValue);
+ return;
+ case FsmGenPackage.NODE__CAUGHT_TRIGGERS:
+ getCaughtTriggers().clear();
+ getCaughtTriggers().addAll((Collection<? extends CommonTrigger>)newValue);
+ return;
+ case FsmGenPackage.NODE__INHERITANCE_LEVEL:
+ setInheritanceLevel((Integer)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FsmGenPackage.NODE__GRAPH:
+ setGraph((Graph)null);
+ return;
+ case FsmGenPackage.NODE__SUBGRAPH:
+ setSubgraph((Graph)null);
+ return;
+ case FsmGenPackage.NODE__OUTGOING:
+ getOutgoing().clear();
+ return;
+ case FsmGenPackage.NODE__INCOMING:
+ getIncoming().clear();
+ return;
+ case FsmGenPackage.NODE__STATE_GRAPH_NODE:
+ setStateGraphNode((StateGraphNode)null);
+ return;
+ case FsmGenPackage.NODE__CAUGHT_TRIGGERS:
+ getCaughtTriggers().clear();
+ return;
+ case FsmGenPackage.NODE__INHERITANCE_LEVEL:
+ setInheritanceLevel(INHERITANCE_LEVEL_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FsmGenPackage.NODE__GRAPH:
+ return getGraph() != null;
+ case FsmGenPackage.NODE__SUBGRAPH:
+ return subgraph != null;
+ case FsmGenPackage.NODE__OUTGOING:
+ return outgoing != null && !outgoing.isEmpty();
+ case FsmGenPackage.NODE__INCOMING:
+ return incoming != null && !incoming.isEmpty();
+ case FsmGenPackage.NODE__STATE_GRAPH_NODE:
+ return stateGraphNode != null;
+ case FsmGenPackage.NODE__CAUGHT_TRIGGERS:
+ return caughtTriggers != null && !caughtTriggers.isEmpty();
+ case FsmGenPackage.NODE__INHERITANCE_LEVEL:
+ return inheritanceLevel != INHERITANCE_LEVEL_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case FsmGenPackage.NODE___TO_STRING:
+ return toString();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+} //NodeImpl
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenAdapterFactory.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenAdapterFactory.java
index e05a7595c..b798bea30 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenAdapterFactory.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenAdapterFactory.java
@@ -1,13 +1,4 @@
/**
- * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- *
*/
package org.eclipse.etrice.core.genmodel.fsm.fsmgen.util;
@@ -18,11 +9,6 @@ import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.etrice.core.fsm.fSM.SimpleState;
-import org.eclipse.etrice.core.fsm.fSM.State;
-import org.eclipse.etrice.core.fsm.fSM.StateGraphItem;
-import org.eclipse.etrice.core.fsm.fSM.StateGraphNode;
-
import org.eclipse.etrice.core.genmodel.fsm.fsmgen.*;
/**
@@ -82,44 +68,32 @@ public class FsmGenAdapterFactory extends AdapterFactoryImpl {
protected FsmGenSwitch<Adapter> modelSwitch =
new FsmGenSwitch<Adapter>() {
@Override
- public Adapter caseActiveTrigger(ActiveTrigger object) {
- return createActiveTriggerAdapter();
- }
- @Override
- public Adapter caseExpandedModelComponent(ExpandedModelComponent object) {
- return createExpandedModelComponentAdapter();
- }
- @Override
- public Adapter caseExpandedRefinedState(ExpandedRefinedState object) {
- return createExpandedRefinedStateAdapter();
+ public Adapter caseGraphContainer(GraphContainer object) {
+ return createGraphContainerAdapter();
}
@Override
- public Adapter caseIDiagnostician(IDiagnostician object) {
- return createIDiagnosticianAdapter();
+ public Adapter caseGraph(Graph object) {
+ return createGraphAdapter();
}
@Override
- public Adapter caseITransitionChainVisitor(ITransitionChainVisitor object) {
- return createITransitionChainVisitorAdapter();
+ public Adapter caseGraphItem(GraphItem object) {
+ return createGraphItemAdapter();
}
@Override
- public Adapter caseTransitionChain(TransitionChain object) {
- return createTransitionChainAdapter();
+ public Adapter caseNode(Node object) {
+ return createNodeAdapter();
}
@Override
- public Adapter caseStateGraphItem(StateGraphItem object) {
- return createStateGraphItemAdapter();
+ public Adapter caseLink(Link object) {
+ return createLinkAdapter();
}
@Override
- public Adapter caseStateGraphNode(StateGraphNode object) {
- return createStateGraphNodeAdapter();
+ public Adapter caseCommonTrigger(CommonTrigger object) {
+ return createCommonTriggerAdapter();
}
@Override
- public Adapter caseState(State object) {
- return createStateAdapter();
- }
- @Override
- public Adapter caseSimpleState(SimpleState object) {
- return createSimpleStateAdapter();
+ public Adapter caseFSMGenElement(FSMGenElement object) {
+ return createFSMGenElementAdapter();
}
@Override
public Adapter defaultCase(EObject object) {
@@ -142,142 +116,100 @@ public class FsmGenAdapterFactory extends AdapterFactoryImpl {
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger <em>Active Trigger</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger
- * @generated
- */
- public Adapter createActiveTriggerAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent <em>Expanded Model Component</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent
- * @generated
- */
- public Adapter createExpandedModelComponentAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState <em>Expanded Refined State</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState
- * @generated
- */
- public Adapter createExpandedRefinedStateAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link IDiagnostician <em>IDiagnostician</em>}'.
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer <em>Graph Container</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
- * @see IDiagnostician
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer
* @generated
*/
- public Adapter createIDiagnosticianAdapter() {
+ public Adapter createGraphContainerAdapter() {
return null;
}
/**
- * Creates a new adapter for an object of class '{@link ITransitionChainVisitor <em>ITransition Chain Visitor</em>}'.
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph <em>Graph</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
- * @see ITransitionChainVisitor
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph
* @generated
*/
- public Adapter createITransitionChainVisitorAdapter() {
+ public Adapter createGraphAdapter() {
return null;
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.TransitionChain <em>Transition Chain</em>}'.
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphItem <em>Graph Item</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.TransitionChain
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphItem
* @generated
*/
- public Adapter createTransitionChainAdapter() {
+ public Adapter createGraphItemAdapter() {
return null;
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.fsm.fSM.StateGraphItem <em>State Graph Item</em>}'.
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node <em>Node</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
- * @see org.eclipse.etrice.core.fsm.fSM.StateGraphItem
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node
* @generated
*/
- public Adapter createStateGraphItemAdapter() {
+ public Adapter createNodeAdapter() {
return null;
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.fsm.fSM.StateGraphNode <em>State Graph Node</em>}'.
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link <em>Link</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
- * @see org.eclipse.etrice.core.fsm.fSM.StateGraphNode
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link
* @generated
*/
- public Adapter createStateGraphNodeAdapter() {
+ public Adapter createLinkAdapter() {
return null;
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.fsm.fSM.State <em>State</em>}'.
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger <em>Common Trigger</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
- * @see org.eclipse.etrice.core.fsm.fSM.State
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger
* @generated
*/
- public Adapter createStateAdapter() {
+ public Adapter createCommonTriggerAdapter() {
return null;
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.fsm.fSM.SimpleState <em>Simple State</em>}'.
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.FSMGenElement <em>FSM Gen Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
- * @see org.eclipse.etrice.core.fsm.fSM.SimpleState
+ * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FSMGenElement
* @generated
*/
- public Adapter createSimpleStateAdapter() {
+ public Adapter createFSMGenElementAdapter() {
return null;
}
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenSwitch.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenSwitch.java
index 7c319b444..64d86c43d 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenSwitch.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src-gen/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenSwitch.java
@@ -1,13 +1,4 @@
/**
- * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- *
*/
package org.eclipse.etrice.core.genmodel.fsm.fsmgen.util;
@@ -16,11 +7,6 @@ import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
-import org.eclipse.etrice.core.fsm.fSM.SimpleState;
-import org.eclipse.etrice.core.fsm.fSM.State;
-import org.eclipse.etrice.core.fsm.fSM.StateGraphItem;
-import org.eclipse.etrice.core.fsm.fSM.StateGraphNode;
-
import org.eclipse.etrice.core.genmodel.fsm.fsmgen.*;
/**
@@ -61,7 +47,7 @@ public class FsmGenSwitch<T> extends Switch<T> {
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @parameter ePackage the package in question.
+ * @param ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
*/
@@ -80,43 +66,53 @@ public class FsmGenSwitch<T> extends Switch<T> {
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
- case FsmGenPackage.ACTIVE_TRIGGER: {
- ActiveTrigger activeTrigger = (ActiveTrigger)theEObject;
- T result = caseActiveTrigger(activeTrigger);
+ case FsmGenPackage.GRAPH_CONTAINER: {
+ GraphContainer graphContainer = (GraphContainer)theEObject;
+ T result = caseGraphContainer(graphContainer);
+ if (result == null) result = caseFSMGenElement(graphContainer);
if (result == null) result = defaultCase(theEObject);
return result;
}
- case FsmGenPackage.EXPANDED_MODEL_COMPONENT: {
- ExpandedModelComponent expandedModelComponent = (ExpandedModelComponent)theEObject;
- T result = caseExpandedModelComponent(expandedModelComponent);
+ case FsmGenPackage.GRAPH: {
+ Graph graph = (Graph)theEObject;
+ T result = caseGraph(graph);
+ if (result == null) result = caseFSMGenElement(graph);
if (result == null) result = defaultCase(theEObject);
return result;
}
- case FsmGenPackage.EXPANDED_REFINED_STATE: {
- ExpandedRefinedState expandedRefinedState = (ExpandedRefinedState)theEObject;
- T result = caseExpandedRefinedState(expandedRefinedState);
- if (result == null) result = caseSimpleState(expandedRefinedState);
- if (result == null) result = caseState(expandedRefinedState);
- if (result == null) result = caseStateGraphNode(expandedRefinedState);
- if (result == null) result = caseStateGraphItem(expandedRefinedState);
+ case FsmGenPackage.GRAPH_ITEM: {
+ GraphItem graphItem = (GraphItem)theEObject;
+ T result = caseGraphItem(graphItem);
+ if (result == null) result = caseFSMGenElement(graphItem);
if (result == null) result = defaultCase(theEObject);
return result;
}
- case FsmGenPackage.IDIAGNOSTICIAN: {
- IDiagnostician iDiagnostician = (IDiagnostician)theEObject;
- T result = caseIDiagnostician(iDiagnostician);
+ case FsmGenPackage.NODE: {
+ Node node = (Node)theEObject;
+ T result = caseNode(node);
+ if (result == null) result = caseGraphItem(node);
+ if (result == null) result = caseFSMGenElement(node);
if (result == null) result = defaultCase(theEObject);
return result;
}
- case FsmGenPackage.ITRANSITION_CHAIN_VISITOR: {
- ITransitionChainVisitor iTransitionChainVisitor = (ITransitionChainVisitor)theEObject;
- T result = caseITransitionChainVisitor(iTransitionChainVisitor);
+ case FsmGenPackage.LINK: {
+ Link link = (Link)theEObject;
+ T result = caseLink(link);
+ if (result == null) result = caseGraphItem(link);
+ if (result == null) result = caseFSMGenElement(link);
if (result == null) result = defaultCase(theEObject);
return result;
}
- case FsmGenPackage.TRANSITION_CHAIN: {
- TransitionChain transitionChain = (TransitionChain)theEObject;
- T result = caseTransitionChain(transitionChain);
+ case FsmGenPackage.COMMON_TRIGGER: {
+ CommonTrigger commonTrigger = (CommonTrigger)theEObject;
+ T result = caseCommonTrigger(commonTrigger);
+ if (result == null) result = caseFSMGenElement(commonTrigger);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FsmGenPackage.FSM_GEN_ELEMENT: {
+ FSMGenElement fsmGenElement = (FSMGenElement)theEObject;
+ T result = caseFSMGenElement(fsmGenElement);
if (result == null) result = defaultCase(theEObject);
return result;
}
@@ -125,152 +121,107 @@ public class FsmGenSwitch<T> extends Switch<T> {
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Active Trigger</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Active Trigger</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseActiveTrigger(ActiveTrigger object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Expanded Model Component</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Expanded Model Component</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseExpandedModelComponent(ExpandedModelComponent object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Expanded Refined State</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Expanded Refined State</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseExpandedRefinedState(ExpandedRefinedState object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>IDiagnostician</em>'.
+ * Returns the result of interpreting the object as an instance of '<em>Graph Container</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>IDiagnostician</em>'.
+ * @return the result of interpreting the object as an instance of '<em>Graph Container</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
- public T caseIDiagnostician(IDiagnostician object) {
+ public T caseGraphContainer(GraphContainer object) {
return null;
}
/**
- * Returns the result of interpreting the object as an instance of '<em>ITransition Chain Visitor</em>'.
+ * Returns the result of interpreting the object as an instance of '<em>Graph</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>ITransition Chain Visitor</em>'.
+ * @return the result of interpreting the object as an instance of '<em>Graph</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
- public T caseITransitionChainVisitor(ITransitionChainVisitor object) {
+ public T caseGraph(Graph object) {
return null;
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Transition Chain</em>'.
+ * Returns the result of interpreting the object as an instance of '<em>Graph Item</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Transition Chain</em>'.
+ * @return the result of interpreting the object as an instance of '<em>Graph Item</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
- public T caseTransitionChain(TransitionChain object) {
+ public T caseGraphItem(GraphItem object) {
return null;
}
/**
- * Returns the result of interpreting the object as an instance of '<em>State Graph Item</em>'.
+ * Returns the result of interpreting the object as an instance of '<em>Node</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>State Graph Item</em>'.
+ * @return the result of interpreting the object as an instance of '<em>Node</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
- public T caseStateGraphItem(StateGraphItem object) {
+ public T caseNode(Node object) {
return null;
}
/**
- * Returns the result of interpreting the object as an instance of '<em>State Graph Node</em>'.
+ * Returns the result of interpreting the object as an instance of '<em>Link</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>State Graph Node</em>'.
+ * @return the result of interpreting the object as an instance of '<em>Link</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
- public T caseStateGraphNode(StateGraphNode object) {
+ public T caseLink(Link object) {
return null;
}
/**
- * Returns the result of interpreting the object as an instance of '<em>State</em>'.
+ * Returns the result of interpreting the object as an instance of '<em>Common Trigger</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>State</em>'.
+ * @return the result of interpreting the object as an instance of '<em>Common Trigger</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
- public T caseState(State object) {
+ public T caseCommonTrigger(CommonTrigger object) {
return null;
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Simple State</em>'.
+ * Returns the result of interpreting the object as an instance of '<em>FSM Gen Element</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Simple State</em>'.
+ * @return the result of interpreting the object as an instance of '<em>FSM Gen Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
- public T caseSimpleState(SimpleState object) {
+ public T caseFSMGenElement(FSMGenElement object) {
return null;
}
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.xtend b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.xtend
new file mode 100644
index 000000000..622e427cb
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.xtend
@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright (c) 2017 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.core.genmodel.fsm
+
+import com.google.inject.Inject
+import com.google.inject.Injector
+import org.eclipse.etrice.core.fsm.fSM.ChoicepointTerminal
+import org.eclipse.etrice.core.fsm.fSM.ModelComponent
+import org.eclipse.etrice.core.fsm.fSM.NonInitialTransition
+import org.eclipse.etrice.core.fsm.fSM.RefinedState
+import org.eclipse.etrice.core.fsm.fSM.RefinedTransition
+import org.eclipse.etrice.core.fsm.fSM.SimpleState
+import org.eclipse.etrice.core.fsm.fSM.State
+import org.eclipse.etrice.core.fsm.fSM.StateGraph
+import org.eclipse.etrice.core.fsm.fSM.StateGraphNode
+import org.eclipse.etrice.core.fsm.fSM.StateTerminal
+import org.eclipse.etrice.core.fsm.fSM.SubStateTrPointTerminal
+import org.eclipse.etrice.core.fsm.fSM.TrPointTerminal
+import org.eclipse.etrice.core.fsm.fSM.Transition
+import org.eclipse.etrice.core.fsm.util.FSMHelpers
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenFactory
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node
+
+class BasicFsmGenBuilder {
+
+ @Inject
+ protected extension FSMHelpers fsmHelpers
+
+ protected val factory = FsmGenFactory.eINSTANCE
+ private var int inheritanceLevel = 0
+
+ new(Injector injector) {
+ injector.injectMembers(this)
+ }
+
+ // protected constructor leaves injection to super class
+ protected new() {
+ }
+
+ def GraphContainer createTransformedModel(ModelComponent mc) {
+ mc.createContainer
+ }
+
+ private def GraphContainer create factory.createGraphContainer createContainer(ModelComponent mc) {
+ it.component = mc
+ it.graph = createStateMachine(mc)
+ }
+
+ private def Graph createStateMachine(ModelComponent mc) {
+ // neither we nor all of our base classes need to have a state machine.
+ // So we ask for the super state machine rather than for the base class'
+ // state machine
+ val superFSM = mc.superStateMachine
+
+ if (superFSM!==null) {
+ // if we have a super state machine we first recurse down
+ val baseGraph = createStateMachine(superFSM.modelComponent)
+
+ // when we ascend from the recursion we increment the inheritanceLevel
+ inheritanceLevel++
+
+ // and then merge with our (actual) state machine
+ mergeGraph(baseGraph, mc.actualStateMachine)
+ }
+ else if (mc.actualStateMachine!==null) {
+ // first state machine in the hierarchy: create it
+ mc.actualStateMachine?.createGraph
+ }
+ }
+
+ private def Graph mergeGraph(Graph graph, StateGraph sg) {
+ // mark existing items as inherited
+ graph.nodes.forEach[inherited = true]
+ graph.links.forEach[inherited = true]
+
+ // add items to already existing graph
+ graph.createContents(sg)
+
+ // point to the current state graph
+ graph.stateGraph = sg
+
+ return graph
+ }
+
+ private def Graph create factory.createGraph createGraph(StateGraph sg) {
+ it.stateGraph = sg
+ createContents(sg)
+ }
+
+ private def createContents(Graph graph, StateGraph sg) {
+ graph.nodes.addAll(sg.chPoints.map[createNode])
+ graph.nodes.addAll(sg.trPoints.map[createNode])
+ graph.nodes.addAll(sg.states.filter(typeof(SimpleState)).map[createNode])
+ graph.links.addAll(sg.transitions.map[createLink])
+
+ // refined states and refined transitions
+ sg.states.filter(typeof(RefinedState)).forEach[handleRefinedState]
+ sg.refinedTransitions.forEach[handleRefinedTransition]
+ }
+
+ private def handleRefinedState(RefinedState s) {
+ // we pick the node that initially was created from a SimpleState
+ val refinedNode = s.finalTarget.createNode
+
+ // handle the sub graphs
+ if (s.subgraph!==null) {
+ if (refinedNode.subgraph!==null) {
+ refinedNode.subgraph.mergeGraph(s.subgraph)
+ }
+ else {
+ refinedNode.subgraph = s.subgraph.createGraph
+ }
+ }
+ // else nothing to do, whether the targetGraph exists or not
+
+ // change the target Node's stateGraphNode to our RefinedState
+ val target = refinedNode
+ target.stateGraphNode = s
+ }
+
+ private def handleRefinedTransition(RefinedTransition t) {
+ // change the target link's transition to the refined transition
+ t.target.createLink.transition = t
+ }
+
+ private def Link create factory.createLink createLink(Transition tr) {
+ it.transition = tr
+ it.source = if (tr instanceof NonInitialTransition) tr.from.createNode
+ it.target = tr.to.createNode
+ }
+
+ private def dispatch create factory.createNode createNode(StateGraphNode s) {
+ it.stateGraphNode = s
+ it.inheritanceLevel = inheritanceLevel
+ it.subgraph = if(s instanceof State) s.subgraph?.createGraph
+ }
+
+ private def dispatch Node createNode(ChoicepointTerminal tt) {
+ tt.cp.createNode
+ }
+
+ private def dispatch Node createNode(TrPointTerminal tt) {
+ tt.trPoint.createNode
+ }
+
+ private def dispatch Node createNode(StateTerminal tt) {
+ tt.state.createNode
+ }
+
+ private def dispatch Node createNode(SubStateTrPointTerminal tt) {
+ tt.trPoint.createNode
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/ExtendedFsmGenBuilder.xtend b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/ExtendedFsmGenBuilder.xtend
new file mode 100644
index 000000000..ec8b74c5b
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/ExtendedFsmGenBuilder.xtend
@@ -0,0 +1,239 @@
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * hrr@protos.de (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.core.genmodel.fsm
+
+import com.google.inject.Inject
+import com.google.inject.Injector
+import java.util.HashMap
+import java.util.List
+import org.eclipse.emf.ecore.EObject
+import org.eclipse.emf.ecore.EStructuralFeature
+import org.eclipse.etrice.core.fsm.fSM.FSMPackage
+import org.eclipse.etrice.core.fsm.fSM.MessageFromIf
+import org.eclipse.etrice.core.fsm.fSM.State
+import org.eclipse.etrice.core.fsm.fSM.TransitionPoint
+import org.eclipse.etrice.core.fsm.fSM.Trigger
+import org.eclipse.etrice.core.fsm.fSM.TriggeredTransition
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenFactory
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node
+
+import static extension org.eclipse.etrice.core.genmodel.fsm.FsmGenExtensions.*
+
+class ExtendedFsmGenBuilder extends BasicFsmGenBuilder {
+
+ @Inject
+ protected extension ICommonDataCalculator
+ @Inject
+ protected extension TriggerExtensions
+
+ protected IDiagnostician validator
+
+ val factory = FsmGenFactory.eINSTANCE
+
+ new(Injector injector, IDiagnostician validator) {
+ super()
+ injector.injectMembers(this)
+ this.validator = validator
+ }
+
+ /**
+ * computes the available triggers for all leaf states
+ */
+ def withTriggersInStates(GraphContainer gc) {
+ if (!gc.initializedTriggersInStates) {
+ if (gc.graph!==null) {
+ gc.graph.allStateNodes.filter[subgraph===null].forEach[computeTriggers]
+ }
+ gc.initializedTriggersInStates = true
+ }
+
+ return gc
+ }
+
+ /**
+ * determines all transition chain heads of all transitions
+ */
+ def withChainHeads(GraphContainer gc) {
+ if (!gc.initializedChainHeads) {
+ if (gc.graph!==null) {
+ gc.graph.allChainHeads.forEach[it.followChain(it)]
+ }
+ gc.initializedChainHeads = true
+ }
+
+ return gc
+ }
+
+ /**
+ * calculates and stores the common data. Prerequisite is the computation of the
+ * chain heads, which is performed if not done already.
+ */
+ def withCommonData(GraphContainer gc) {
+ if (!gc.initializedChainHeads) {
+ gc.withChainHeads
+ }
+ if (!gc.initializedCommonData) {
+ if (gc.graph!==null) {
+ gc.graph.allLinks.forEach[commonData = calculateCommonData]
+ }
+ gc.initializedCommonData = true
+ }
+
+ return gc
+ }
+
+ private def void followChain(Link l, Link head) {
+ // if we started at an initial or guarded transition no interface item can be provided
+ if (!(head.transition instanceof TriggeredTransition)) {
+ l.ifitemTriggered = false
+ }
+
+ // add our chain head
+ l.chainHeads.add(head)
+
+ // have a look at the target node: the chain terminates in states and in transition points
+ val target = l.target.stateGraphNode
+ if (target instanceof State || target instanceof TransitionPoint) {
+ return
+ }
+ else {
+ // follow all outgoing links recursively
+ for (next : l.target.outgoing) {
+ next.followChain(head)
+ }
+ }
+ }
+
+ private def void computeTriggers(Node s) {
+ // we use a linked HashMap to preserve the order (insertion) to facilitate testability
+ val caughtTriggers = <String, CommonTrigger>newLinkedHashMap
+
+ s.computeTriggersRecursive(caughtTriggers)
+
+ // make it safe against a duplicate call
+ s.caughtTriggers.clear
+
+ // transfer the result
+ s.caughtTriggers.addAll(caughtTriggers.values)
+ }
+
+ private def void computeTriggersRecursive(Node s, HashMap<String, CommonTrigger> caughtTriggers) {
+ // first visit this state: consider all outgoing triggered transitions
+ s.outgoingTriggeredTransitionLinks.toList.computeTriggers(caughtTriggers)
+
+ // then handle transition points: consider all outgoing triggered transitions of ALL
+ // transition points of the parent graph of this state
+ val trPointTransitions = s.graph.transitionPointNodes.map[outgoingTriggeredTransitionLinks].flatten.toList
+ trPointTransitions.computeTriggers(caughtTriggers)
+
+ // recursively ascend to surrounding context
+ if (!s.graph.isTopLevel) {
+ s.parentState.computeTriggersRecursive(caughtTriggers)
+ }
+ }
+
+ private def void computeTriggers(List<Link> sameLevelLinks, HashMap<String, CommonTrigger> caughtTriggers) {
+ // we need a mapping from transitions to links below
+ val trans2link = newHashMap
+ sameLevelLinks.forEach[trans2link.put(transition, it)]
+
+ for (l : sameLevelLinks) {
+ for (tr : (l.transition as TriggeredTransition).triggers) {
+ val triggerHasGuard = tr.hasGuard
+ for (mif : tr.msgFromIfPairs) {
+ val tag = mif.triggerTag
+ var ct = caughtTriggers.get(tag)
+
+ /*
+ * accept new trigger if
+ *
+ * - no inner or inner with guard
+ * - accept several but only one without guard (count),
+ * insert those with guard first in the list of the _same_ level(!)
+ */
+ if (ct===null) {
+ // no inner transition with this trigger exists yet,
+ // so this is a new trigger (and our unique point of CommonTrigger creation)
+ ct = l.createCommonTrigger(mif, tag)
+ ct.hasGuard = triggerHasGuard
+ caughtTriggers.put(tag, ct)
+ }
+ else {
+ // check guards of previous transitions: compare all triggers and
+ // find matching ones that aren't guarded
+ val unguarded = ct.links.map[(transition as TriggeredTransition).triggers].flatten.
+ filter[hasMatchingTrigger(tag) && !hasGuard].head?.eContainer as TriggeredTransition
+
+ if (unguarded!==null) {
+ // we found an unguarded trigger in one of the previous transitions
+
+ val unguardedLink = trans2link.get(unguarded)
+ if (sameLevelLinks.contains(unguardedLink)) {
+ // we have an unguarded transition
+ if (triggerHasGuard) {
+ // this case is valid. Now we add the transition RIGHT BEFORE the
+ // unguarded one we found on the same level
+ val idx = ct.links.indexOf(unguardedLink)
+ ct.hasGuard = triggerHasGuard
+ ct.links.add(idx, l)
+ }
+ else {
+ validationError("Transitions with same trigger on same level have to be guarded!", l.transition, FSMPackage.eINSTANCE.getTriggeredTransition_Triggers())
+ }
+ }
+ //else {
+ // this trigger is hidden by a previous unguarded transition on a higher level.
+ // No action needed
+ //}
+ }
+ else {
+ // append this transition
+ ct.links.add(l)
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private def boolean hasMatchingTrigger(Trigger trig, String tag) {
+ for (mifp2 : trig.msgFromIfPairs) {
+ val tr2 = mifp2.triggerTag
+ if (tr2.equals(tag)) {
+ return true
+ }
+ }
+ return false
+ }
+
+ def private CommonTrigger createCommonTrigger(Link l, MessageFromIf mif, String tag) {
+ val it = factory.createCommonTrigger
+ it.trigger = tag
+ it.ifitem = mif.from
+ it.msg = mif.message
+ it.links.add(l)
+
+ return it
+ }
+
+ protected def void validationError(String msg, EObject obj, EStructuralFeature feature) {
+ validationError(msg, obj, feature, IDiagnostician.INSIGNIFICANT_INDEX)
+ }
+
+ protected def void validationError(String msg, EObject obj, EStructuralFeature feature, int idx) {
+ validator.error(msg, obj, feature, idx)
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/FsmGenChecker.xtend b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/FsmGenChecker.xtend
new file mode 100644
index 000000000..ba6fd869a
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/FsmGenChecker.xtend
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2017 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.core.genmodel.fsm
+
+import org.eclipse.etrice.core.fsm.fSM.NonInitialTransition
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node
+import org.eclipse.etrice.core.fsm.fSM.TrPoint
+import org.eclipse.etrice.core.fsm.fSM.State
+
+class FsmGenChecker {
+
+ static def check(GraphContainer gc, ILogger logger) {
+ // graphs
+ gc.eAllContents.filter(typeof(Graph)).forEach[checkGraph(it, logger)]
+
+ // nodes
+ gc.eAllContents.filter(typeof(Node)).forEach[checkNode(it, logger)]
+
+ // links
+ gc.eAllContents.filter(typeof(Link)).forEach[checkLink(it, logger)]
+ }
+
+ private static def void checkLink(Link it, ILogger logger) {
+ if (transition==null) {
+ logger.logError("graph doesn't point to ROOM transition")
+ }
+ else if (transition.eIsProxy) {
+ logger.logError("unresolved ROOM transition")
+ }
+ else if (transition.eContainer==null) {
+ logger.logError("dangling ROOM transition")
+ }
+ else if (target==null) {
+ logger.logError("link without target")
+ }
+ else if (source==null && transition instanceof NonInitialTransition) {
+ logger.logError("non-initial link without source")
+ }
+
+ if (source!=null) {
+ checkLinkEnd(it, it.source, logger)
+ }
+ checkLinkEnd(it, it.target, logger)
+ }
+
+ private static def checkLinkEnd(Link link, Node node, ILogger logger) {
+ if (node.eContainer == link.eContainer) {
+ return;
+ }
+ else {
+ if (!(node.stateGraphNode instanceof TrPoint)) {
+ logger.logError("subgraph item is not transition point")
+ }
+ else if (!(node.eContainer.eContainer instanceof Node)) {
+ logger.logError("subgraph item is in unexpected container")
+ }
+ else if (!((node.eContainer.eContainer as Node).stateGraphNode instanceof State)) {
+ logger.logError("subgraph item is in unexpected container")
+ }
+ else if (node.eContainer.eContainer.eContainer != link.eContainer) {
+ logger.logError("subgraph item is in unexpected container")
+ }
+ }
+ }
+
+ private static def void checkNode(Node it, ILogger logger) {
+ if (stateGraphNode==null) {
+ logger.logError("graph doesn't point to ROOM state graph node")
+ }
+ else if (stateGraphNode.eIsProxy) {
+ logger.logError("unresolved ROOM graph node")
+ }
+ else if (stateGraphNode.eContainer==null) {
+ logger.logError("dangling ROOM graph node")
+ }
+ else if (stateGraphNode.getName()==null) {
+ logger.logError("ROOM graph node without name")
+ }
+ else if (graph==null) {
+ logger.logError("node isn't contained in a graph")
+ }
+
+ // incoming transitions
+ for (l : incoming) {
+ if (l.target.stateGraphNode != it.stateGraphNode) {
+ logger.logError("ROOM target node of an incoming transition must be myself")
+ }
+ }
+
+ // outgoing transitions
+ for (l : outgoing) {
+ if (l.source.stateGraphNode != it.stateGraphNode) {
+ logger.logError("ROOM source node of an outgoing transition must be myself")
+ }
+ }
+ }
+
+ private static def void checkGraph(Graph it, ILogger logger) {
+ if (stateGraph==null) {
+ logger.logError("graph doesn't point to ROOM state graph")
+ }
+ else if (stateGraph.eIsProxy) {
+ logger.logError("unresolved ROOM graph")
+ }
+ else if (stateGraph.eContainer==null) {
+ logger.logError("dangling ROOM graph")
+ }
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/FsmGenExtensions.xtend b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/FsmGenExtensions.xtend
new file mode 100644
index 000000000..7b5193dcc
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/FsmGenExtensions.xtend
@@ -0,0 +1,280 @@
+/*******************************************************************************
+ * Copyright (c) 2017 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.core.genmodel.fsm
+
+import java.util.List
+import org.eclipse.etrice.core.fsm.fSM.CPBranchTransition
+import org.eclipse.etrice.core.fsm.fSM.ChoicePoint
+import org.eclipse.etrice.core.fsm.fSM.ContinuationTransition
+import org.eclipse.etrice.core.fsm.fSM.DetailCode
+import org.eclipse.etrice.core.fsm.fSM.EntryPoint
+import org.eclipse.etrice.core.fsm.fSM.ExitPoint
+import org.eclipse.etrice.core.fsm.fSM.GuardedTransition
+import org.eclipse.etrice.core.fsm.fSM.InitialTransition
+import org.eclipse.etrice.core.fsm.fSM.RefinedTransition
+import org.eclipse.etrice.core.fsm.fSM.State
+import org.eclipse.etrice.core.fsm.fSM.TrPoint
+import org.eclipse.etrice.core.fsm.fSM.TransitionBase
+import org.eclipse.etrice.core.fsm.fSM.TransitionPoint
+import org.eclipse.etrice.core.fsm.fSM.TriggeredTransition
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node
+
+class FsmGenExtensions {
+
+ public static def dispatch getName(Node nd) {
+ nd.stateGraphNode.name
+ }
+
+ public static def dispatch getName(Link l) {
+ l.transition.name
+ }
+
+ public static def getStateNodes(Graph g) {
+ g.nodes.filter[stateGraphNode instanceof State]
+ }
+
+ public static def getAllNodes(Graph g) {
+ g.eAllContents.filter(typeof(Node))
+ }
+
+ public static def getAllStateNodes(Graph g) {
+ g.allNodes.filter[stateGraphNode instanceof State]
+ }
+
+ public static def getChoicePointNodes(Graph g) {
+ g.nodes.filter[stateGraphNode instanceof ChoicePoint]
+ }
+
+ public static def getAllChoicePointNodes(Graph g) {
+ g.allNodes.filter[stateGraphNode instanceof ChoicePoint]
+ }
+
+ public static def getTrPointNodes(Graph g) {
+ g.nodes.filter[stateGraphNode instanceof TrPoint]
+ }
+
+ public static def getAllTrPointNodes(Graph g) {
+ g.allNodes.filter[stateGraphNode instanceof TrPoint]
+ }
+
+ public static def getTransitionPointNodes(Graph g) {
+ g.nodes.filter[stateGraphNode instanceof TransitionPoint]
+ }
+
+ public static def getAllTransitionPointNodes(Graph g) {
+ g.allNodes.filter[stateGraphNode instanceof TransitionPoint]
+ }
+
+ public static def getEntryPointNodes(Graph g) {
+ g.nodes.filter[stateGraphNode instanceof EntryPoint]
+ }
+
+ public static def getAllEntryPointNodes(Graph g) {
+ g.allNodes.filter[stateGraphNode instanceof EntryPoint]
+ }
+
+ public static def getExitPointNodes(Graph g) {
+ g.nodes.filter[stateGraphNode instanceof ExitPoint]
+ }
+
+ public static def getAllExitPointNodes(Graph g) {
+ g.allNodes.filter[stateGraphNode instanceof ExitPoint]
+ }
+
+ public static def getStates(Graph g) {
+ g.stateNodes.map[stateGraphNode].filter(typeof(State))
+ }
+
+ public static def getAllStates(Graph g) {
+ g.allStateNodes.map[stateGraphNode].filter(typeof(State))
+ }
+
+ public static def getChoicePoints(Graph g) {
+ g.choicePointNodes.map[stateGraphNode].filter(typeof(ChoicePoint))
+ }
+
+ public static def getTrPoints(Graph g) {
+ g.trPointNodes.map[stateGraphNode].filter(typeof(TrPoint))
+ }
+
+ public static def getInitialTransition(Graph g) {
+ g.links.map[transition].filter(typeof(InitialTransition)).head
+ }
+
+ public static def getAllLinks(Graph g) {
+ g.eAllContents.filter(typeof(Link))
+ }
+
+ public static def getAllInitialTranisitionLinks(Graph g) {
+ g.allLinks.filter[transition instanceof InitialTransition]
+ }
+
+ public static def getAllTriggeredTranisitionLinks(Graph g) {
+ g.allLinks.filter[transition instanceof TriggeredTransition]
+ }
+
+ public static def getAllContinuationTranisitionLinks(Graph g) {
+ g.allLinks.filter[transition instanceof ContinuationTransition]
+ }
+
+ public static def getAllCPBranchTranisitionLinks(Graph g) {
+ g.allLinks.filter[transition instanceof CPBranchTransition]
+ }
+
+ /**
+ * returns all links whose transitions are chain heads
+ *
+ * @param g a graph
+ * @return all deeply contained links that are chain heads
+ *
+ * @see #isChainHead(Link))
+ */
+ public static def getAllChainHeads(Graph g) {
+ g.allLinks.filter[isChainHead]
+ }
+
+ /**
+ * @param l a link
+ * @return {@code true} if the transition associated with this link is a chain head
+ *
+ * @see #isChainHead(TransitionBase))
+ */
+ public static def isChainHead(Link l) {
+ l.transition.isChainHead
+ }
+
+ /**
+ * the head of a transition chain is an initial, a guarded or a triggered transition
+ *
+ * @param l a link
+ * @return {@code true} if this transition is of one of the above types
+ */
+ public static def boolean isChainHead(TransitionBase t) {
+ if (t instanceof RefinedTransition) {
+ t.target.isChainHead
+ }
+ else {
+ t instanceof InitialTransition ||
+ t instanceof GuardedTransition ||
+ t instanceof TriggeredTransition
+ }
+ }
+
+ public static def getOutgoingTriggeredTransitionLinks(Node s) {
+ s.outgoing.filter[transition instanceof TriggeredTransition]
+ }
+
+ public static def getOutgoingTriggeredTransitions(Node s) {
+ s.getOutgoingTriggeredTransitionLinks.map[transition].filter(typeof(TriggeredTransition))
+ }
+
+ public static def getOutgoingTransitionsHierarchically(Node s) {
+ s.getOutgoingLinksHierarchically.map[transition]
+ }
+
+ public static def getOutgoingLinksHierarchically(Node s) {
+ val result = newArrayList
+
+ var current = s
+ while (current!==null) {
+ // outgoing transitions of the state
+ result.addAll(s.outgoing)
+
+ // outgoing transitions of the transition points of the same level
+ result.addAll(s.graph.transitionPointNodes.map[outgoing].flatten)
+
+ // ascend to the parent state (iff)
+ current = current.getParentState
+ }
+
+ return result
+ }
+
+ public static def isTopLevel(Graph g) {
+ if (g!==null) {
+ g.eContainer instanceof GraphContainer
+ }
+ else true
+ }
+
+ public static def isEmpty(Graph g) {
+ g===null || (g.nodes.empty && g.links.empty)
+ }
+
+ public static def isLeaf(Node n) {
+ n.subgraph===null
+ }
+
+ public static def isTopLevel(Node n) {
+ n.graph.isTopLevel
+ }
+
+ public static def getParentState(Node n) {
+ if (n.isTopLevel) {
+ null
+ }
+ else {
+ n.graph.eContainer as Node
+ }
+ }
+
+ public static def getChoicepointDefaultBranch(Node n) {
+ if (!(n.stateGraphNode instanceof ChoicePoint)) {
+ return null
+ }
+
+ return n.outgoing.filter[transition instanceof ContinuationTransition].head
+ }
+
+ public static def getParentState(Link l) {
+ if (l.graph.isTopLevel) {
+ null
+ }
+ else {
+ l.graph.eContainer as Node
+ }
+ }
+
+ public static def isHandler(Link l) {
+ val sourceNode = l.source.stateGraphNode
+ if (sourceNode instanceof TransitionPoint) {
+ sourceNode.isHandler
+ }
+ else {
+ false
+ }
+ }
+
+ public static def List<DetailCode> getAllDetailCodes(Graph graph) {
+ val detailCodes = <DetailCode>newArrayList
+
+ if (graph!==null) {
+ val allTransitions = graph.allLinks.map[transition]
+ detailCodes += allTransitions.map[action].toList
+
+ val allStates = graph.allStateNodes.map[stateGraphNode].filter(typeof(State))
+ detailCodes += allStates.map[entryCode].toList
+ detailCodes += allStates.map[doCode].toList
+ detailCodes += allStates.map[exitCode].toList
+ }
+
+ return detailCodes
+ }
+
+ public static def getLinkFor(GraphContainer gc, TransitionBase t) {
+ gc.graph.allLinks.findFirst[transition===t]
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/ICommonDataCalculator.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/ICommonDataCalculator.java
new file mode 100644
index 000000000..1db60179d
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/ICommonDataCalculator.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * hrr@protos.de (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.core.genmodel.fsm;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link;
+
+public interface ICommonDataCalculator {
+
+ /**
+ * calculates the common data of the transition associated with this link.
+ * That means all triggers of all transition chain heads of this link are inspected.
+ * If one of these has no data, the common data is null.
+ * If all of them have a common parent data type (represented as some EObject), then this
+ * is taken. If there is no common data type but there are data the link itself is returned
+ * with the meaning that there is a generic base type (like Object in Java or void* in C/C++)
+ *
+ * @param l a link
+ * @return an EObject with the meaning as explained above
+ */
+ EObject calculateCommonData(Link l);
+}
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/IDiagnostician.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/IDiagnostician.java
index de0dc86a5..9a9f865b7 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/IDiagnostician.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/IDiagnostician.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
+package org.eclipse.etrice.core.genmodel.fsm;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/base/ILogger.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/ILogger.java
index 03c53818d..64a6523fc 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/base/ILogger.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/ILogger.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.core.genmodel.fsm.base;
+package org.eclipse.etrice.core.genmodel.fsm;
import org.eclipse.emf.ecore.EObject;
@@ -29,7 +29,17 @@ public interface ILogger {
/**
* @param text error text
+ */
+ void logError(String text);
+
+ /**
+ * @param text error text
* @param obj {@link org.eclipse.emf.ecore.EObject EObject} (if available) where the error occurred
*/
void logError(String text, EObject obj);
+
+ /**
+ * returns true if an error occurred
+ */
+ boolean hasErrors();
}
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/base/NullDiagnostician.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/NullDiagnostician.java
index 790b84d79..f67535eb7 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/base/NullDiagnostician.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/NullDiagnostician.java
@@ -10,11 +10,10 @@
*
*******************************************************************************/
-package org.eclipse.etrice.core.genmodel.fsm.base;
+package org.eclipse.etrice.core.genmodel.fsm;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.IDiagnostician;
/**
* @author Henrik Rentz-Reichert
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/base/NullLogger.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/NullLogger.java
index 7efce07b7..259f3dca9 100644
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/base/NullLogger.java
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/NullLogger.java
@@ -10,7 +10,7 @@
*
*******************************************************************************/
-package org.eclipse.etrice.core.genmodel.fsm.base;
+package org.eclipse.etrice.core.genmodel.fsm;
import org.eclipse.emf.ecore.EObject;
@@ -20,6 +20,8 @@ import org.eclipse.emf.ecore.EObject;
*/
public class NullLogger implements ILogger {
+ private int errors = 0;
+
/* (non-Javadoc)
* @see org.eclipse.etrice.core.genmodel.base.ILogger#logInfo(java.lang.String)
*/
@@ -32,6 +34,17 @@ public class NullLogger implements ILogger {
*/
@Override
public void logError(String text, EObject obj) {
+ ++errors;
+ }
+
+ @Override
+ public void logError(String text) {
+ logError(text, null);
+ }
+
+ @Override
+ public boolean hasErrors() {
+ return errors!=0;
}
}
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/TriggerExtensions.xtend b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/TriggerExtensions.xtend
new file mode 100644
index 000000000..ba9422ba4
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/TriggerExtensions.xtend
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2017 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.core.genmodel.fsm
+
+import org.eclipse.etrice.core.fsm.naming.FSMNameProvider
+import com.google.inject.Inject
+import org.eclipse.etrice.core.fsm.fSM.MessageFromIf
+import org.eclipse.etrice.core.fsm.fSM.Trigger
+
+class TriggerExtensions {
+
+ public static String TRIGGER_SEP = "#"
+
+ @Inject
+ protected extension FSMNameProvider
+
+ def getTriggerTag(MessageFromIf it) {
+ from.name + TRIGGER_SEP + message.messageName
+ }
+
+ def boolean isMatching(Trigger trig, String trigstr) {
+ for (mif : trig.msgFromIfPairs) {
+ val tr = mif.triggerTag
+ if (tr==trigstr)
+ return true
+ }
+ return false
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/builder/FSMGeneratorModelBuilder.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/builder/FSMGeneratorModelBuilder.java
deleted file mode 100644
index 494e45d34..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/builder/FSMGeneratorModelBuilder.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.core.genmodel.fsm.builder;
-
-import org.eclipse.etrice.core.fsm.fSM.ModelComponent;
-import org.eclipse.etrice.core.genmodel.fsm.base.ILogger;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenFactory;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.IDiagnostician;
-
-/**
- * @author Henrik Rentz-Reichert
- *
- */
-public class FSMGeneratorModelBuilder {
-
- private boolean debug = false;
- private ILogger logger;
- private IDiagnostician diagnostician;
-
- /**
- * @param nullLogger
- * @param diagnostician
- */
- public FSMGeneratorModelBuilder(ILogger logger, IDiagnostician diagnostician) {
- this.logger = logger;
- this.diagnostician = diagnostician;
- }
-
- /**
- * @param mc
- * @return
- */
- public ExpandedModelComponent createExpandedModelComponent(ModelComponent mc) {
- if (debug)
- logger.logInfo("GeneratorModelBuilder: creating expanded model compoent from "+mc.getComponentName());
-
- ExpandedModelComponent xmc = FsmGenFactory.eINSTANCE.createExpandedModelComponent();
- xmc.setModelComponent(mc);
-
- xmc.prepare(diagnostician);
-
- return xmc;
- }
-
-}
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ActiveTrigger.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ActiveTrigger.java
deleted file mode 100644
index 908e1c2c9..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ActiveTrigger.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.etrice.core.fsm.fSM.AbstractInterfaceItem;
-import org.eclipse.etrice.core.fsm.fSM.Guard;
-import org.eclipse.etrice.core.fsm.fSM.State;
-import org.eclipse.etrice.core.fsm.fSM.TrPoint;
-import org.eclipse.etrice.core.fsm.fSM.Transition;
-import org.eclipse.etrice.core.fsm.fSM.Trigger;
-import org.eclipse.etrice.core.fsm.fSM.TriggeredTransition;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Active Trigger</b></em>'.
- * It combines information from a transition {@link Trigger} and is meant to represent a trigger which is
- * attached to a {@link State}. The active triggers of a state are computed by collecting all triggers
- * of {@link Transition}s starting at the state. Then transitions starting at {@link TrPoint}s of the parent state
- * are considered. This process is recursively done for all parent states. When a msg/ifitem pair is already
- * in the list of active triggers then further occurrences are skipped except when the first occurrences are
- * {@link Guard}ed.<br/><br/>
- *
- * The ordered list of active triggers can be obtained from the ExpandedActorClass by calling
- * {@link org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass#getActiveTriggers(State) getActiveTriggers(State)}
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger#getMsg <em>Msg</em>}</li>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger#getIfitem <em>Ifitem</em>}</li>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger#getTrigger <em>Trigger</em>}</li>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger#getTransitions <em>Transitions</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getActiveTrigger()
- * @model
- * @generated
- */
-public interface ActiveTrigger extends EObject {
- /**
- * Returns the value of the '<em><b>Msg</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * This is the triggering message (in combination with an interface item, cf. {@link #getIfitem()}
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Msg</em>' reference.
- * @see #setMsg(EObject)
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getActiveTrigger_Msg()
- * @model
- * @generated
- */
- EObject getMsg();
-
- /**
- * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger#getMsg <em>Msg</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Msg</em>' reference.
- * @see #getMsg()
- * @generated
- */
- void setMsg(EObject value);
-
- /**
- * Returns the value of the '<em><b>Ifitem</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * This is the interface item from which the triggering message (see {@link #getMsg()} originates.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Ifitem</em>' reference.
- * @see #setIfitem(AbstractInterfaceItem)
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getActiveTrigger_Ifitem()
- * @model
- * @generated
- */
- AbstractInterfaceItem getIfitem();
-
- /**
- * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger#getIfitem <em>Ifitem</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Ifitem</em>' reference.
- * @see #getIfitem()
- * @generated
- */
- void setIfitem(AbstractInterfaceItem value);
-
- /**
- * Returns the value of the '<em><b>Trigger</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * A string representation of the trigger (<b>for internal use only</b>).
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Trigger</em>' attribute.
- * @see #setTrigger(String)
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getActiveTrigger_Trigger()
- * @model
- * @generated
- */
- String getTrigger();
-
- /**
- * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger#getTrigger <em>Trigger</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Trigger</em>' attribute.
- * @see #getTrigger()
- * @generated
- */
- void setTrigger(String value);
-
- /**
- * Returns the value of the '<em><b>Transitions</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.etrice.core.fsm.fSM.TriggeredTransition}.
- * <!-- begin-user-doc -->
- * <p>
- * An ordered list of {@link Transition}s with this trigger.
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Transitions</em>' reference list.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getActiveTrigger_Transitions()
- * @model
- * @generated
- */
- EList<TriggeredTransition> getTransitions();
-
-} // ActiveTrigger
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ExpandedModelComponent.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ExpandedModelComponent.java
deleted file mode 100644
index 08d707c34..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ExpandedModelComponent.java
+++ /dev/null
@@ -1,342 +0,0 @@
-/**
- * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- *
- */
-package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.etrice.core.fsm.fSM.AbstractInterfaceItem;
-import org.eclipse.etrice.core.fsm.fSM.ContinuationTransition;
-import org.eclipse.etrice.core.fsm.fSM.MessageFromIf;
-import org.eclipse.etrice.core.fsm.fSM.ModelComponent;
-import org.eclipse.etrice.core.fsm.fSM.State;
-import org.eclipse.etrice.core.fsm.fSM.StateGraph;
-import org.eclipse.etrice.core.fsm.fSM.StateGraphItem;
-import org.eclipse.etrice.core.fsm.fSM.StateGraphNode;
-import org.eclipse.etrice.core.fsm.fSM.Transition;
-import org.eclipse.etrice.core.fsm.fSM.Trigger;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Expanded Model Component</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent#getModelComponent <em>Model Component</em>}</li>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent#getStateMachine <em>State Machine</em>}</li>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent#getTransitionChains <em>Transition Chains</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getExpandedModelComponent()
- * @model
- * @generated
- */
-public interface ExpandedModelComponent extends EObject {
- /**
- * Returns the value of the '<em><b>Model Component</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Model Component</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Model Component</em>' reference.
- * @see #setModelComponent(ModelComponent)
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getExpandedModelComponent_ModelComponent()
- * @model
- * @generated
- */
- ModelComponent getModelComponent();
-
- /**
- * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent#getModelComponent <em>Model Component</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Model Component</em>' reference.
- * @see #getModelComponent()
- * @generated
- */
- void setModelComponent(ModelComponent value);
-
- /**
- * Returns the value of the '<em><b>State Machine</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>State Machine</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>State Machine</em>' containment reference.
- * @see #setStateMachine(StateGraph)
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getExpandedModelComponent_StateMachine()
- * @model containment="true"
- * @generated
- */
- StateGraph getStateMachine();
-
- /**
- * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent#getStateMachine <em>State Machine</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>State Machine</em>' containment reference.
- * @see #getStateMachine()
- * @generated
- */
- void setStateMachine(StateGraph value);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model validatorType="org.eclipse.etrice.core.genmodel.fsm.fsmgen.IDiagnostician"
- * @generated
- */
- void prepare(IDiagnostician validator);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- void release();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- void addOwnObject(StateGraphItem obj);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- boolean isOwnObject(StateGraphItem obj);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- boolean hasBaseTransitionDetailCode(Transition trans);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- boolean hasStateMachine();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- String getTriggerCodeName(MessageFromIf mif);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- String getTriggerCodeName(ActiveTrigger at);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- EList<Transition> getOutgoingTransitions(StateGraphNode node);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- EList<Transition> getIncomingTransitions(StateGraphNode node);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- EList<ActiveTrigger> getActiveTriggers(State state);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model kind="operation"
- * @generated
- */
- EList<MessageFromIf> getTriggers();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model kind="operation"
- * @generated
- */
- EList<MessageFromIf> getOwnTriggers();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- String getMessageID(MessageFromIf mif);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- TransitionChain getChain(Transition trans);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- EList<TransitionChain> getChains(Transition trans);
-
- /**
- * Returns the value of the '<em><b>Transition Chains</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.TransitionChain}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the value of the '<em>Transition Chains</em>' containment reference list.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getExpandedModelComponent_TransitionChains()
- * @model containment="true"
- * @generated
- */
- EList<TransitionChain> getTransitionChains();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model kind="operation"
- * @generated
- */
- EList<TransitionChain> getOwnTransitionChains();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- EList<AbstractInterfaceItem> getOwnInterfaceItems(ModelComponent mc);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model kind="operation"
- * @generated
- */
- EList<AbstractInterfaceItem> getAllInterfaceItems();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- boolean isMatching(Trigger trig, String trigstr);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model outMany="true"
- * @generated
- */
- ContinuationTransition getDefaultBranch(EList<Transition> out);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- EObject getOrig(EObject copy);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- EObject getCopy(EObject orig);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model kind="operation"
- * @generated
- */
- String getModelComponentName();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- EObject getData(Transition trans);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- EList<EObject> getIncomingMessages(AbstractInterfaceItem ifitem);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- TransitionChain addTransitionChain(Transition trans);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- int getInterfaceItemLocalId(AbstractInterfaceItem ifitem);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model chainsMany="true"
- * @generated
- */
- EObject computeCommonChainData(EList<TransitionChain> chains);
-
-} // ExpandedModelComponent
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ExpandedRefinedState.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ExpandedRefinedState.java
deleted file mode 100644
index 074c127c7..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ExpandedRefinedState.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
-
-import org.eclipse.etrice.core.fsm.fSM.DetailCode;
-import org.eclipse.etrice.core.fsm.fSM.SimpleState;
-import org.eclipse.etrice.core.fsm.fSM.RefinedState;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Expanded Refined State</b></em>'.
- * The expanded refined state is a {@link SimpleState} that additionally holds inherited action codes.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState#getInheritedEntry <em>Inherited Entry</em>}</li>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState#getInheritedExit <em>Inherited Exit</em>}</li>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState#getInheritedDo <em>Inherited Do</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getExpandedRefinedState()
- * @model
- * @generated
- */
-public interface ExpandedRefinedState extends SimpleState {
- /**
- * Returns the value of the '<em><b>Inherited Entry</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * This {@link DetailCode} holds the pre-assembled inherited entry code of the original {@link RefinedState}
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Inherited Entry</em>' containment reference.
- * @see #setInheritedEntry(DetailCode)
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getExpandedRefinedState_InheritedEntry()
- * @model containment="true"
- * @generated
- */
- DetailCode getInheritedEntry();
-
- /**
- * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState#getInheritedEntry <em>Inherited Entry</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Inherited Entry</em>' containment reference.
- * @see #getInheritedEntry()
- * @generated
- */
- void setInheritedEntry(DetailCode value);
-
- /**
- * Returns the value of the '<em><b>Inherited Exit</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * This {@link DetailCode} holds the pre-assembled inherited exit code of the original {@link RefinedState}
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Inherited Exit</em>' containment reference.
- * @see #setInheritedExit(DetailCode)
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getExpandedRefinedState_InheritedExit()
- * @model containment="true"
- * @generated
- */
- DetailCode getInheritedExit();
-
- /**
- * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState#getInheritedExit <em>Inherited Exit</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Inherited Exit</em>' containment reference.
- * @see #getInheritedExit()
- * @generated
- */
- void setInheritedExit(DetailCode value);
-
- /**
- * Returns the value of the '<em><b>Inherited Do</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * This {@link DetailCode} holds the pre-assembled inherited do code of the original {@link RefinedState}
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Inherited Do</em>' containment reference.
- * @see #setInheritedDo(DetailCode)
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getExpandedRefinedState_InheritedDo()
- * @model containment="true"
- * @generated
- */
- DetailCode getInheritedDo();
-
- /**
- * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState#getInheritedDo <em>Inherited Do</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Inherited Do</em>' containment reference.
- * @see #getInheritedDo()
- * @generated
- */
- void setInheritedDo(DetailCode value);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model
- * @generated
- */
- void init(RefinedState rs);
-
-} // ExpandedRefinedState
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenFactory.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenFactory.java
deleted file mode 100644
index bc31edecf..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenFactory.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- *
- */
-package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage
- * @generated
- */
-public interface FsmGenFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- FsmGenFactory eINSTANCE = org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Active Trigger</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Active Trigger</em>'.
- * @generated
- */
- ActiveTrigger createActiveTrigger();
-
- /**
- * Returns a new object of class '<em>Expanded Model Component</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Expanded Model Component</em>'.
- * @generated
- */
- ExpandedModelComponent createExpandedModelComponent();
-
- /**
- * Returns a new object of class '<em>Expanded Refined State</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Expanded Refined State</em>'.
- * @generated
- */
- ExpandedRefinedState createExpandedRefinedState();
-
- /**
- * Returns a new object of class '<em>Transition Chain</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Transition Chain</em>'.
- * @generated
- */
- TransitionChain createTransitionChain();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- FsmGenPackage getFsmGenPackage();
-
-} //FsmGenFactory
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenPackage.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenPackage.java
deleted file mode 100644
index 591577612..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/FsmGenPackage.java
+++ /dev/null
@@ -1,720 +0,0 @@
-/**
- * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- *
- */
-package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.etrice.core.fsm.fSM.FSMPackage;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each operation of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenFactory
- * @model kind="package"
- * @generated
- */
-public interface FsmGenPackage extends EPackage {
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "fsmgen";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://www.eclipse.org/etrice/generator/fsm";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "fsmgen";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- FsmGenPackage eINSTANCE = org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ActiveTriggerImpl <em>Active Trigger</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ActiveTriggerImpl
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getActiveTrigger()
- * @generated
- */
- int ACTIVE_TRIGGER = 0;
-
- /**
- * The feature id for the '<em><b>Msg</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ACTIVE_TRIGGER__MSG = 0;
-
- /**
- * The feature id for the '<em><b>Ifitem</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ACTIVE_TRIGGER__IFITEM = 1;
-
- /**
- * The feature id for the '<em><b>Trigger</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ACTIVE_TRIGGER__TRIGGER = 2;
-
- /**
- * The feature id for the '<em><b>Transitions</b></em>' reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ACTIVE_TRIGGER__TRANSITIONS = 3;
-
- /**
- * The number of structural features of the '<em>Active Trigger</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ACTIVE_TRIGGER_FEATURE_COUNT = 4;
-
- /**
- * The meta object id for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ExpandedModelComponentImpl <em>Expanded Model Component</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ExpandedModelComponentImpl
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getExpandedModelComponent()
- * @generated
- */
- int EXPANDED_MODEL_COMPONENT = 1;
-
- /**
- * The feature id for the '<em><b>Model Component</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPANDED_MODEL_COMPONENT__MODEL_COMPONENT = 0;
-
- /**
- * The feature id for the '<em><b>State Machine</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPANDED_MODEL_COMPONENT__STATE_MACHINE = 1;
-
- /**
- * The feature id for the '<em><b>Transition Chains</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPANDED_MODEL_COMPONENT__TRANSITION_CHAINS = 2;
-
- /**
- * The number of structural features of the '<em>Expanded Model Component</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPANDED_MODEL_COMPONENT_FEATURE_COUNT = 3;
-
- /**
- * The meta object id for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ExpandedRefinedStateImpl <em>Expanded Refined State</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ExpandedRefinedStateImpl
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getExpandedRefinedState()
- * @generated
- */
- int EXPANDED_REFINED_STATE = 2;
-
- /**
- * The feature id for the '<em><b>Docu</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPANDED_REFINED_STATE__DOCU = FSMPackage.SIMPLE_STATE__DOCU;
-
- /**
- * The feature id for the '<em><b>Entry Code</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPANDED_REFINED_STATE__ENTRY_CODE = FSMPackage.SIMPLE_STATE__ENTRY_CODE;
-
- /**
- * The feature id for the '<em><b>Exit Code</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPANDED_REFINED_STATE__EXIT_CODE = FSMPackage.SIMPLE_STATE__EXIT_CODE;
-
- /**
- * The feature id for the '<em><b>Do Code</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPANDED_REFINED_STATE__DO_CODE = FSMPackage.SIMPLE_STATE__DO_CODE;
-
- /**
- * The feature id for the '<em><b>Subgraph</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPANDED_REFINED_STATE__SUBGRAPH = FSMPackage.SIMPLE_STATE__SUBGRAPH;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPANDED_REFINED_STATE__NAME = FSMPackage.SIMPLE_STATE__NAME;
-
- /**
- * The feature id for the '<em><b>Inherited Entry</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPANDED_REFINED_STATE__INHERITED_ENTRY = FSMPackage.SIMPLE_STATE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Inherited Exit</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPANDED_REFINED_STATE__INHERITED_EXIT = FSMPackage.SIMPLE_STATE_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Inherited Do</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPANDED_REFINED_STATE__INHERITED_DO = FSMPackage.SIMPLE_STATE_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Expanded Refined State</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int EXPANDED_REFINED_STATE_FEATURE_COUNT = FSMPackage.SIMPLE_STATE_FEATURE_COUNT + 3;
-
- /**
- * The meta object id for the '{@link IDiagnostician <em>IDiagnostician</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see IDiagnostician
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getIDiagnostician()
- * @generated
- */
- int IDIAGNOSTICIAN = 3;
-
- /**
- * The number of structural features of the '<em>IDiagnostician</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IDIAGNOSTICIAN_FEATURE_COUNT = 0;
-
- /**
- * The meta object id for the '{@link ITransitionChainVisitor <em>ITransition Chain Visitor</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see ITransitionChainVisitor
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getITransitionChainVisitor()
- * @generated
- */
- int ITRANSITION_CHAIN_VISITOR = 4;
-
- /**
- * The number of structural features of the '<em>ITransition Chain Visitor</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ITRANSITION_CHAIN_VISITOR_FEATURE_COUNT = 0;
-
- /**
- * The meta object id for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.TransitionChainImpl <em>Transition Chain</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.TransitionChainImpl
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getTransitionChain()
- * @generated
- */
- int TRANSITION_CHAIN = 5;
-
- /**
- * The feature id for the '<em><b>Transition</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TRANSITION_CHAIN__TRANSITION = 0;
-
- /**
- * The feature id for the '<em><b>Data</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TRANSITION_CHAIN__DATA = 1;
-
- /**
- * The number of structural features of the '<em>Transition Chain</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int TRANSITION_CHAIN_FEATURE_COUNT = 2;
-
- /**
- * Returns the meta object for class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger <em>Active Trigger</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Active Trigger</em>'.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger
- * @generated
- */
- EClass getActiveTrigger();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger#getMsg <em>Msg</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Msg</em>'.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger#getMsg()
- * @see #getActiveTrigger()
- * @generated
- */
- EReference getActiveTrigger_Msg();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger#getIfitem <em>Ifitem</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Ifitem</em>'.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger#getIfitem()
- * @see #getActiveTrigger()
- * @generated
- */
- EReference getActiveTrigger_Ifitem();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger#getTrigger <em>Trigger</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Trigger</em>'.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger#getTrigger()
- * @see #getActiveTrigger()
- * @generated
- */
- EAttribute getActiveTrigger_Trigger();
-
- /**
- * Returns the meta object for the reference list '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger#getTransitions <em>Transitions</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Transitions</em>'.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger#getTransitions()
- * @see #getActiveTrigger()
- * @generated
- */
- EReference getActiveTrigger_Transitions();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent <em>Expanded Model Component</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Expanded Model Component</em>'.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent
- * @generated
- */
- EClass getExpandedModelComponent();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent#getModelComponent <em>Model Component</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Model Component</em>'.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent#getModelComponent()
- * @see #getExpandedModelComponent()
- * @generated
- */
- EReference getExpandedModelComponent_ModelComponent();
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent#getStateMachine <em>State Machine</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>State Machine</em>'.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent#getStateMachine()
- * @see #getExpandedModelComponent()
- * @generated
- */
- EReference getExpandedModelComponent_StateMachine();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent#getTransitionChains <em>Transition Chains</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Transition Chains</em>'.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent#getTransitionChains()
- * @see #getExpandedModelComponent()
- * @generated
- */
- EReference getExpandedModelComponent_TransitionChains();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState <em>Expanded Refined State</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Expanded Refined State</em>'.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState
- * @generated
- */
- EClass getExpandedRefinedState();
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState#getInheritedEntry <em>Inherited Entry</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Inherited Entry</em>'.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState#getInheritedEntry()
- * @see #getExpandedRefinedState()
- * @generated
- */
- EReference getExpandedRefinedState_InheritedEntry();
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState#getInheritedExit <em>Inherited Exit</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Inherited Exit</em>'.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState#getInheritedExit()
- * @see #getExpandedRefinedState()
- * @generated
- */
- EReference getExpandedRefinedState_InheritedExit();
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState#getInheritedDo <em>Inherited Do</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Inherited Do</em>'.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState#getInheritedDo()
- * @see #getExpandedRefinedState()
- * @generated
- */
- EReference getExpandedRefinedState_InheritedDo();
-
- /**
- * Returns the meta object for class '{@link IDiagnostician <em>IDiagnostician</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>IDiagnostician</em>'.
- * @see IDiagnostician
- * @model instanceClass="IDiagnostician"
- * @generated
- */
- EClass getIDiagnostician();
-
- /**
- * Returns the meta object for class '{@link ITransitionChainVisitor <em>ITransition Chain Visitor</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>ITransition Chain Visitor</em>'.
- * @see ITransitionChainVisitor
- * @model instanceClass="ITransitionChainVisitor"
- * @generated
- */
- EClass getITransitionChainVisitor();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.TransitionChain <em>Transition Chain</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Transition Chain</em>'.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.TransitionChain
- * @generated
- */
- EClass getTransitionChain();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.TransitionChain#getTransition <em>Transition</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Transition</em>'.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.TransitionChain#getTransition()
- * @see #getTransitionChain()
- * @generated
- */
- EReference getTransitionChain_Transition();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.TransitionChain#getData <em>Data</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Data</em>'.
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.TransitionChain#getData()
- * @see #getTransitionChain()
- * @generated
- */
- EReference getTransitionChain_Data();
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- FsmGenFactory getFsmGenFactory();
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each operation of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- interface Literals {
- /**
- * The meta object literal for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ActiveTriggerImpl <em>Active Trigger</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ActiveTriggerImpl
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getActiveTrigger()
- * @generated
- */
- EClass ACTIVE_TRIGGER = eINSTANCE.getActiveTrigger();
-
- /**
- * The meta object literal for the '<em><b>Msg</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference ACTIVE_TRIGGER__MSG = eINSTANCE.getActiveTrigger_Msg();
-
- /**
- * The meta object literal for the '<em><b>Ifitem</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference ACTIVE_TRIGGER__IFITEM = eINSTANCE.getActiveTrigger_Ifitem();
-
- /**
- * The meta object literal for the '<em><b>Trigger</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ACTIVE_TRIGGER__TRIGGER = eINSTANCE.getActiveTrigger_Trigger();
-
- /**
- * The meta object literal for the '<em><b>Transitions</b></em>' reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference ACTIVE_TRIGGER__TRANSITIONS = eINSTANCE.getActiveTrigger_Transitions();
-
- /**
- * The meta object literal for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ExpandedModelComponentImpl <em>Expanded Model Component</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ExpandedModelComponentImpl
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getExpandedModelComponent()
- * @generated
- */
- EClass EXPANDED_MODEL_COMPONENT = eINSTANCE.getExpandedModelComponent();
-
- /**
- * The meta object literal for the '<em><b>Model Component</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference EXPANDED_MODEL_COMPONENT__MODEL_COMPONENT = eINSTANCE.getExpandedModelComponent_ModelComponent();
-
- /**
- * The meta object literal for the '<em><b>State Machine</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference EXPANDED_MODEL_COMPONENT__STATE_MACHINE = eINSTANCE.getExpandedModelComponent_StateMachine();
-
- /**
- * The meta object literal for the '<em><b>Transition Chains</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference EXPANDED_MODEL_COMPONENT__TRANSITION_CHAINS = eINSTANCE.getExpandedModelComponent_TransitionChains();
-
- /**
- * The meta object literal for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ExpandedRefinedStateImpl <em>Expanded Refined State</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ExpandedRefinedStateImpl
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getExpandedRefinedState()
- * @generated
- */
- EClass EXPANDED_REFINED_STATE = eINSTANCE.getExpandedRefinedState();
-
- /**
- * The meta object literal for the '<em><b>Inherited Entry</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference EXPANDED_REFINED_STATE__INHERITED_ENTRY = eINSTANCE.getExpandedRefinedState_InheritedEntry();
-
- /**
- * The meta object literal for the '<em><b>Inherited Exit</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference EXPANDED_REFINED_STATE__INHERITED_EXIT = eINSTANCE.getExpandedRefinedState_InheritedExit();
-
- /**
- * The meta object literal for the '<em><b>Inherited Do</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference EXPANDED_REFINED_STATE__INHERITED_DO = eINSTANCE.getExpandedRefinedState_InheritedDo();
-
- /**
- * The meta object literal for the '{@link IDiagnostician <em>IDiagnostician</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see IDiagnostician
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getIDiagnostician()
- * @generated
- */
- EClass IDIAGNOSTICIAN = eINSTANCE.getIDiagnostician();
-
- /**
- * The meta object literal for the '{@link ITransitionChainVisitor <em>ITransition Chain Visitor</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see ITransitionChainVisitor
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getITransitionChainVisitor()
- * @generated
- */
- EClass ITRANSITION_CHAIN_VISITOR = eINSTANCE.getITransitionChainVisitor();
-
- /**
- * The meta object literal for the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.TransitionChainImpl <em>Transition Chain</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.TransitionChainImpl
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.FsmGenPackageImpl#getTransitionChain()
- * @generated
- */
- EClass TRANSITION_CHAIN = eINSTANCE.getTransitionChain();
-
- /**
- * The meta object literal for the '<em><b>Transition</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference TRANSITION_CHAIN__TRANSITION = eINSTANCE.getTransitionChain_Transition();
-
- /**
- * The meta object literal for the '<em><b>Data</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference TRANSITION_CHAIN__DATA = eINSTANCE.getTransitionChain_Data();
-
- }
-
-} //FsmGenPackage
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ITransitionChainVisitor.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ITransitionChainVisitor.java
deleted file mode 100644
index 1f3711c9b..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/ITransitionChainVisitor.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
-
-import org.eclipse.etrice.core.fsm.fSM.CPBranchTransition;
-import org.eclipse.etrice.core.fsm.fSM.ContinuationTransition;
-import org.eclipse.etrice.core.fsm.fSM.State;
-import org.eclipse.etrice.core.fsm.fSM.Transition;
-
-/**
- * This interface describes the transition chain visitor.
- * The visitor is used by the code generator to generate the code associated with a transition chain.
- * It is passed in a call to
- * {@link org.eclipse.etrice.core.genmodel.etricegen.TransitionChain#genExecuteChain(ITransitionChainVisitor)
- * TransitionChain.genExecuteChain(ITransitionChainVisitor)}.
- *
- * <p>
- * The visitor has to be implemented by the concrete target language generator.
- * </p>
- *
- * @author Henrik Rentz-Reichert
- *
- */
-public interface ITransitionChainVisitor {
-
- /**
- * @param tc the transition chain
- * @return a typed declaration of the data associated with this message
- */
- String genTypedData(TransitionChain tc);
-
- /**
- * @param tr a transition
- * @return a call of the action operation (as generated by the generator)
- */
- String genActionOperationCall(Transition tr);
-
- /**
- * @param state a state
- * @return a call of the entry operation (as generated by the generator)
- */
- String genEntryOperationCall(State state);
-
- /**
- * @param state a state
- * @return a call of the exit operation (as generated by the generator)
- */
- String genExitOperationCall(State state);
-
- /**
- * @param tr a choice point branch transition (not the default branch)
- * @param isFirst <code>true</code> if this is the first of a series of if statements
- * @return code for the [else] if statement with condition (guard) and block opening
- */
- String genElseIfBranch(CPBranchTransition tr, boolean isFirst);
-
- /**
- * @param tr the choice point default branch transition
- * @return code for the final else with block opening
- */
- String genElseBranch(ContinuationTransition tr);
-
- /**
- * @return the final closing of the block
- */
- String genEndIf();
-
- /**
- * @param state a state
- * @param executeEntryCode <code>true</code> if entry code of state should be executed
- * @return a return statement with the ID of the state
- */
- String genReturnState(State state, boolean executeEntryCode);
-
-}
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/TransitionChain.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/TransitionChain.java
deleted file mode 100644
index e2e4d1279..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/TransitionChain.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- *
- */
-package org.eclipse.etrice.core.genmodel.fsm.fsmgen;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.etrice.core.fsm.fSM.State;
-import org.eclipse.etrice.core.fsm.fSM.Transition;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Transition Chain</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.TransitionChain#getTransition <em>Transition</em>}</li>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.TransitionChain#getData <em>Data</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getTransitionChain()
- * @model
- * @generated
- */
-public interface TransitionChain extends EObject {
- /**
- * Returns the value of the '<em><b>Transition</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Transition</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Transition</em>' reference.
- * @see #setTransition(Transition)
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getTransitionChain_Transition()
- * @model
- * @generated
- */
- Transition getTransition();
-
- /**
- * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.TransitionChain#getTransition <em>Transition</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Transition</em>' reference.
- * @see #getTransition()
- * @generated
- */
- void setTransition(Transition value);
-
- /**
- * Returns the value of the '<em><b>Data</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Data</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Data</em>' reference.
- * @see #setData(EObject)
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#getTransitionChain_Data()
- * @model
- * @generated
- */
- EObject getData();
-
- /**
- * Sets the value of the '{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.TransitionChain#getData <em>Data</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Data</em>' reference.
- * @see #getData()
- * @generated
- */
- void setData(EObject value);
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model kind="operation"
- * @generated
- */
- State getStateContext();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model kind="operation"
- * @generated
- */
- boolean isHandler();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @model tcvType="org.eclipse.etrice.core.genmodel.fsm.fsmgen.ITransitionChainVisitor"
- * @generated
- */
- String genExecuteChain(ITransitionChainVisitor tcv);
-
-} // TransitionChain
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/ExpandedModelComponentImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/ExpandedModelComponentImpl.java
deleted file mode 100644
index 5d60c3b09..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/ExpandedModelComponentImpl.java
+++ /dev/null
@@ -1,1410 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-package org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map.Entry;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.BasicEList;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.EcoreUtil.Copier;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.eclipse.etrice.core.fsm.fSM.AbstractInterfaceItem;
-import org.eclipse.etrice.core.fsm.fSM.ChoicePoint;
-import org.eclipse.etrice.core.fsm.fSM.ComponentCommunicationType;
-import org.eclipse.etrice.core.fsm.fSM.ContinuationTransition;
-import org.eclipse.etrice.core.fsm.fSM.DetailCode;
-import org.eclipse.etrice.core.fsm.fSM.EntryPoint;
-import org.eclipse.etrice.core.fsm.fSM.ExitPoint;
-import org.eclipse.etrice.core.fsm.fSM.FSMFactory;
-import org.eclipse.etrice.core.fsm.fSM.FSMPackage;
-import org.eclipse.etrice.core.fsm.fSM.GuardedTransition;
-import org.eclipse.etrice.core.fsm.fSM.InitialTransition;
-import org.eclipse.etrice.core.fsm.fSM.MessageFromIf;
-import org.eclipse.etrice.core.fsm.fSM.ModelComponent;
-import org.eclipse.etrice.core.fsm.fSM.NonInitialTransition;
-import org.eclipse.etrice.core.fsm.fSM.RefinedState;
-import org.eclipse.etrice.core.fsm.fSM.RefinedTransition;
-import org.eclipse.etrice.core.fsm.fSM.State;
-import org.eclipse.etrice.core.fsm.fSM.StateGraph;
-import org.eclipse.etrice.core.fsm.fSM.StateGraphItem;
-import org.eclipse.etrice.core.fsm.fSM.StateGraphNode;
-import org.eclipse.etrice.core.fsm.fSM.StateTerminal;
-import org.eclipse.etrice.core.fsm.fSM.TrPoint;
-import org.eclipse.etrice.core.fsm.fSM.TrPointTerminal;
-import org.eclipse.etrice.core.fsm.fSM.Transition;
-import org.eclipse.etrice.core.fsm.fSM.TransitionPoint;
-import org.eclipse.etrice.core.fsm.fSM.Trigger;
-import org.eclipse.etrice.core.fsm.fSM.TriggeredTransition;
-import org.eclipse.etrice.core.fsm.naming.FSMNameProvider;
-import org.eclipse.etrice.core.fsm.util.FSMHelpers;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenFactory;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.IDiagnostician;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.TransitionChain;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Expanded Actor Class</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ExpandedModelComponentImpl#getModelComponent <em>Model Component</em>}</li>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ExpandedModelComponentImpl#getStateMachine <em>State Machine</em>}</li>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ExpandedModelComponentImpl#getTransitionChains <em>Transition Chains</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ExpandedModelComponentImpl extends MinimalEObjectImpl.Container implements ExpandedModelComponent {
-
- /**
- * The cached value of the '{@link #getModelComponent() <em>Model Component</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getModelComponent()
- * @generated
- * @ordered
- */
- protected ModelComponent modelComponent;
-
- private static class NodeData {
- private LinkedList<Transition> inTrans = new LinkedList<Transition>();
- private LinkedList<Transition> outTrans = new LinkedList<Transition>();
- private LinkedList<Transition> loopTrans = null;
-
- LinkedList<Transition> getInTrans() {
- return inTrans;
- }
-
- LinkedList<Transition> getOutTrans() {
- return outTrans;
- }
-
- LinkedList<Transition> getLoopTransitions() {
- if (loopTrans==null) {
- loopTrans = new LinkedList<Transition>();
- for (Transition t : getOutTrans()) {
- // outgoing transitions always are NonInitialTransitions
- NonInitialTransition tr = (NonInitialTransition) t;
-
- if (tr.getFrom() instanceof StateTerminal) {
- if (tr.getTo() instanceof StateTerminal) {
- if (((StateTerminal)tr.getFrom()).getState() == ((StateTerminal)tr.getTo()).getState())
- loopTrans.add(tr);
- }
- }
- else if (tr.getFrom() instanceof TrPointTerminal) {
- if (tr.getTo() instanceof TrPointTerminal) {
- if (((TrPointTerminal)tr.getFrom()).getTrPoint() == ((TrPointTerminal)tr.getTo()).getTrPoint())
- loopTrans.add(tr);
- }
- }
- }
- }
- return loopTrans;
- }
- }
-
- /**
- * transition chains may merge in a choice point or in an entry or exit point.
- * We call all merged transition chains a transition chain bundle
- *
- */
- protected static class TransitionChainBundle {
- private BasicEList<TransitionChain> chains = new BasicEList<TransitionChain>();
- private EObject commonData = null;
- }
-
- protected class TransitionToChainBundleMap extends HashMap<Transition, TransitionChainBundle> {
- private static final long serialVersionUID = 1L;
-
- void put(Transition t, TransitionChain tc) {
- TransitionChainBundle tcb = get(t);
- if (tcb==null) {
- tcb = new TransitionChainBundle();
- put(t, tcb);
- }
- tcb.chains.add(tc);
- }
-
- /* (non-Javadoc)
- * @see java.util.AbstractMap#toString()
- */
-// @Override
-// public String toString() {
-// StringBuffer result = new StringBuffer();
-// for (java.util.Map.Entry<Transition, TransitionChainBundle> entry : entrySet()) {
-// result.append("transition "+fsmNameProvider.getFullPath(entry.getKey())+":\n");
-// TransitionChainBundle bundle = entry.getValue();
-// for (TransitionChain tc : bundle.chains) {
-// String data = tc.getData()!=null? " with data "+tc.getData().getRefType().getType().getName() : "";
-// result.append(" chain starting at "+fsmNameProvider.getFullPath(tc.getTransition())+data+"\n");
-// }
-// String data = bundle.commonData!=null? bundle.commonData.getRefType().getType().getName() : "-";
-// result.append(" bundle data "+data+"\n");
-// }
-// return result.toString();
-// }
- }
-
- /**
- * The cached value of the '{@link #getStateMachine() <em>State Machine</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getStateMachine()
- * @generated
- * @ordered
- */
- protected StateGraph stateMachine;
-
- /**
- * The cached value of the '{@link #getTransitionChains() <em>Transition Chains</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTransitionChains()
- * @generated
- * @ordered
- */
- protected EList<TransitionChain> transitionChains;
-
- private static final String TRIGGER_SEP = "#";
-
- private IDiagnostician validator;
-
- private boolean prepared = false;
- private HashSet<StateGraphItem> ownObjects = null;
- private HashSet<Transition> targetsOfRefinedTransitions = null;
- private HashSet<Transition> baseTransitionHasDetailCode = null;
- private HashMap<AbstractInterfaceItem, Integer> ifitem2localId = null;
- private HashMap<StateGraphNode, NodeData> node2data = null;
- private HashMap<State, LinkedList<ActiveTrigger>> state2triggers = null;
- private HashMap<String, MessageFromIf> triggerstring2mif = null;
- private TransitionToChainBundleMap trans2chainBundle = null;
- private HashMap<EObject, EObject> copy2orig = null;
- private HashMap<EObject, EObject> orig2copy = null;
-
- private FSMHelpers fsmHelpers = new FSMHelpers();
- protected FSMNameProvider fsmNameProvider = new FSMNameProvider();
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ExpandedModelComponentImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return FsmGenPackage.Literals.EXPANDED_MODEL_COMPONENT;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ModelComponent getModelComponent() {
- if (modelComponent != null && modelComponent.eIsProxy()) {
- InternalEObject oldModelComponent = (InternalEObject)modelComponent;
- modelComponent = (ModelComponent)eResolveProxy(oldModelComponent);
- if (modelComponent != oldModelComponent) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmGenPackage.EXPANDED_MODEL_COMPONENT__MODEL_COMPONENT, oldModelComponent, modelComponent));
- }
- }
- return modelComponent;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ModelComponent basicGetModelComponent() {
- return modelComponent;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setModelComponent(ModelComponent newModelComponent) {
- ModelComponent oldModelComponent = modelComponent;
- modelComponent = newModelComponent;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.EXPANDED_MODEL_COMPONENT__MODEL_COMPONENT, oldModelComponent, modelComponent));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public StateGraph getStateMachine() {
- return stateMachine;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetStateMachine(StateGraph newStateMachine, NotificationChain msgs) {
- StateGraph oldStateMachine = stateMachine;
- stateMachine = newStateMachine;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FsmGenPackage.EXPANDED_MODEL_COMPONENT__STATE_MACHINE, oldStateMachine, newStateMachine);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setStateMachine(StateGraph newStateMachine) {
- if (newStateMachine != stateMachine) {
- NotificationChain msgs = null;
- if (stateMachine != null)
- msgs = ((InternalEObject)stateMachine).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FsmGenPackage.EXPANDED_MODEL_COMPONENT__STATE_MACHINE, null, msgs);
- if (newStateMachine != null)
- msgs = ((InternalEObject)newStateMachine).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FsmGenPackage.EXPANDED_MODEL_COMPONENT__STATE_MACHINE, null, msgs);
- msgs = basicSetStateMachine(newStateMachine, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.EXPANDED_MODEL_COMPONENT__STATE_MACHINE, newStateMachine, newStateMachine));
- }
-
- protected void validationError(String msg, EObject obj, EStructuralFeature feature) {
- validationError(msg, obj, feature, IDiagnostician.INSIGNIFICANT_INDEX);
- }
-
- protected void validationError(String msg, EObject obj, EStructuralFeature feature, int idx) {
-// assert obj.eResource() != null : "val error in artificial model object";
- if (obj.eResource()==null) {
- obj = copy2orig.get(obj);
- }
- validator.error(msg, obj, feature, idx);
- }
-
- private void buildStateGraph() {
- // create a list of state machines, derived first, base last
- ArrayList<StateGraph> stateMachines = new ArrayList<StateGraph>();
- ModelComponent orig = getModelComponent();
- if (orig.getStateMachine()!=null)
- stateMachines.add(orig.getStateMachine());
- while (orig.getBase()!=null) {
- orig = orig.getBase();
- if (orig.getStateMachine()!=null)
- stateMachines.add(orig.getStateMachine());
- }
-
- Collection<StateGraph> copiedStateMachines = createCopyOfStateMachines(stateMachines);
-
- collectContentsInNewStateMachine(copiedStateMachines);
-
- introduceExpandedRefinedStates(getStateMachine());
- }
-
- private void collectContentsInNewStateMachine(Collection<StateGraph> copiedStateMachines) {
- // move all state machine contents to our state machine (which we create newly)
- StateGraph myStateMachine = FSMFactory.eINSTANCE.createStateGraph();
- setStateMachine(myStateMachine);
-
- HashMap<Transition, DetailCode> trans2refinedAction = new HashMap<Transition, DetailCode>();
- for (StateGraph copiedStateMachine : copiedStateMachines) {
- myStateMachine.getChPoints().addAll(copiedStateMachine.getChPoints());
- myStateMachine.getStates().addAll(copiedStateMachine.getStates());
- myStateMachine.getTrPoints().addAll(copiedStateMachine.getTrPoints());
- myStateMachine.getTransitions().addAll(copiedStateMachine.getTransitions());
-
- // collect the refined action code in a hash map
- for (RefinedTransition rt : copiedStateMachine.getRefinedTransitions()) {
- if (rt.getAction()==null || rt.getAction().getLines().isEmpty())
- continue;
-
- DetailCode code = trans2refinedAction.get(rt.getTarget());
- if (code==null) {
- code = FSMFactory.eINSTANCE.createDetailCode();
- trans2refinedAction.put(rt.getTarget(), code);
- }
-
- code.getLines().addAll(0, rt.getAction().getLines());
- code.setUsed(fsmHelpers.hasDetailCode(code));
- }
- }
-
- // for refined transitions we just append the action code to the target
- // we can do this since the target is a copy just for this class
- for (Entry<Transition, DetailCode> entry : trans2refinedAction.entrySet()) {
- ownObjects.add(entry.getKey());
- targetsOfRefinedTransitions.add(entry.getKey());
- if (entry.getKey().getAction()==null) {
- entry.getKey().setAction(entry.getValue());
- }
- else {
- baseTransitionHasDetailCode.add(entry.getKey());
- entry.getKey().getAction().getLines().addAll(entry.getValue().getLines());
- }
- }
- }
-
- private Collection<StateGraph> createCopyOfStateMachines(List<StateGraph> origStateMachines) {
- // create a self contained copy of all actor classes
- // references to interface items (ports, saps and spps) point to contents of the original actor class
- // Collection<StateGraph> all = EcoreUtil.copyAll(sms);
- // we use the copier directly since we need access to the map
- Copier copier = new Copier();
- Collection<StateGraph> copiedStateMachines = copier.copyAll(origStateMachines);
- copier.copyReferences();
- for (EObject o : copier.keySet()) {
- EObject c = copier.get(o);
- copy2orig.put(c, o);
- orig2copy.put(o, c);
- }
-
- if (getModelComponent().getStateMachine()!=null) {
- // first state machine is ours
- StateGraph self = copiedStateMachines.iterator().next();
-
- // flag own objects
- TreeIterator<EObject> it = self.eAllContents();
- while (it.hasNext()) {
- EObject obj = it.next();
- if (obj instanceof StateGraphItem)
- addOwnObject((StateGraphItem)obj);
- }
- }
- return copiedStateMachines;
- }
-
- /**
- * replace refined state with a ExpandedRefinedState but as replacement of the ultimate SimpleState
- * the refined state is targeting
- *
- * @param sg - the current context (will be called recursively)
- */
- private void introduceExpandedRefinedStates(StateGraph sg) {
- // need to make a copy of the list because we will modify the original list
- ArrayList<State> states = new ArrayList<State>(sg.getStates());
- for (State s : states) {
- if (s instanceof RefinedState) {
- RefinedState rs = (RefinedState) s;
-
- ExpandedRefinedState state = FsmGenFactory.eINSTANCE.createExpandedRefinedState();
- state.init(rs);
- copy2orig.put(state, getOrig(rs));
- orig2copy.put(getOrig(rs), state);
- if (isOwnObject(rs))
- addOwnObject(state);
- }
- }
-
- // recurse down into sub graph
- for (State s : sg.getStates()) {
- if (s.getSubgraph()!=null)
- introduceExpandedRefinedStates(s.getSubgraph());
- }
- }
-
- private void addOutgoingTransition(StateGraphNode node, Transition t) {
- NodeData data = node2data.get(node);
- if (data==null) {
- data = new NodeData();
- node2data.put(node, data);
- }
- data.getOutTrans().add(t);
- }
-
- private void addIncomingTransition(StateGraphNode node, Transition t) {
- NodeData data = node2data.get(node);
- if (data==null) {
- data = new NodeData();
- node2data.put(node, data);
- }
- data.getInTrans().add(t);
- }
-
- private void findOutgoingTransitions(StateGraph sg) {
- // depth first: recurse into sub graphs of states
- for (State s : sg.getStates()) {
- if (s.getSubgraph()!=null)
- findOutgoingTransitions(s.getSubgraph());
- }
-
- for (Transition t : sg.getTransitions()) {
- addIncomingTransition(getAdjustedTargetNode(t), t);
- if (t instanceof NonInitialTransition) {
- addOutgoingTransition(fsmHelpers.getNode(((NonInitialTransition)t).getFrom()), t);
- }
- }
- }
-
- /**
- * @param sg
- */
- private void checkTransitionChains(StateGraph sg) {
- for (Transition t : sg.getTransitions()) {
- TransitionChain chain = getChain(t);
- if (chain==null)
- if (!getModelComponent().isAbstract()) {
- int idx = sg.getTransitions().indexOf(t);
- Transition orig = (Transition) copy2orig.get(t);
- String name = fsmNameProvider.getName(orig);
- validator.error("transition '"+name+"' is not part of a transition chain (only allowed for abstract actor classes)", orig.eContainer(), FSMPackage.eINSTANCE.getStateGraph_Transitions(), idx);
- }
- }
-
- // recursion
- for (State s : sg.getStates()) {
- if (s.getSubgraph()!=null)
- checkTransitionChains(s.getSubgraph());
- }
- }
-
- private void doChecks(StateGraph sg) {
-
- // check if empty
- if (sg.getTransitions().isEmpty() && sg.getStates().isEmpty()
- && sg.getChPoints().isEmpty() && sg.getTrPoints().isEmpty())
- return;
-
- int initCount = 0;
- for (Transition t : sg.getTransitions()) {
- if (t instanceof InitialTransition)
- ++initCount;
- }
- if (initCount==0) {
- if (sg.eContainer() instanceof State) {
- if (!getModelComponent().isAbstract()) {
- // having no initial transition in a nested state is valid only if there is no transition to history
- // except of self transitions
- // i.e. no incoming transition of the state itself
- NodeData data = node2data.get((State)sg.eContainer());
- if (data!=null && data.getLoopTransitions().size()!=data.getInTrans().size())
- validationError(getModelComponentName()+": Having no initial transition in a nested state is valid only if there is no transition to history except of self transitions!",
- sg.eContainer(), FSMPackage.eINSTANCE.getState_Subgraph());
- }
- }
- else {
- validationError(getModelComponentName()+": The TOP level has to have an initial transition!", getModelComponent().getStateMachine(), FSMPackage.eINSTANCE.getStateGraph_Transitions());
- }
- }
- else {
- if (initCount>1)
- validationError(getModelComponentName()+": There has to be exactly one initial transition!", getModelComponent().getStateMachine(), FSMPackage.eINSTANCE.getStateGraph_Transitions());
- }
-
- for (ChoicePoint cp : sg.getChPoints()) {
- NodeData data = node2data.get(cp);
-
- ChoicePoint orig = (ChoicePoint) copy2orig.get(cp);
- StateGraph origContainer = (StateGraph) orig.eContainer();
- int idx = origContainer.getChPoints().indexOf(orig);
-
- if (data==null) {
- validationError(getModelComponentName()+": ChoicePoint is not connected!", origContainer, FSMPackage.eINSTANCE.getStateGraph_ChPoints(), idx);
- }
- else {
- // several incoming transitions possible, see bug 340496
-// if (data.getInTrans().size()!=1)
-// validationError(getModelComponentName()+": ChoicePoint has "+data.getInTrans().size()+" incoming transitions!", sg, FSMPackage.eINSTANCE.getStateGraph_ChPoints(), idx);
- if (data.getOutTrans().size()<2)
- validationError(getModelComponentName()+": ChoicePoint should have 2 or more branches but has "+data.getOutTrans().size(), origContainer, FSMPackage.eINSTANCE.getStateGraph_ChPoints(), idx);
- if (getDefaultBranch(data.getOutTrans())==null)
- validationError(getModelComponentName()+": ChoicePoint has no default branch!", origContainer, FSMPackage.eINSTANCE.getStateGraph_ChPoints(), idx);
- if (!data.getLoopTransitions().isEmpty())
- validationError(getModelComponentName()+": ChoicePoint is connected to itself!", origContainer, FSMPackage.eINSTANCE.getStateGraph_ChPoints(), idx);
- }
- }
-
- for (TrPoint tp : sg.getTrPoints()) {
- NodeData data = node2data.get(tp);
-
- TrPoint orig = (TrPoint) copy2orig.get(tp);
- StateGraph origContainer = (StateGraph) orig.eContainer();
- int idx = origContainer.getTrPoints().indexOf(orig);
-
- if (data==null) {
- if (!getModelComponent(tp).isAbstract())
- validationError(getModelComponentName()+": TrPoint "+fsmNameProvider.getFullPath(tp)+" is not connected", origContainer, FSMPackage.eINSTANCE.getStateGraph_TrPoints(), idx);
- }
- else {
- if ((tp instanceof EntryPoint)||(tp instanceof ExitPoint)) {
- // non-abstract classes must have incoming transitions for entry and exit points
- if (!getModelComponent().isAbstract() && data.getInTrans().isEmpty())
- validationError(getModelComponentName()+": TrPoint "+fsmNameProvider.getFullPath(tp)+" has no incoming transition!", origContainer, FSMPackage.eINSTANCE.getStateGraph_TrPoints(), idx);
-
- if (getModelComponent(tp).isAbstract()) {
- // transition points inherited from abstract base classes
- // (of from abstract classes themselves) must not have more than one outgoing transition
- if (data.getOutTrans().size()>1)
- validationError(getModelComponentName()+": TrPoint "+fsmNameProvider.getFullPath(tp)+" must have at most one outgoing transition!", origContainer, FSMPackage.eINSTANCE.getStateGraph_TrPoints(), idx);
- }
- else {
- // non-abstract or non-inherited transition points must have one outgoing transition
- if (data.getOutTrans().size()!=1)
- validationError(getModelComponentName()+": TrPoint "+fsmNameProvider.getFullPath(tp)+" must have exactly one outgoing transition!", origContainer, FSMPackage.eINSTANCE.getStateGraph_TrPoints(), idx);
- }
-
- if (!data.getLoopTransitions().isEmpty())
- validationError(getModelComponentName()+": TrPoint "+fsmNameProvider.getFullPath(tp)+" must have no self transitions!", origContainer, FSMPackage.eINSTANCE.getStateGraph_TrPoints(), idx);
- }
- else if (tp instanceof TransitionPoint) {
- if (data.getOutTrans().size()<data.getLoopTransitions().size())
- validationError(getModelComponentName()+": TrPoint "+fsmNameProvider.getFullPath(tp)+" must have no incoming transitions!", origContainer, FSMPackage.eINSTANCE.getStateGraph_TrPoints(), idx);
- }
- }
- }
-
- // recurse into sub graphs of states
- for (State s : sg.getStates()) {
- if (s.getSubgraph()!=null)
- doChecks(s.getSubgraph());
- }
- }
-
- private void findTriggersOfState(State s) {
- LinkedList<ActiveTrigger> triggers = new LinkedList<ActiveTrigger>();
- HashMap<String, ActiveTrigger> caughtTriggers = new HashMap<String, ActiveTrigger>();
- collectTriggersAndTransitions(s, caughtTriggers, triggers);
- state2triggers.put(s, triggers);
- }
-
- private String getTriggerString(MessageFromIf mifp) {
- assert(mifp.getFrom().getName()!=null) : "ifitem name must not be null";
- assert(fsmNameProvider.getMessageName(mifp.getMessage())!=null) : "message name must not be null";
- return mifp.getFrom().getName()+TRIGGER_SEP+fsmNameProvider.getMessageName(mifp.getMessage());
- }
-
- private void collectOutgoingTransitions(EList<Transition> sameLevelTransitions,
- HashMap<String, ActiveTrigger> caughtTriggers,
- LinkedList<ActiveTrigger> triggers) {
- for (Transition t : sameLevelTransitions) {
- if (t instanceof TriggeredTransition) {
- TriggeredTransition tt = (TriggeredTransition) t;
-
- for (Trigger trig : ((TriggeredTransition)t).getTriggers()) {
- for (MessageFromIf mifp : trig.getMsgFromIfPairs()) {
- String tr = getTriggerString(mifp);
- ActiveTrigger at = caughtTriggers.get(tr);
- /*
- * accept new trigger if
- *
- * - no inner or inner with guard
- * - accept several but only one without guard (count),
- * insert those with guard first in the list of the _same_ level(!)
- */
- if (at==null) {
- // no inner transition with this trigger exists,
- // so this is a new trigger (and our unique point of ActiveTrigger creation)
- at = FsmGenFactory.eINSTANCE.createActiveTrigger();
- at.setMsg(mifp.getMessage());
- at.setIfitem(mifp.getFrom());
- at.setTrigger(tr);
- at.getTransitions().add(tt);
- caughtTriggers.put(tr, at);
- triggers.add(at);
- }
- else {
- // check guards of previous transitions
- TriggeredTransition unguarded = null;
- boolean accepted = true;
- for (TriggeredTransition t2 : at.getTransitions()) {
- for (Trigger trig2 : t2.getTriggers()) {
- if (isMatching(trig2, tr)) {
- if (!fsmHelpers.isGuarded(trig2)) {
- unguarded = t2;
- if (!sameLevelTransitions.contains(t2))
- accepted = false;
- }
- }
- }
- }
- if (accepted) {
- if (unguarded!=null) {
- // there already is an unguarded transition: require a quard
- if (!fsmHelpers.isGuarded(trig)) {
- validationError("Transitions with same trigger on same level have to be guarded!", t, FSMPackage.eINSTANCE.getTriggeredTransition_Triggers());
- }
- else {
- int idx = at.getTransitions().indexOf(unguarded);
- at.getTransitions().add(idx, tt);
- }
- }
- else {
- // just add at the end
- at.getTransitions().add(tt);
- }
- }
- // else: this trigger is already satisfied - nevertheless this is a valid situation
- }
- }
- }
- }
- }
- }
-
- private void collectTriggersAndTransitions(State s,
- HashMap<String, ActiveTrigger> caughtTriggers,
- LinkedList<ActiveTrigger> triggers) {
- // consider outgoing transitions of this state
- collectOutgoingTransitions(getOutgoingTransitions(s), caughtTriggers, triggers);
-
- // consider TransitionPoint transitions
- if (s.eContainer() instanceof StateGraph) {
- StateGraph sg = (StateGraph) s.eContainer();
- BasicEList<Transition> trpTransitions = new BasicEList<Transition>();
- for (TrPoint tp : sg.getTrPoints()) {
- trpTransitions.addAll(getOutgoingTransitions(tp));
- }
- collectOutgoingTransitions(trpTransitions, caughtTriggers, triggers);
-
- // go to surrounding context
- if (sg.eContainer() instanceof State) {
- collectTriggersAndTransitions((State) sg.eContainer(), caughtTriggers, triggers);
- }
- }
- else {
- // this should never happen
- assert(false): "A State must always reside in a StateGraph!";
- }
- }
-
- private void findLeafStateTriggers(StateGraph sg) {
- for (State s : sg.getStates()) {
- if (s.getSubgraph()!=null)
- findLeafStateTriggers(s.getSubgraph());
- else
- findTriggersOfState(s);
- }
- }
-
- private void fillTriggerStringMap() {
- // improve performance using maps name2ifitem and name2msgs
- HashMap<String, AbstractInterfaceItem> name2ifitem = new HashMap<String, AbstractInterfaceItem>();
- HashMap<String, List<EObject>> name2msgs = new HashMap<String, List<EObject>>();
- List<AbstractInterfaceItem> items = getAllInterfaceItems();
- for (AbstractInterfaceItem item : items) {
- name2ifitem.put(item.getName(), item);
- name2msgs.put(item.getName(), getIncomingMessages(item));
- }
-
- // compute a set of all trigger strings
- HashSet<String> triggers = new HashSet<String>();
- for (LinkedList<ActiveTrigger> ttlist : state2triggers.values()) {
- for (ActiveTrigger tt : ttlist) {
- triggers.add(tt.getTrigger());
- }
- }
-
- // now fill triggerstring2mif
- for (String trig : triggers) {
- String[] parts = trig.split(TRIGGER_SEP);
-
- // this should always hold true
- assert(parts.length==2): "By our convention triggers are composed of two parts separated by "
- +TRIGGER_SEP+". Here we have '"+trig+"' which doesn't consist of two parts!";
-
- AbstractInterfaceItem ii = name2ifitem.get(parts[0]);
-
- // this should always hold true
- assert(ii!=null): "The name '"+parts[0]+"' did not match an interface item (in name2ifitem)!";
-
- List<EObject> msgs = name2msgs.get(parts[0]);
-
- // this should always hold true
- assert(msgs!=null): "The name '"+parts[0]+"' did not match an interface item (in name2msgs)!";
-
- EObject msg = null;
- for (EObject m : msgs) {
- if (fsmNameProvider.getMessageName(m).equals(parts[1]))
- msg = m;
- }
-
- // this should always hold true
- assert(msg!=null): "The message '"+parts[1]+"' did not match a message!";
-
- MessageFromIf mif = FSMFactory.eINSTANCE.createMessageFromIf();
- mif.setFrom(ii);
- mif.setMessage(msg);
- triggerstring2mif.put(trig, mif);
- }
- }
-
- private void collectChainTransitions(TransitionChain tc, Transition t) {
- trans2chainBundle.put(t, tc);
-
- StateGraphNode node = fsmHelpers.getNode(t.getTo());
-
- // the chain ends if a state is reached
- if (node instanceof State)
- return;
-
- // the chain ends if source and destination coincide
- if (tc.getTransition() instanceof NonInitialTransition && node==fsmHelpers.getNode(((NonInitialTransition)tc.getTransition()).getFrom()))
- return;
-
- for (Transition next : getOutgoingTransitions(node)) {
- // from the second transition in the chain on we have:
- if (next instanceof TriggeredTransition) {
- TriggeredTransition orig = (TriggeredTransition)copy2orig.get(next);
- StateGraph origContainer = (StateGraph) orig.eContainer();
- int idx = origContainer.getTransitions().indexOf(orig);
- validationError("Segments following the triggering transition can have no triggers!\n", origContainer, FSMPackage.eINSTANCE.getStateGraph_Transitions(), idx);
- }
-
- collectChainTransitions(tc, next);
- }
- }
-
- private void findTransitionChains(StateGraph sg, Class<?> cls) {
- findTransitionChains(sg, cls, true);
- }
-
- private void findTransitionChains(StateGraph sg, Class<?> cls, boolean includeInitial) {
- for (Transition t : sg.getTransitions()) {
- if (cls.isInstance(t) || (includeInitial && (t instanceof InitialTransition))) {
- addTransitionChain(t);
- }
- }
-
- // recurse into sub graphs of states
- for (State s : sg.getStates()) {
- if (s.getSubgraph()!=null)
- findTransitionChains(s.getSubgraph(), cls, includeInitial);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public void prepare(IDiagnostician validator) {
- if (prepared)
- return;
-
- prepared = true;
-
- this.validator = validator;
-
- ifitem2localId = new HashMap<AbstractInterfaceItem, Integer>();
- ownObjects = new HashSet<StateGraphItem>();
- targetsOfRefinedTransitions = new HashSet<Transition>();
- baseTransitionHasDetailCode = new HashSet<Transition>();
- node2data = new HashMap<StateGraphNode, NodeData>();
- state2triggers = new HashMap<State, LinkedList<ActiveTrigger>>();
- triggerstring2mif = new HashMap<String, MessageFromIf>();
- trans2chainBundle = new TransitionToChainBundleMap();
- copy2orig = new HashMap<EObject, EObject>();
- orig2copy = new HashMap<EObject, EObject>();
-
- buildStateGraph();
- computeInterfaceItemLocalIds(getModelComponent(), 0);
- findOutgoingTransitions(getStateMachine());
-
- doChecks(getStateMachine());
- if (validator.isFailed())
- return;
-
- if (getModelComponent().getCommType()==ComponentCommunicationType.DATA_DRIVEN) {
- findTransitionChains(getStateMachine(), GuardedTransition.class);
- }
- else if (getModelComponent().getCommType()==ComponentCommunicationType.ASYNCHRONOUS) {
- findLeafStateTriggers(getStateMachine());
- fillTriggerStringMap();
- findTransitionChains(getStateMachine(), TriggeredTransition.class);
- computeCommonChainData();
- findTransitionChains(getStateMachine(), GuardedTransition.class, false);
- checkTransitionChains(getStateMachine());
- }
- else {
- // event driven state machine
- findLeafStateTriggers(getStateMachine());
- fillTriggerStringMap();
- findTransitionChains(getStateMachine(), TriggeredTransition.class);
- computeCommonChainData();
- checkTransitionChains(getStateMachine());
- }
- }
-
- /**
- *
- */
- private void computeCommonChainData() {
- for (TransitionChainBundle tcb : trans2chainBundle.values()) {
- tcb.commonData = computeCommonChainData(tcb.chains);
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public void release() {
- if (!prepared)
- return;
-
- prepared = false;
-
- // release resources
- ifitem2localId = null;
- ownObjects = null;
- node2data = null;
- state2triggers = null;
- triggerstring2mif = null;
- trans2chainBundle = null;
- copy2orig = null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public void addOwnObject(StateGraphItem obj) {
- ownObjects.add(obj);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public boolean isOwnObject(StateGraphItem obj) {
- return ownObjects.contains(obj);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public boolean hasBaseTransitionDetailCode(Transition trans) {
- return baseTransitionHasDetailCode.contains(trans);
- }
-
- private int computeInterfaceItemLocalIds(ModelComponent mc, int offset) {
- if (mc.getBase()!=null) {
- // first recurse into base class
- offset = computeInterfaceItemLocalIds(mc.getBase(), offset);
- }
-
- EList<AbstractInterfaceItem> items = getOwnInterfaceItems(mc);
- for (AbstractInterfaceItem item : items) {
- ifitem2localId.put(item, offset);
- ++offset;
- }
-
- return offset;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public int getInterfaceItemLocalId(AbstractInterfaceItem ifitem) {
- Integer localId = ifitem2localId.get(ifitem);
- if (localId!=null)
- return localId.intValue();
- else
- return -1;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return
- * @generated NOT
- */
- public EObject computeCommonChainData(EList<TransitionChain> chains) {
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public boolean hasStateMachine() {
- ModelComponent mc = getModelComponent();
- while (mc!=null) {
- if (mc.getStateMachine()!=null)
- return true;
- mc = mc.getBase();
- }
- return false;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public String getTriggerCodeName(MessageFromIf mif) {
- return "TRIG_"+mif.getFrom().getName()+"__"+fsmNameProvider.getMessageName(mif.getMessage());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public String getTriggerCodeName(ActiveTrigger at) {
- String[] parts = at.getTrigger().split(TRIGGER_SEP);
- return "TRIG_"+parts[0]+"__"+parts[1];
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public EList<Transition> getOutgoingTransitions(StateGraphNode node) {
- NodeData data = node2data.get(node);
- if (data==null)
- return new BasicEList<Transition>();
- else
- return new BasicEList<Transition>(data.getOutTrans());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public EList<Transition> getIncomingTransitions(StateGraphNode node) {
- NodeData data = node2data.get(node);
- if (data==null)
- return new BasicEList<Transition>();
- else
- return new BasicEList<Transition>(data.getInTrans());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public EList<ActiveTrigger> getActiveTriggers(State state) {
- LinkedList<ActiveTrigger> triggers = state2triggers.get(state);
- if (triggers==null)
- return new BasicEList<ActiveTrigger>();
- else
- return new BasicEList<ActiveTrigger>(triggers);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public EList<MessageFromIf> getTriggers() {
- return new BasicEList<MessageFromIf>(triggerstring2mif.values());
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public EList<MessageFromIf> getOwnTriggers() {
- BasicEList<MessageFromIf> result = new BasicEList<MessageFromIf>();
-
- EList<AbstractInterfaceItem> ownIfItems = getOwnInterfaceItems(getModelComponent());
-
- for(MessageFromIf mif : triggerstring2mif.values()) {
- if (ownIfItems.contains(mif.getFrom()))
- result.add(mif);
- }
-
- Collections.sort(result, new Comparator<MessageFromIf>() {
-
- @Override
- public int compare(MessageFromIf o1, MessageFromIf o2) {
- return getTriggerCodeName(o1).compareTo(getTriggerCodeName(o2));
- }
-
-
- });
-
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public String getMessageID(MessageFromIf mif) {
- // to be implemented by derived class
- throw new UnsupportedOperationException();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public TransitionChain getChain(Transition trans) {
- if (trans==null)
- return null;
-
- TransitionChainBundle tcb = trans2chainBundle.get(trans);
- if (tcb==null || tcb.chains.isEmpty())
- return null;
-
- return tcb.chains.get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public EList<TransitionChain> getChains(Transition trans) {
- TransitionChainBundle tcb = trans2chainBundle.get(trans);
- if(tcb == null)
- new BasicEList<TransitionChain>();
-
- return tcb.chains;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public EObject getData(Transition trans) {
- if (trans==null)
- return null;
-
- TransitionChainBundle tcb = trans2chainBundle.get(trans);
- if (tcb==null || tcb.chains.isEmpty())
- return null;
-
- if (tcb.chains.size()==1)
- return tcb.chains.get(0).getData();
-
- return tcb.commonData;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public EList<EObject> getIncomingMessages(AbstractInterfaceItem ifitem) {
- return ifitem.getAllIncomingAbstractMessages();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public TransitionChain addTransitionChain(Transition t) {
- TransitionChain tc = FsmGenFactory.eINSTANCE.createTransitionChain();
- tc.setTransition(t);
-
- collectChainTransitions(tc, t);
-
- getTransitionChains().add(tc);
-
- return tc;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<TransitionChain> getTransitionChains() {
- if (transitionChains == null) {
- transitionChains = new EObjectContainmentEList<TransitionChain>(TransitionChain.class, this, FsmGenPackage.EXPANDED_MODEL_COMPONENT__TRANSITION_CHAINS);
- }
- return transitionChains;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public EList<TransitionChain> getOwnTransitionChains() {
- BasicEList<TransitionChain> result = new BasicEList<TransitionChain>();
-
- for (TransitionChain tc : getTransitionChains()) {
- if (!targetsOfRefinedTransitions.contains(tc.getTransition()) && isOwnObject(tc.getTransition()))
- result.add(tc);
- }
-
- Collections.sort(result, new Comparator<TransitionChain>() {
-
- @Override
- public int compare(TransitionChain o1, TransitionChain o2) {
- return fsmNameProvider.getFullPath(o1.getTransition()).compareTo(fsmNameProvider.getFullPath(o2.getTransition()));
- }
-
- });
-
- return result;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public EList<AbstractInterfaceItem> getOwnInterfaceItems(ModelComponent mc) {
- return mc.getAbstractInterfaceItems();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public EList<AbstractInterfaceItem> getAllInterfaceItems() {
- return getModelComponent().getAllAbstractInterfaceItems();
- }
-
- /*
- * In case of an abstract class we can have a transition to an EntryPoint
- * which is not connected inside its state.
- * For the TransitionChain handling during generation we need to replace
- * this terminal with a state terminal as if it where it a transition
- * to history.
- */
- private StateGraphNode getAdjustedTargetNode(Transition t) {
- StateGraphNode node = fsmHelpers.getNode(t.getTo());
- if (node instanceof EntryPoint) {
- if (getModelComponent(node).isAbstract()) {
- NodeData data = node2data.get(node);
- if (data==null || data.getOutTrans().isEmpty()) {
- if (node.eContainer().eContainer() instanceof State) {
- // in this case
- State newTarget = (State) node.eContainer().eContainer();
-
- StateTerminal st = FSMFactory.eINSTANCE.createStateTerminal();
- st.setState(newTarget);
- t.setTo(st);
-
- node = newTarget;
- }
- }
- }
- }
- return node;
- }
-
- private ModelComponent getModelComponent(EObject node) {
- node = copy2orig.get(node);
- while (node!=null) {
- if (node instanceof ModelComponent)
- return (ModelComponent) node;
- node = node.eContainer();
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public boolean isMatching(Trigger trig, String trigstr) {
- for (MessageFromIf mifp2 : trig.getMsgFromIfPairs()) {
- String tr2 = getTriggerString(mifp2);
- if (tr2.equals(trigstr))
- return true;
- }
- return false;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public ContinuationTransition getDefaultBranch(EList<Transition> out) {
- return getDefaultBranch((List<Transition>)out);
- }
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public EObject getOrig(EObject copy) {
- return copy2orig.get(copy);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public EObject getCopy(EObject orig) {
- return orig2copy.get(orig);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public String getModelComponentName() {
- return getModelComponent().getComponentName();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case FsmGenPackage.EXPANDED_MODEL_COMPONENT__STATE_MACHINE:
- return basicSetStateMachine(null, msgs);
- case FsmGenPackage.EXPANDED_MODEL_COMPONENT__TRANSITION_CHAINS:
- return ((InternalEList<?>)getTransitionChains()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- private ContinuationTransition getDefaultBranch(List<Transition> out) {
- for (Transition t : out) {
- if (t instanceof ContinuationTransition)
- return (ContinuationTransition) t;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case FsmGenPackage.EXPANDED_MODEL_COMPONENT__MODEL_COMPONENT:
- if (resolve) return getModelComponent();
- return basicGetModelComponent();
- case FsmGenPackage.EXPANDED_MODEL_COMPONENT__STATE_MACHINE:
- return getStateMachine();
- case FsmGenPackage.EXPANDED_MODEL_COMPONENT__TRANSITION_CHAINS:
- return getTransitionChains();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case FsmGenPackage.EXPANDED_MODEL_COMPONENT__MODEL_COMPONENT:
- setModelComponent((ModelComponent)newValue);
- return;
- case FsmGenPackage.EXPANDED_MODEL_COMPONENT__STATE_MACHINE:
- setStateMachine((StateGraph)newValue);
- return;
- case FsmGenPackage.EXPANDED_MODEL_COMPONENT__TRANSITION_CHAINS:
- getTransitionChains().clear();
- getTransitionChains().addAll((Collection<? extends TransitionChain>)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case FsmGenPackage.EXPANDED_MODEL_COMPONENT__MODEL_COMPONENT:
- setModelComponent((ModelComponent)null);
- return;
- case FsmGenPackage.EXPANDED_MODEL_COMPONENT__STATE_MACHINE:
- setStateMachine((StateGraph)null);
- return;
- case FsmGenPackage.EXPANDED_MODEL_COMPONENT__TRANSITION_CHAINS:
- getTransitionChains().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case FsmGenPackage.EXPANDED_MODEL_COMPONENT__MODEL_COMPONENT:
- return modelComponent != null;
- case FsmGenPackage.EXPANDED_MODEL_COMPONENT__STATE_MACHINE:
- return stateMachine != null;
- case FsmGenPackage.EXPANDED_MODEL_COMPONENT__TRANSITION_CHAINS:
- return transitionChains != null && !transitionChains.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
-} //ExpandedModelComponentImpl
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/ExpandedRefinedStateImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/ExpandedRefinedStateImpl.java
deleted file mode 100644
index 81822600d..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/ExpandedRefinedStateImpl.java
+++ /dev/null
@@ -1,392 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.etrice.core.fsm.fSM.DetailCode;
-import org.eclipse.etrice.core.fsm.fSM.FSMFactory;
-import org.eclipse.etrice.core.fsm.fSM.NonInitialTransition;
-import org.eclipse.etrice.core.fsm.fSM.RefinedState;
-import org.eclipse.etrice.core.fsm.fSM.State;
-import org.eclipse.etrice.core.fsm.fSM.StateGraph;
-import org.eclipse.etrice.core.fsm.fSM.StateTerminal;
-import org.eclipse.etrice.core.fsm.fSM.SubStateTrPointTerminal;
-import org.eclipse.etrice.core.fsm.fSM.Transition;
-import org.eclipse.etrice.core.fsm.fSM.impl.SimpleStateImpl;
-import org.eclipse.etrice.core.fsm.util.FSMHelpers;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Expanded Refined State</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ExpandedRefinedStateImpl#getInheritedEntry <em>Inherited Entry</em>}</li>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ExpandedRefinedStateImpl#getInheritedExit <em>Inherited Exit</em>}</li>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.ExpandedRefinedStateImpl#getInheritedDo <em>Inherited Do</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ExpandedRefinedStateImpl extends SimpleStateImpl implements ExpandedRefinedState {
-
- private FSMHelpers fsmHelpers = new FSMHelpers();
-
- /**
- * The cached value of the '{@link #getInheritedEntry() <em>Inherited Entry</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInheritedEntry()
- * @generated
- * @ordered
- */
- protected DetailCode inheritedEntry;
-
- /**
- * The cached value of the '{@link #getInheritedExit() <em>Inherited Exit</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInheritedExit()
- * @generated
- * @ordered
- */
- protected DetailCode inheritedExit;
-
- /**
- * The cached value of the '{@link #getInheritedDo() <em>Inherited Do</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getInheritedDo()
- * @generated
- * @ordered
- */
- protected DetailCode inheritedDo;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ExpandedRefinedStateImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return FsmGenPackage.Literals.EXPANDED_REFINED_STATE;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DetailCode getInheritedEntry() {
- return inheritedEntry;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetInheritedEntry(DetailCode newInheritedEntry, NotificationChain msgs) {
- DetailCode oldInheritedEntry = inheritedEntry;
- inheritedEntry = newInheritedEntry;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_ENTRY, oldInheritedEntry, newInheritedEntry);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setInheritedEntry(DetailCode newInheritedEntry) {
- if (newInheritedEntry != inheritedEntry) {
- NotificationChain msgs = null;
- if (inheritedEntry != null)
- msgs = ((InternalEObject)inheritedEntry).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_ENTRY, null, msgs);
- if (newInheritedEntry != null)
- msgs = ((InternalEObject)newInheritedEntry).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_ENTRY, null, msgs);
- msgs = basicSetInheritedEntry(newInheritedEntry, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_ENTRY, newInheritedEntry, newInheritedEntry));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DetailCode getInheritedExit() {
- return inheritedExit;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetInheritedExit(DetailCode newInheritedExit, NotificationChain msgs) {
- DetailCode oldInheritedExit = inheritedExit;
- inheritedExit = newInheritedExit;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_EXIT, oldInheritedExit, newInheritedExit);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setInheritedExit(DetailCode newInheritedExit) {
- if (newInheritedExit != inheritedExit) {
- NotificationChain msgs = null;
- if (inheritedExit != null)
- msgs = ((InternalEObject)inheritedExit).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_EXIT, null, msgs);
- if (newInheritedExit != null)
- msgs = ((InternalEObject)newInheritedExit).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_EXIT, null, msgs);
- msgs = basicSetInheritedExit(newInheritedExit, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_EXIT, newInheritedExit, newInheritedExit));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DetailCode getInheritedDo() {
- return inheritedDo;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetInheritedDo(DetailCode newInheritedDo, NotificationChain msgs) {
- DetailCode oldInheritedDo = inheritedDo;
- inheritedDo = newInheritedDo;
- if (eNotificationRequired()) {
- ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_DO, oldInheritedDo, newInheritedDo);
- if (msgs == null) msgs = notification; else msgs.add(notification);
- }
- return msgs;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setInheritedDo(DetailCode newInheritedDo) {
- if (newInheritedDo != inheritedDo) {
- NotificationChain msgs = null;
- if (inheritedDo != null)
- msgs = ((InternalEObject)inheritedDo).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_DO, null, msgs);
- if (newInheritedDo != null)
- msgs = ((InternalEObject)newInheritedDo).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_DO, null, msgs);
- msgs = basicSetInheritedDo(newInheritedDo, msgs);
- if (msgs != null) msgs.dispatch();
- }
- else if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_DO, newInheritedDo, newInheritedDo));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public void init(RefinedState rs) {
- setName(rs.getName());
-
- // the next assignments take over the code and docu and state graph objects from rs
- // but this is a copy and thus does no harm
- setEntryCode(rs.getEntryCode());
- setExitCode(rs.getExitCode());
- setDoCode(rs.getDoCode());
- setDocu(rs.getDocu());
- setSubgraph(rs.getSubgraph());
-
- // now we collect the inherited detail code
- setInheritedEntry(fsmHelpers.getInheritedEntryCode(rs));
- setInheritedExit(fsmHelpers.getInheritedExitCode(rs));
- setInheritedDo(fsmHelpers.getInheritedDoCode(rs));
-
- // remove refined state from its container
- ((StateGraph)rs.eContainer()).getStates().remove(rs);
-
- // put new state in place of SimpleState which is the ultimate target of the refined state
- State bs = fsmHelpers.getBaseState(rs);
- StateGraph parent = (StateGraph) bs.eContainer();
- parent.getStates().add(this);
- parent.getStates().remove(bs);
- for (Transition trans : parent.getTransitions()) {
- if (trans.getTo() instanceof StateTerminal) {
- if (((StateTerminal)trans.getTo()).getState()==bs)
- ((StateTerminal)trans.getTo()).setState(this);
- }
- else if (trans.getTo() instanceof SubStateTrPointTerminal) {
- if (((SubStateTrPointTerminal)trans.getTo()).getState()==bs)
- ((SubStateTrPointTerminal)trans.getTo()).setState(this);
- }
- if (trans instanceof NonInitialTransition) {
- if (((NonInitialTransition)trans).getFrom() instanceof StateTerminal) {
- if (((StateTerminal)((NonInitialTransition)trans).getFrom()).getState()==bs)
- ((StateTerminal)((NonInitialTransition)trans).getFrom()).setState(this);
- }
- else if (((NonInitialTransition)trans).getFrom() instanceof SubStateTrPointTerminal) {
- if (((SubStateTrPointTerminal)((NonInitialTransition)trans).getFrom()).getState()==bs)
- ((SubStateTrPointTerminal)((NonInitialTransition)trans).getFrom()).setState(this);
- }
- }
- }
-
- // move contents of base state to this state
- StateGraph fromSG = bs.getSubgraph();
- if (fromSG!=null) {
- StateGraph toSG = getSubgraph();
- if (toSG==null) {
- toSG = FSMFactory.eINSTANCE.createStateGraph();
- setSubgraph(toSG);
- }
- toSG.getChPoints().addAll(fromSG.getChPoints());
- toSG.getStates().addAll(fromSG.getStates());
- toSG.getTrPoints().addAll(fromSG.getTrPoints());
- toSG.getTransitions().addAll(fromSG.getTransitions());
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_ENTRY:
- return basicSetInheritedEntry(null, msgs);
- case FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_EXIT:
- return basicSetInheritedExit(null, msgs);
- case FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_DO:
- return basicSetInheritedDo(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_ENTRY:
- return getInheritedEntry();
- case FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_EXIT:
- return getInheritedExit();
- case FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_DO:
- return getInheritedDo();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_ENTRY:
- setInheritedEntry((DetailCode)newValue);
- return;
- case FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_EXIT:
- setInheritedExit((DetailCode)newValue);
- return;
- case FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_DO:
- setInheritedDo((DetailCode)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_ENTRY:
- setInheritedEntry((DetailCode)null);
- return;
- case FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_EXIT:
- setInheritedExit((DetailCode)null);
- return;
- case FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_DO:
- setInheritedDo((DetailCode)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_ENTRY:
- return inheritedEntry != null;
- case FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_EXIT:
- return inheritedExit != null;
- case FsmGenPackage.EXPANDED_REFINED_STATE__INHERITED_DO:
- return inheritedDo != null;
- }
- return super.eIsSet(featureID);
- }
-
-} //ExpandedRefinedStateImpl
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java
deleted file mode 100644
index aea4fb0bd..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/FsmGenPackageImpl.java
+++ /dev/null
@@ -1,509 +0,0 @@
-/**
- * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- *
- */
-package org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EOperation;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-import org.eclipse.etrice.core.fsm.fSM.FSMPackage;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedRefinedState;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenFactory;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.TransitionChain;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class FsmGenPackageImpl extends EPackageImpl implements FsmGenPackage {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass activeTriggerEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass expandedModelComponentEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass expandedRefinedStateEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass iDiagnosticianEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass iTransitionChainVisitorEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass transitionChainEClass = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private FsmGenPackageImpl() {
- super(eNS_URI, FsmGenFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
- * <p>This method is used to initialize {@link FsmGenPackage#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static FsmGenPackage init() {
- if (isInited) return (FsmGenPackage)EPackage.Registry.INSTANCE.getEPackage(FsmGenPackage.eNS_URI);
-
- // Obtain or create and register package
- FsmGenPackageImpl theFsmGenPackage = (FsmGenPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FsmGenPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FsmGenPackageImpl());
-
- isInited = true;
-
- // Initialize simple dependencies
- FSMPackage.eINSTANCE.eClass();
-
- // Create package meta-data objects
- theFsmGenPackage.createPackageContents();
-
- // Initialize created meta-data
- theFsmGenPackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theFsmGenPackage.freeze();
-
-
- // Update the registry and return the package
- EPackage.Registry.INSTANCE.put(FsmGenPackage.eNS_URI, theFsmGenPackage);
- return theFsmGenPackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getActiveTrigger() {
- return activeTriggerEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getActiveTrigger_Msg() {
- return (EReference)activeTriggerEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getActiveTrigger_Ifitem() {
- return (EReference)activeTriggerEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getActiveTrigger_Trigger() {
- return (EAttribute)activeTriggerEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getActiveTrigger_Transitions() {
- return (EReference)activeTriggerEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getExpandedModelComponent() {
- return expandedModelComponentEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getExpandedModelComponent_ModelComponent() {
- return (EReference)expandedModelComponentEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getExpandedModelComponent_StateMachine() {
- return (EReference)expandedModelComponentEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getExpandedModelComponent_TransitionChains() {
- return (EReference)expandedModelComponentEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getExpandedRefinedState() {
- return expandedRefinedStateEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getExpandedRefinedState_InheritedEntry() {
- return (EReference)expandedRefinedStateEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getExpandedRefinedState_InheritedExit() {
- return (EReference)expandedRefinedStateEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getExpandedRefinedState_InheritedDo() {
- return (EReference)expandedRefinedStateEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getIDiagnostician() {
- return iDiagnosticianEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getITransitionChainVisitor() {
- return iTransitionChainVisitorEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getTransitionChain() {
- return transitionChainEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getTransitionChain_Transition() {
- return (EReference)transitionChainEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getTransitionChain_Data() {
- return (EReference)transitionChainEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public FsmGenFactory getFsmGenFactory() {
- return (FsmGenFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents() {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- activeTriggerEClass = createEClass(ACTIVE_TRIGGER);
- createEReference(activeTriggerEClass, ACTIVE_TRIGGER__MSG);
- createEReference(activeTriggerEClass, ACTIVE_TRIGGER__IFITEM);
- createEAttribute(activeTriggerEClass, ACTIVE_TRIGGER__TRIGGER);
- createEReference(activeTriggerEClass, ACTIVE_TRIGGER__TRANSITIONS);
-
- expandedModelComponentEClass = createEClass(EXPANDED_MODEL_COMPONENT);
- createEReference(expandedModelComponentEClass, EXPANDED_MODEL_COMPONENT__MODEL_COMPONENT);
- createEReference(expandedModelComponentEClass, EXPANDED_MODEL_COMPONENT__STATE_MACHINE);
- createEReference(expandedModelComponentEClass, EXPANDED_MODEL_COMPONENT__TRANSITION_CHAINS);
-
- expandedRefinedStateEClass = createEClass(EXPANDED_REFINED_STATE);
- createEReference(expandedRefinedStateEClass, EXPANDED_REFINED_STATE__INHERITED_ENTRY);
- createEReference(expandedRefinedStateEClass, EXPANDED_REFINED_STATE__INHERITED_EXIT);
- createEReference(expandedRefinedStateEClass, EXPANDED_REFINED_STATE__INHERITED_DO);
-
- iDiagnosticianEClass = createEClass(IDIAGNOSTICIAN);
-
- iTransitionChainVisitorEClass = createEClass(ITRANSITION_CHAIN_VISITOR);
-
- transitionChainEClass = createEClass(TRANSITION_CHAIN);
- createEReference(transitionChainEClass, TRANSITION_CHAIN__TRANSITION);
- createEReference(transitionChainEClass, TRANSITION_CHAIN__DATA);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Obtain other dependent packages
- FSMPackage theFSMPackage = (FSMPackage)EPackage.Registry.INSTANCE.getEPackage(FSMPackage.eNS_URI);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
- expandedRefinedStateEClass.getESuperTypes().add(theFSMPackage.getSimpleState());
-
- // Initialize classes and features; add operations and parameters
- initEClass(activeTriggerEClass, ActiveTrigger.class, "ActiveTrigger", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getActiveTrigger_Msg(), ecorePackage.getEObject(), null, "msg", null, 0, 1, ActiveTrigger.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getActiveTrigger_Ifitem(), theFSMPackage.getAbstractInterfaceItem(), null, "ifitem", null, 0, 1, ActiveTrigger.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getActiveTrigger_Trigger(), ecorePackage.getEString(), "trigger", null, 0, 1, ActiveTrigger.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getActiveTrigger_Transitions(), theFSMPackage.getTriggeredTransition(), null, "transitions", null, 0, -1, ActiveTrigger.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- initEClass(expandedModelComponentEClass, ExpandedModelComponent.class, "ExpandedModelComponent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getExpandedModelComponent_ModelComponent(), theFSMPackage.getModelComponent(), null, "modelComponent", null, 0, 1, ExpandedModelComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getExpandedModelComponent_StateMachine(), theFSMPackage.getStateGraph(), null, "stateMachine", null, 0, 1, ExpandedModelComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getExpandedModelComponent_TransitionChains(), this.getTransitionChain(), null, "transitionChains", null, 0, -1, ExpandedModelComponent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- EOperation op = addEOperation(expandedModelComponentEClass, null, "prepare", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, this.getIDiagnostician(), "validator", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- addEOperation(expandedModelComponentEClass, null, "release", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, null, "addOwnObject", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getStateGraphItem(), "obj", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, ecorePackage.getEBoolean(), "isOwnObject", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getStateGraphItem(), "obj", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, ecorePackage.getEBoolean(), "hasBaseTransitionDetailCode", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getTransition(), "trans", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- addEOperation(expandedModelComponentEClass, ecorePackage.getEBoolean(), "hasStateMachine", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, ecorePackage.getEString(), "getTriggerCodeName", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getMessageFromIf(), "mif", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, ecorePackage.getEString(), "getTriggerCodeName", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, this.getActiveTrigger(), "at", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, theFSMPackage.getTransition(), "getOutgoingTransitions", 0, -1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getStateGraphNode(), "node", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, theFSMPackage.getTransition(), "getIncomingTransitions", 0, -1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getStateGraphNode(), "node", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, this.getActiveTrigger(), "getActiveTriggers", 0, -1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getState(), "state", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- addEOperation(expandedModelComponentEClass, theFSMPackage.getMessageFromIf(), "getTriggers", 0, -1, IS_UNIQUE, IS_ORDERED);
-
- addEOperation(expandedModelComponentEClass, theFSMPackage.getMessageFromIf(), "getOwnTriggers", 0, -1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, ecorePackage.getEString(), "getMessageID", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getMessageFromIf(), "mif", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, this.getTransitionChain(), "getChain", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getTransition(), "trans", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, this.getTransitionChain(), "getChains", 0, -1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getTransition(), "trans", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- addEOperation(expandedModelComponentEClass, this.getTransitionChain(), "getOwnTransitionChains", 0, -1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, theFSMPackage.getAbstractInterfaceItem(), "getOwnInterfaceItems", 0, -1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getModelComponent(), "mc", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- addEOperation(expandedModelComponentEClass, theFSMPackage.getAbstractInterfaceItem(), "getAllInterfaceItems", 0, -1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, ecorePackage.getEBoolean(), "isMatching", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getTrigger(), "trig", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, ecorePackage.getEString(), "trigstr", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, theFSMPackage.getContinuationTransition(), "getDefaultBranch", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getTransition(), "out", 0, -1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, ecorePackage.getEObject(), "getOrig", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, ecorePackage.getEObject(), "copy", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, ecorePackage.getEObject(), "getCopy", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, ecorePackage.getEObject(), "orig", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- addEOperation(expandedModelComponentEClass, ecorePackage.getEString(), "getModelComponentName", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, ecorePackage.getEObject(), "getData", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getTransition(), "trans", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, ecorePackage.getEObject(), "getIncomingMessages", 0, -1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getAbstractInterfaceItem(), "ifitem", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, this.getTransitionChain(), "addTransitionChain", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getTransition(), "trans", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, ecorePackage.getEInt(), "getInterfaceItemLocalId", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getAbstractInterfaceItem(), "ifitem", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(expandedModelComponentEClass, ecorePackage.getEObject(), "computeCommonChainData", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, this.getTransitionChain(), "chains", 0, -1, IS_UNIQUE, IS_ORDERED);
-
- initEClass(expandedRefinedStateEClass, ExpandedRefinedState.class, "ExpandedRefinedState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getExpandedRefinedState_InheritedEntry(), theFSMPackage.getDetailCode(), null, "inheritedEntry", null, 0, 1, ExpandedRefinedState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getExpandedRefinedState_InheritedExit(), theFSMPackage.getDetailCode(), null, "inheritedExit", null, 0, 1, ExpandedRefinedState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getExpandedRefinedState_InheritedDo(), theFSMPackage.getDetailCode(), null, "inheritedDo", null, 0, 1, ExpandedRefinedState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- op = addEOperation(expandedRefinedStateEClass, null, "init", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, theFSMPackage.getRefinedState(), "rs", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- initEClass(iDiagnosticianEClass, Object.class, "IDiagnostician", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(iTransitionChainVisitorEClass, Object.class, "ITransitionChainVisitor", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);
-
- initEClass(transitionChainEClass, TransitionChain.class, "TransitionChain", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getTransitionChain_Transition(), theFSMPackage.getTransition(), null, "transition", null, 0, 1, TransitionChain.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getTransitionChain_Data(), ecorePackage.getEObject(), null, "data", null, 0, 1, TransitionChain.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- addEOperation(transitionChainEClass, theFSMPackage.getState(), "getStateContext", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- addEOperation(transitionChainEClass, ecorePackage.getEBoolean(), "isHandler", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- op = addEOperation(transitionChainEClass, ecorePackage.getEString(), "genExecuteChain", 0, 1, IS_UNIQUE, IS_ORDERED);
- addEParameter(op, this.getITransitionChainVisitor(), "tcv", 0, 1, IS_UNIQUE, IS_ORDERED);
-
- // Create resource
- createResource(eNS_URI);
- }
-
-} //FsmGenPackageImpl
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/TransitionChainImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/TransitionChainImpl.java
deleted file mode 100644
index b54eb5b3a..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/impl/TransitionChainImpl.java
+++ /dev/null
@@ -1,381 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Thomas Schuetz and Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl;
-
-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.EObject;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.ExpandedModelComponent;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenPackage;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.ITransitionChainVisitor;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.TransitionChain;
-import org.eclipse.etrice.core.fsm.fSM.CPBranchTransition;
-import org.eclipse.etrice.core.fsm.fSM.ChoicePoint;
-import org.eclipse.etrice.core.fsm.fSM.ContinuationTransition;
-import org.eclipse.etrice.core.fsm.fSM.EntryPoint;
-import org.eclipse.etrice.core.fsm.fSM.ExitPoint;
-import org.eclipse.etrice.core.fsm.fSM.State;
-import org.eclipse.etrice.core.fsm.fSM.StateGraphNode;
-import org.eclipse.etrice.core.fsm.fSM.SubStateTrPointTerminal;
-import org.eclipse.etrice.core.fsm.fSM.TrPoint;
-import org.eclipse.etrice.core.fsm.fSM.TrPointTerminal;
-import org.eclipse.etrice.core.fsm.fSM.Transition;
-import org.eclipse.etrice.core.fsm.fSM.TransitionChainStartTransition;
-import org.eclipse.etrice.core.fsm.fSM.TransitionPoint;
-import org.eclipse.etrice.core.fsm.naming.FSMNameProvider;
-import org.eclipse.etrice.core.fsm.util.FSMHelpers;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Transition Chain</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.TransitionChainImpl#getTransition <em>Transition</em>}</li>
- * <li>{@link org.eclipse.etrice.core.genmodel.fsm.fsmgen.impl.TransitionChainImpl#getData <em>Data</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class TransitionChainImpl extends MinimalEObjectImpl.Container implements TransitionChain {
-
- private FSMHelpers fsmHelpers = new FSMHelpers();
- private FSMNameProvider fsmNameProvider = new FSMNameProvider();
-
- /**
- * The cached value of the '{@link #getTransition() <em>Transition</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getTransition()
- * @generated
- * @ordered
- */
- protected Transition transition;
-
- /**
- * The cached value of the '{@link #getData() <em>Data</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getData()
- * @generated
- * @ordered
- */
- protected EObject data;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected TransitionChainImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return FsmGenPackage.Literals.TRANSITION_CHAIN;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Transition getTransition() {
- if (transition != null && transition.eIsProxy()) {
- InternalEObject oldTransition = (InternalEObject)transition;
- transition = (Transition)eResolveProxy(oldTransition);
- if (transition != oldTransition) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmGenPackage.TRANSITION_CHAIN__TRANSITION, oldTransition, transition));
- }
- }
- return transition;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Transition basicGetTransition() {
- return transition;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setTransition(Transition newTransition) {
- Transition oldTransition = transition;
- transition = newTransition;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.TRANSITION_CHAIN__TRANSITION, oldTransition, transition));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject getData() {
- if (data != null && data.eIsProxy()) {
- InternalEObject oldData = (InternalEObject)data;
- data = eResolveProxy(oldData);
- if (data != oldData) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, FsmGenPackage.TRANSITION_CHAIN__DATA, oldData, data));
- }
- }
- return data;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EObject basicGetData() {
- return data;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setData(EObject newData) {
- EObject oldData = data;
- data = newData;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, FsmGenPackage.TRANSITION_CHAIN__DATA, oldData, data));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public State getStateContext() {
- if (getTransition().eContainer().eContainer() instanceof State)
- return (State) getTransition().eContainer().eContainer();
-
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public boolean isHandler() {
- if (getTransition() instanceof TransitionChainStartTransition) {
- TransitionChainStartTransition trans = (TransitionChainStartTransition)getTransition();
- if (trans.getFrom() instanceof TrPointTerminal) {
- TrPoint tp = ((TrPointTerminal)trans.getFrom()).getTrPoint();
- if (tp instanceof TransitionPoint)
- return ((TransitionPoint)tp).isHandler();
- }
- else if (trans.getFrom() instanceof SubStateTrPointTerminal) {
- TrPoint tp = ((SubStateTrPointTerminal)trans.getFrom()).getTrPoint();
- if (tp instanceof TransitionPoint)
- assert(false): "not allowed to connect TransitionPoint to exterior";
- }
- }
- return false;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated NOT
- */
- public String genExecuteChain(ITransitionChainVisitor tcv) {
- ExpandedModelComponent emc = getExpandedModelComponent();
-
- StringBuilder result = new StringBuilder();
-
- /* TODO: the next generated code declares a correctly typed variable for the generic data.
- * It is hard to determine whether it is actually needed though.
- * It is needed in non-initial transitions with action code that are not data driven.
- * It might be needed in condition expressions. But this code would have to be parsed
- * with uncertain result (because of e.g. comments).
- */
- result.append(tcv.genTypedData(this));
-
- genChainCode(getTransition(), emc, tcv, result);
- return result.toString();
- }
-
- private void genChainCode(Transition tr,
- ExpandedModelComponent emc, ITransitionChainVisitor tcv, StringBuilder result) {
-
- result.append(tcv.genActionOperationCall(tr));
-
- StateGraphNode node = fsmHelpers.getNode(tr.getTo());
- EList<Transition> out = emc.getOutgoingTransitions(node);
- if (node instanceof ChoicePoint) {
- ContinuationTransition dflt = emc.getDefaultBranch(out);
- assert(dflt!=null): "ChoicePoint "+fsmNameProvider.getFullPath(node)+" has no default branch!";
-
- // generate if/else
- boolean isFirst = true;
- for (Transition cond : out) {
- if (cond==dflt)
- continue;
-
- assert(cond instanceof CPBranchTransition): "The non default ChoicePoint branch "
- +fsmNameProvider.getFullPath(cond)+" must be of type CPBranchTransition!";
-
- result.append(tcv.genElseIfBranch((CPBranchTransition)cond, isFirst));
- isFirst = false;
-
- genChainCode(cond, emc, tcv, result);
- }
-
- // generate default
- result.append(tcv.genElseBranch(dflt));
-
- genChainCode(dflt, emc, tcv, result);
-
- result.append(tcv.genEndIf());
- }
- else {
- if (node instanceof TrPoint) {
- if (node instanceof TransitionPoint) {
- // TransitionPoint is final destination of the chain
- result.append(tcv.genReturnState(getStateContext(), false));
- return;
- }
- else {
- assert(out.size()<=1): "TrPoint "+fsmNameProvider.getFullPath(node)
- +" is expected to have at most one outgoing transition!";
- if (out.size()==1) {
- State state = (node.eContainer().eContainer() instanceof State)? (State)node.eContainer().eContainer():null;
- if (node instanceof EntryPoint) {
- if (state!=null && emc.isOwnObject(state) && state.getEntryCode()!=null && !state.getEntryCode().getLines().isEmpty())
- result.append(tcv.genEntryOperationCall(state));
- }
- else if (node instanceof ExitPoint) {
- if (state!=null && emc.isOwnObject(state) && state.getExitCode()!=null && !state.getExitCode().getLines().isEmpty())
- result.append(tcv.genExitOperationCall(state));
- }
- else {
- assert(false): "unexpected sub type";
- }
- }
- }
- genChainCode(out.get(0), emc, tcv, result);
- }
- else {
- // the following assertion should always hold true
- assert(node instanceof State): "A transition target can be a ChoicePoint, a TrPoint or a State!";
-
- result.append(tcv.genReturnState((State) node, true));
- }
- }
- }
-
- private ExpandedModelComponent getExpandedModelComponent() {
- EObject obj = getTransition();
- while (obj!=null) {
- obj = obj.eContainer();
- if (obj instanceof ExpandedModelComponent)
- return (ExpandedModelComponent) obj;
- }
- return null;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case FsmGenPackage.TRANSITION_CHAIN__TRANSITION:
- if (resolve) return getTransition();
- return basicGetTransition();
- case FsmGenPackage.TRANSITION_CHAIN__DATA:
- if (resolve) return getData();
- return basicGetData();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case FsmGenPackage.TRANSITION_CHAIN__TRANSITION:
- setTransition((Transition)newValue);
- return;
- case FsmGenPackage.TRANSITION_CHAIN__DATA:
- setData((EObject)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case FsmGenPackage.TRANSITION_CHAIN__TRANSITION:
- setTransition((Transition)null);
- return;
- case FsmGenPackage.TRANSITION_CHAIN__DATA:
- setData((EObject)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case FsmGenPackage.TRANSITION_CHAIN__TRANSITION:
- return transition != null;
- case FsmGenPackage.TRANSITION_CHAIN__DATA:
- return data != null;
- }
- return super.eIsSet(featureID);
- }
-
-} //TransitionChainImpl
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenResourceFactoryImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenResourceFactoryImpl.java
deleted file mode 100644
index dc9adb5d3..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenResourceFactoryImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- *
- */
-package org.eclipse.etrice.core.genmodel.fsm.fsmgen.util;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.resource.Resource;
-
-import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Resource Factory</b> associated with the package.
- * <!-- end-user-doc -->
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.util.FsmGenResourceImpl
- * @generated
- */
-public class FsmGenResourceFactoryImpl extends ResourceFactoryImpl {
- /**
- * Creates an instance of the resource factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public FsmGenResourceFactoryImpl() {
- super();
- }
-
- /**
- * Creates an instance of the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Resource createResource(URI uri) {
- Resource result = new FsmGenResourceImpl(uri);
- return result;
- }
-
-} //FsmGenResourceFactoryImpl
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenResourceImpl.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenResourceImpl.java
deleted file mode 100644
index 3e7cb3bc7..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenResourceImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Copyright (c) 2014 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- *
- */
-package org.eclipse.etrice.core.genmodel.fsm.fsmgen.util;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Resource </b> associated with the package.
- * <!-- end-user-doc -->
- * @see org.eclipse.etrice.core.genmodel.fsm.fsmgen.util.FsmGenResourceFactoryImpl
- * @generated
- */
-public class FsmGenResourceImpl extends XMIResourceImpl {
- /**
- * Creates an instance of the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param uri the URI of the new resource.
- * @generated
- */
- public FsmGenResourceImpl(URI uri) {
- super(uri);
- }
-
-} //FsmGenResourceImpl
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenUtil.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenUtil.java
deleted file mode 100644
index dae41c9c2..000000000
--- a/plugins/org.eclipse.etrice.core.genmodel.fsm/src/org/eclipse/etrice/core/genmodel/fsm/fsmgen/util/FsmGenUtil.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * CONTRIBUTORS:
- * Henrik Rentz-Reichert (initial contribution)
- *
- *******************************************************************************/
-
-package org.eclipse.etrice.core.genmodel.fsm.fsmgen.util;
-
-import org.eclipse.etrice.core.fsm.fSM.Trigger;
-import org.eclipse.etrice.core.fsm.fSM.TriggeredTransition;
-import org.eclipse.etrice.core.fsm.util.FSMHelpers;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.ActiveTrigger;
-import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenFactory;
-
-/**
- * @author Henrik Rentz-Reichert
- *
- */
-public class FsmGenUtil {
-
- private FSMHelpers fsmHelpers = new FSMHelpers();
-
- /**
- * @param trig the trigger
- * @param trigstr the encoded trigger string
- * @return <code>true</code> if the encoded trigger string is matching the {@link Trigger}
- *
- * @see org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass#isMatching(Trigger, String)
- */
- public boolean isMatching(Trigger trig, String trigstr) {
- return FsmGenFactory.eINSTANCE.createExpandedModelComponent().isMatching(trig, trigstr);
- }
-
- /**
- * @param at an {@link ActiveTrigger}
- * @return <code>true</code> if the active trigger has defined a guard
- */
- public boolean hasGuard(ActiveTrigger at) {
- for (TriggeredTransition t : at.getTransitions()) {
- for (Trigger trig : t.getTriggers()) {
- if (isMatching(trig, at.getTrigger())
- && fsmHelpers.hasGuard(trig))
- return true;
- }
- }
- return false;
- }
-}
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.java
new file mode 100644
index 000000000..f277d3950
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/BasicFsmGenBuilder.java
@@ -0,0 +1,323 @@
+/**
+ * Copyright (c) 2017 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ */
+package org.eclipse.etrice.core.genmodel.fsm;
+
+import com.google.common.collect.Iterables;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.function.Consumer;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.etrice.core.fsm.fSM.ChoicePoint;
+import org.eclipse.etrice.core.fsm.fSM.ChoicepointTerminal;
+import org.eclipse.etrice.core.fsm.fSM.ModelComponent;
+import org.eclipse.etrice.core.fsm.fSM.NonInitialTransition;
+import org.eclipse.etrice.core.fsm.fSM.RefinedState;
+import org.eclipse.etrice.core.fsm.fSM.RefinedTransition;
+import org.eclipse.etrice.core.fsm.fSM.SimpleState;
+import org.eclipse.etrice.core.fsm.fSM.State;
+import org.eclipse.etrice.core.fsm.fSM.StateGraph;
+import org.eclipse.etrice.core.fsm.fSM.StateGraphNode;
+import org.eclipse.etrice.core.fsm.fSM.StateTerminal;
+import org.eclipse.etrice.core.fsm.fSM.SubStateTrPointTerminal;
+import org.eclipse.etrice.core.fsm.fSM.TrPoint;
+import org.eclipse.etrice.core.fsm.fSM.TrPointTerminal;
+import org.eclipse.etrice.core.fsm.fSM.Transition;
+import org.eclipse.etrice.core.fsm.util.FSMHelpers;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenFactory;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node;
+import org.eclipse.xtext.xbase.lib.CollectionLiterals;
+import org.eclipse.xtext.xbase.lib.Extension;
+import org.eclipse.xtext.xbase.lib.Functions.Function1;
+import org.eclipse.xtext.xbase.lib.IterableExtensions;
+import org.eclipse.xtext.xbase.lib.ListExtensions;
+
+@SuppressWarnings("all")
+public class BasicFsmGenBuilder {
+ @Inject
+ @Extension
+ protected FSMHelpers fsmHelpers;
+
+ protected final FsmGenFactory factory = FsmGenFactory.eINSTANCE;
+
+ private int inheritanceLevel = 0;
+
+ public BasicFsmGenBuilder(final Injector injector) {
+ injector.injectMembers(this);
+ }
+
+ protected BasicFsmGenBuilder() {
+ }
+
+ public GraphContainer createTransformedModel(final ModelComponent mc) {
+ return this.createContainer(mc);
+ }
+
+ private GraphContainer createContainer(final ModelComponent mc) {
+ final ArrayList<?> _cacheKey = CollectionLiterals.newArrayList(mc);
+ final GraphContainer _result;
+ synchronized (_createCache_createContainer) {
+ if (_createCache_createContainer.containsKey(_cacheKey)) {
+ return _createCache_createContainer.get(_cacheKey);
+ }
+ GraphContainer _createGraphContainer = this.factory.createGraphContainer();
+ _result = _createGraphContainer;
+ _createCache_createContainer.put(_cacheKey, _result);
+ }
+ _init_createContainer(_result, mc);
+ return _result;
+ }
+
+ private final HashMap<ArrayList<?>, GraphContainer> _createCache_createContainer = CollectionLiterals.newHashMap();
+
+ private void _init_createContainer(final GraphContainer it, final ModelComponent mc) {
+ it.setComponent(mc);
+ it.setGraph(this.createStateMachine(mc));
+ }
+
+ private Graph createStateMachine(final ModelComponent mc) {
+ Graph _xblockexpression = null;
+ {
+ final StateGraph superFSM = this.fsmHelpers.getSuperStateMachine(mc);
+ Graph _xifexpression = null;
+ if ((superFSM != null)) {
+ Graph _xblockexpression_1 = null;
+ {
+ final Graph baseGraph = this.createStateMachine(this.fsmHelpers.getModelComponent(superFSM));
+ this.inheritanceLevel++;
+ _xblockexpression_1 = this.mergeGraph(baseGraph, this.fsmHelpers.getActualStateMachine(mc));
+ }
+ _xifexpression = _xblockexpression_1;
+ } else {
+ Graph _xifexpression_1 = null;
+ StateGraph _actualStateMachine = this.fsmHelpers.getActualStateMachine(mc);
+ boolean _tripleNotEquals = (_actualStateMachine != null);
+ if (_tripleNotEquals) {
+ StateGraph _actualStateMachine_1 = this.fsmHelpers.getActualStateMachine(mc);
+ Graph _createGraph = null;
+ if (_actualStateMachine_1!=null) {
+ _createGraph=this.createGraph(_actualStateMachine_1);
+ }
+ _xifexpression_1 = _createGraph;
+ }
+ _xifexpression = _xifexpression_1;
+ }
+ _xblockexpression = _xifexpression;
+ }
+ return _xblockexpression;
+ }
+
+ private Graph mergeGraph(final Graph graph, final StateGraph sg) {
+ final Consumer<Node> _function = new Consumer<Node>() {
+ @Override
+ public void accept(final Node it) {
+ it.setInherited(true);
+ }
+ };
+ graph.getNodes().forEach(_function);
+ final Consumer<Link> _function_1 = new Consumer<Link>() {
+ @Override
+ public void accept(final Link it) {
+ it.setInherited(true);
+ }
+ };
+ graph.getLinks().forEach(_function_1);
+ this.createContents(graph, sg);
+ graph.setStateGraph(sg);
+ return graph;
+ }
+
+ private Graph createGraph(final StateGraph sg) {
+ final ArrayList<?> _cacheKey = CollectionLiterals.newArrayList(sg);
+ final Graph _result;
+ synchronized (_createCache_createGraph) {
+ if (_createCache_createGraph.containsKey(_cacheKey)) {
+ return _createCache_createGraph.get(_cacheKey);
+ }
+ Graph _createGraph = this.factory.createGraph();
+ _result = _createGraph;
+ _createCache_createGraph.put(_cacheKey, _result);
+ }
+ _init_createGraph(_result, sg);
+ return _result;
+ }
+
+ private final HashMap<ArrayList<?>, Graph> _createCache_createGraph = CollectionLiterals.newHashMap();
+
+ private void _init_createGraph(final Graph it, final StateGraph sg) {
+ it.setStateGraph(sg);
+ this.createContents(it, sg);
+ }
+
+ private void createContents(final Graph graph, final StateGraph sg) {
+ final Function1<ChoicePoint, Node> _function = new Function1<ChoicePoint, Node>() {
+ @Override
+ public Node apply(final ChoicePoint it) {
+ return BasicFsmGenBuilder.this.createNode(it);
+ }
+ };
+ graph.getNodes().addAll(ListExtensions.<ChoicePoint, Node>map(sg.getChPoints(), _function));
+ final Function1<TrPoint, Node> _function_1 = new Function1<TrPoint, Node>() {
+ @Override
+ public Node apply(final TrPoint it) {
+ return BasicFsmGenBuilder.this.createNode(it);
+ }
+ };
+ graph.getNodes().addAll(ListExtensions.<TrPoint, Node>map(sg.getTrPoints(), _function_1));
+ final Function1<SimpleState, Node> _function_2 = new Function1<SimpleState, Node>() {
+ @Override
+ public Node apply(final SimpleState it) {
+ return BasicFsmGenBuilder.this.createNode(it);
+ }
+ };
+ Iterables.<Node>addAll(graph.getNodes(), IterableExtensions.<SimpleState, Node>map(Iterables.<SimpleState>filter(sg.getStates(), SimpleState.class), _function_2));
+ final Function1<Transition, Link> _function_3 = new Function1<Transition, Link>() {
+ @Override
+ public Link apply(final Transition it) {
+ return BasicFsmGenBuilder.this.createLink(it);
+ }
+ };
+ graph.getLinks().addAll(ListExtensions.<Transition, Link>map(sg.getTransitions(), _function_3));
+ final Consumer<RefinedState> _function_4 = new Consumer<RefinedState>() {
+ @Override
+ public void accept(final RefinedState it) {
+ BasicFsmGenBuilder.this.handleRefinedState(it);
+ }
+ };
+ Iterables.<RefinedState>filter(sg.getStates(), RefinedState.class).forEach(_function_4);
+ final Consumer<RefinedTransition> _function_5 = new Consumer<RefinedTransition>() {
+ @Override
+ public void accept(final RefinedTransition it) {
+ BasicFsmGenBuilder.this.handleRefinedTransition(it);
+ }
+ };
+ sg.getRefinedTransitions().forEach(_function_5);
+ }
+
+ private void handleRefinedState(final RefinedState s) {
+ final Node refinedNode = this.createNode(this.fsmHelpers.getFinalTarget(s));
+ StateGraph _subgraph = s.getSubgraph();
+ boolean _tripleNotEquals = (_subgraph != null);
+ if (_tripleNotEquals) {
+ Graph _subgraph_1 = refinedNode.getSubgraph();
+ boolean _tripleNotEquals_1 = (_subgraph_1 != null);
+ if (_tripleNotEquals_1) {
+ this.mergeGraph(refinedNode.getSubgraph(), s.getSubgraph());
+ } else {
+ refinedNode.setSubgraph(this.createGraph(s.getSubgraph()));
+ }
+ }
+ final Node target = refinedNode;
+ target.setStateGraphNode(s);
+ }
+
+ private void handleRefinedTransition(final RefinedTransition t) {
+ Link _createLink = this.createLink(t.getTarget());
+ _createLink.setTransition(t);
+ }
+
+ private Link createLink(final Transition tr) {
+ final ArrayList<?> _cacheKey = CollectionLiterals.newArrayList(tr);
+ final Link _result;
+ synchronized (_createCache_createLink) {
+ if (_createCache_createLink.containsKey(_cacheKey)) {
+ return _createCache_createLink.get(_cacheKey);
+ }
+ Link _createLink = this.factory.createLink();
+ _result = _createLink;
+ _createCache_createLink.put(_cacheKey, _result);
+ }
+ _init_createLink(_result, tr);
+ return _result;
+ }
+
+ private final HashMap<ArrayList<?>, Link> _createCache_createLink = CollectionLiterals.newHashMap();
+
+ private void _init_createLink(final Link it, final Transition tr) {
+ it.setTransition(tr);
+ Node _xifexpression = null;
+ if ((tr instanceof NonInitialTransition)) {
+ _xifexpression = this.createNode(((NonInitialTransition)tr).getFrom());
+ }
+ it.setSource(_xifexpression);
+ it.setTarget(this.createNode(tr.getTo()));
+ }
+
+ private Node _createNode(final StateGraphNode s) {
+ final ArrayList<?> _cacheKey = CollectionLiterals.newArrayList(s);
+ final Node _result;
+ synchronized (_createCache_createNode) {
+ if (_createCache_createNode.containsKey(_cacheKey)) {
+ return _createCache_createNode.get(_cacheKey);
+ }
+ Node _createNode = this.factory.createNode();
+ _result = _createNode;
+ _createCache_createNode.put(_cacheKey, _result);
+ }
+ _init_createNode(_result, s);
+ return _result;
+ }
+
+ private final HashMap<ArrayList<?>, Node> _createCache_createNode = CollectionLiterals.newHashMap();
+
+ private void _init_createNode(final Node it, final StateGraphNode s) {
+ it.setStateGraphNode(s);
+ it.setInheritanceLevel(this.inheritanceLevel);
+ Graph _xifexpression = null;
+ if ((s instanceof State)) {
+ StateGraph _subgraph = ((State)s).getSubgraph();
+ Graph _createGraph = null;
+ if (_subgraph!=null) {
+ _createGraph=this.createGraph(_subgraph);
+ }
+ _xifexpression = _createGraph;
+ }
+ it.setSubgraph(_xifexpression);
+ }
+
+ private Node _createNode(final ChoicepointTerminal tt) {
+ return this.createNode(tt.getCp());
+ }
+
+ private Node _createNode(final TrPointTerminal tt) {
+ return this.createNode(tt.getTrPoint());
+ }
+
+ private Node _createNode(final StateTerminal tt) {
+ return this.createNode(tt.getState());
+ }
+
+ private Node _createNode(final SubStateTrPointTerminal tt) {
+ return this.createNode(tt.getTrPoint());
+ }
+
+ private Node createNode(final EObject tt) {
+ if (tt instanceof ChoicepointTerminal) {
+ return _createNode((ChoicepointTerminal)tt);
+ } else if (tt instanceof StateGraphNode) {
+ return _createNode((StateGraphNode)tt);
+ } else if (tt instanceof StateTerminal) {
+ return _createNode((StateTerminal)tt);
+ } else if (tt instanceof SubStateTrPointTerminal) {
+ return _createNode((SubStateTrPointTerminal)tt);
+ } else if (tt instanceof TrPointTerminal) {
+ return _createNode((TrPointTerminal)tt);
+ } else {
+ throw new IllegalArgumentException("Unhandled parameter types: " +
+ Arrays.<Object>asList(tt).toString());
+ }
+ }
+}
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/ExtendedFsmGenBuilder.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/ExtendedFsmGenBuilder.java
new file mode 100644
index 000000000..a1b424ebd
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/ExtendedFsmGenBuilder.java
@@ -0,0 +1,291 @@
+/**
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * hrr@protos.de (initial contribution)
+ */
+package org.eclipse.etrice.core.genmodel.fsm;
+
+import com.google.common.collect.Iterables;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.function.Consumer;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.etrice.core.fsm.fSM.FSMPackage;
+import org.eclipse.etrice.core.fsm.fSM.MessageFromIf;
+import org.eclipse.etrice.core.fsm.fSM.State;
+import org.eclipse.etrice.core.fsm.fSM.StateGraphNode;
+import org.eclipse.etrice.core.fsm.fSM.TransitionBase;
+import org.eclipse.etrice.core.fsm.fSM.TransitionPoint;
+import org.eclipse.etrice.core.fsm.fSM.Trigger;
+import org.eclipse.etrice.core.fsm.fSM.TriggeredTransition;
+import org.eclipse.etrice.core.genmodel.fsm.BasicFsmGenBuilder;
+import org.eclipse.etrice.core.genmodel.fsm.FsmGenExtensions;
+import org.eclipse.etrice.core.genmodel.fsm.ICommonDataCalculator;
+import org.eclipse.etrice.core.genmodel.fsm.IDiagnostician;
+import org.eclipse.etrice.core.genmodel.fsm.TriggerExtensions;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.FsmGenFactory;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node;
+import org.eclipse.xtext.xbase.lib.CollectionLiterals;
+import org.eclipse.xtext.xbase.lib.Extension;
+import org.eclipse.xtext.xbase.lib.Functions.Function1;
+import org.eclipse.xtext.xbase.lib.IterableExtensions;
+import org.eclipse.xtext.xbase.lib.IteratorExtensions;
+import org.eclipse.xtext.xbase.lib.ListExtensions;
+import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
+
+@SuppressWarnings("all")
+public class ExtendedFsmGenBuilder extends BasicFsmGenBuilder {
+ @Inject
+ @Extension
+ protected ICommonDataCalculator _iCommonDataCalculator;
+
+ @Inject
+ @Extension
+ protected TriggerExtensions _triggerExtensions;
+
+ protected IDiagnostician validator;
+
+ private final FsmGenFactory factory = FsmGenFactory.eINSTANCE;
+
+ public ExtendedFsmGenBuilder(final Injector injector, final IDiagnostician validator) {
+ super();
+ injector.injectMembers(this);
+ this.validator = validator;
+ }
+
+ /**
+ * computes the available triggers for all leaf states
+ */
+ public GraphContainer withTriggersInStates(final GraphContainer gc) {
+ boolean _isInitializedTriggersInStates = gc.isInitializedTriggersInStates();
+ boolean _not = (!_isInitializedTriggersInStates);
+ if (_not) {
+ Graph _graph = gc.getGraph();
+ boolean _tripleNotEquals = (_graph != null);
+ if (_tripleNotEquals) {
+ final Function1<Node, Boolean> _function = new Function1<Node, Boolean>() {
+ @Override
+ public Boolean apply(final Node it) {
+ Graph _subgraph = it.getSubgraph();
+ return Boolean.valueOf((_subgraph == null));
+ }
+ };
+ final Procedure1<Node> _function_1 = new Procedure1<Node>() {
+ @Override
+ public void apply(final Node it) {
+ ExtendedFsmGenBuilder.this.computeTriggers(it);
+ }
+ };
+ IteratorExtensions.<Node>forEach(IteratorExtensions.<Node>filter(FsmGenExtensions.getAllStateNodes(gc.getGraph()), _function), _function_1);
+ }
+ gc.setInitializedTriggersInStates(true);
+ }
+ return gc;
+ }
+
+ /**
+ * determines all transition chain heads of all transitions
+ */
+ public GraphContainer withChainHeads(final GraphContainer gc) {
+ boolean _isInitializedChainHeads = gc.isInitializedChainHeads();
+ boolean _not = (!_isInitializedChainHeads);
+ if (_not) {
+ Graph _graph = gc.getGraph();
+ boolean _tripleNotEquals = (_graph != null);
+ if (_tripleNotEquals) {
+ final Procedure1<Link> _function = new Procedure1<Link>() {
+ @Override
+ public void apply(final Link it) {
+ ExtendedFsmGenBuilder.this.followChain(it, it);
+ }
+ };
+ IteratorExtensions.<Link>forEach(FsmGenExtensions.getAllChainHeads(gc.getGraph()), _function);
+ }
+ gc.setInitializedChainHeads(true);
+ }
+ return gc;
+ }
+
+ /**
+ * calculates and stores the common data. Prerequisite is the computation of the
+ * chain heads, which is performed if not done already.
+ */
+ public GraphContainer withCommonData(final GraphContainer gc) {
+ boolean _isInitializedChainHeads = gc.isInitializedChainHeads();
+ boolean _not = (!_isInitializedChainHeads);
+ if (_not) {
+ this.withChainHeads(gc);
+ }
+ boolean _isInitializedCommonData = gc.isInitializedCommonData();
+ boolean _not_1 = (!_isInitializedCommonData);
+ if (_not_1) {
+ Graph _graph = gc.getGraph();
+ boolean _tripleNotEquals = (_graph != null);
+ if (_tripleNotEquals) {
+ final Procedure1<Link> _function = new Procedure1<Link>() {
+ @Override
+ public void apply(final Link it) {
+ it.setCommonData(ExtendedFsmGenBuilder.this._iCommonDataCalculator.calculateCommonData(it));
+ }
+ };
+ IteratorExtensions.<Link>forEach(FsmGenExtensions.getAllLinks(gc.getGraph()), _function);
+ }
+ gc.setInitializedCommonData(true);
+ }
+ return gc;
+ }
+
+ private void followChain(final Link l, final Link head) {
+ TransitionBase _transition = head.getTransition();
+ boolean _not = (!(_transition instanceof TriggeredTransition));
+ if (_not) {
+ l.setIfitemTriggered(false);
+ }
+ l.getChainHeads().add(head);
+ final StateGraphNode target = l.getTarget().getStateGraphNode();
+ if (((target instanceof State) || (target instanceof TransitionPoint))) {
+ return;
+ } else {
+ EList<Link> _outgoing = l.getTarget().getOutgoing();
+ for (final Link next : _outgoing) {
+ this.followChain(next, head);
+ }
+ }
+ }
+
+ private void computeTriggers(final Node s) {
+ final LinkedHashMap<String, CommonTrigger> caughtTriggers = CollectionLiterals.<String, CommonTrigger>newLinkedHashMap();
+ this.computeTriggersRecursive(s, caughtTriggers);
+ s.getCaughtTriggers().clear();
+ s.getCaughtTriggers().addAll(caughtTriggers.values());
+ }
+
+ private void computeTriggersRecursive(final Node s, final HashMap<String, CommonTrigger> caughtTriggers) {
+ this.computeTriggers(IterableExtensions.<Link>toList(FsmGenExtensions.getOutgoingTriggeredTransitionLinks(s)), caughtTriggers);
+ final Function1<Node, Iterable<Link>> _function = new Function1<Node, Iterable<Link>>() {
+ @Override
+ public Iterable<Link> apply(final Node it) {
+ return FsmGenExtensions.getOutgoingTriggeredTransitionLinks(it);
+ }
+ };
+ final List<Link> trPointTransitions = IterableExtensions.<Link>toList(Iterables.<Link>concat(IterableExtensions.<Node, Iterable<Link>>map(FsmGenExtensions.getTransitionPointNodes(s.getGraph()), _function)));
+ this.computeTriggers(trPointTransitions, caughtTriggers);
+ boolean _isTopLevel = FsmGenExtensions.isTopLevel(s.getGraph());
+ boolean _not = (!_isTopLevel);
+ if (_not) {
+ this.computeTriggersRecursive(FsmGenExtensions.getParentState(s), caughtTriggers);
+ }
+ }
+
+ private void computeTriggers(final List<Link> sameLevelLinks, final HashMap<String, CommonTrigger> caughtTriggers) {
+ final HashMap<TransitionBase, Link> trans2link = CollectionLiterals.<TransitionBase, Link>newHashMap();
+ final Consumer<Link> _function = new Consumer<Link>() {
+ @Override
+ public void accept(final Link it) {
+ trans2link.put(it.getTransition(), it);
+ }
+ };
+ sameLevelLinks.forEach(_function);
+ for (final Link l : sameLevelLinks) {
+ TransitionBase _transition = l.getTransition();
+ EList<Trigger> _triggers = ((TriggeredTransition) _transition).getTriggers();
+ for (final Trigger tr : _triggers) {
+ {
+ final boolean triggerHasGuard = this.fsmHelpers.hasGuard(tr);
+ EList<MessageFromIf> _msgFromIfPairs = tr.getMsgFromIfPairs();
+ for (final MessageFromIf mif : _msgFromIfPairs) {
+ {
+ final String tag = this._triggerExtensions.getTriggerTag(mif);
+ CommonTrigger ct = caughtTriggers.get(tag);
+ if ((ct == null)) {
+ ct = this.createCommonTrigger(l, mif, tag);
+ ct.setHasGuard(triggerHasGuard);
+ caughtTriggers.put(tag, ct);
+ } else {
+ final Function1<Link, EList<Trigger>> _function_1 = new Function1<Link, EList<Trigger>>() {
+ @Override
+ public EList<Trigger> apply(final Link it) {
+ TransitionBase _transition = it.getTransition();
+ return ((TriggeredTransition) _transition).getTriggers();
+ }
+ };
+ final Function1<Trigger, Boolean> _function_2 = new Function1<Trigger, Boolean>() {
+ @Override
+ public Boolean apply(final Trigger it) {
+ return Boolean.valueOf((ExtendedFsmGenBuilder.this.hasMatchingTrigger(it, tag) && (!ExtendedFsmGenBuilder.this.fsmHelpers.hasGuard(it))));
+ }
+ };
+ Trigger _head = IterableExtensions.<Trigger>head(IterableExtensions.<Trigger>filter(Iterables.<Trigger>concat(ListExtensions.<Link, EList<Trigger>>map(ct.getLinks(), _function_1)), _function_2));
+ EObject _eContainer = null;
+ if (_head!=null) {
+ _eContainer=_head.eContainer();
+ }
+ final TriggeredTransition unguarded = ((TriggeredTransition) _eContainer);
+ if ((unguarded != null)) {
+ final Link unguardedLink = trans2link.get(unguarded);
+ boolean _contains = sameLevelLinks.contains(unguardedLink);
+ if (_contains) {
+ if (triggerHasGuard) {
+ final int idx = ct.getLinks().indexOf(unguardedLink);
+ ct.setHasGuard(triggerHasGuard);
+ ct.getLinks().add(idx, l);
+ } else {
+ this.validationError("Transitions with same trigger on same level have to be guarded!", l.getTransition(), FSMPackage.eINSTANCE.getTriggeredTransition_Triggers());
+ }
+ }
+ } else {
+ ct.getLinks().add(l);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private boolean hasMatchingTrigger(final Trigger trig, final String tag) {
+ EList<MessageFromIf> _msgFromIfPairs = trig.getMsgFromIfPairs();
+ for (final MessageFromIf mifp2 : _msgFromIfPairs) {
+ {
+ final String tr2 = this._triggerExtensions.getTriggerTag(mifp2);
+ boolean _equals = tr2.equals(tag);
+ if (_equals) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ private CommonTrigger createCommonTrigger(final Link l, final MessageFromIf mif, final String tag) {
+ final CommonTrigger it = this.factory.createCommonTrigger();
+ it.setTrigger(tag);
+ it.setIfitem(mif.getFrom());
+ it.setMsg(mif.getMessage());
+ it.getLinks().add(l);
+ return it;
+ }
+
+ protected void validationError(final String msg, final EObject obj, final EStructuralFeature feature) {
+ this.validationError(msg, obj, feature, IDiagnostician.INSIGNIFICANT_INDEX);
+ }
+
+ protected void validationError(final String msg, final EObject obj, final EStructuralFeature feature, final int idx) {
+ this.validator.error(msg, obj, feature, idx);
+ }
+}
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/FsmGenChecker.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/FsmGenChecker.java
new file mode 100644
index 000000000..50e6b61ee
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/FsmGenChecker.java
@@ -0,0 +1,194 @@
+/**
+ * Copyright (c) 2017 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ */
+package org.eclipse.etrice.core.genmodel.fsm;
+
+import com.google.common.base.Objects;
+import com.google.common.collect.Iterators;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.etrice.core.fsm.fSM.NonInitialTransition;
+import org.eclipse.etrice.core.fsm.fSM.State;
+import org.eclipse.etrice.core.fsm.fSM.StateGraph;
+import org.eclipse.etrice.core.fsm.fSM.StateGraphNode;
+import org.eclipse.etrice.core.fsm.fSM.TrPoint;
+import org.eclipse.etrice.core.fsm.fSM.TransitionBase;
+import org.eclipse.etrice.core.genmodel.fsm.ILogger;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node;
+import org.eclipse.xtext.xbase.lib.IteratorExtensions;
+import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
+
+@SuppressWarnings("all")
+public class FsmGenChecker {
+ public static void check(final GraphContainer gc, final ILogger logger) {
+ final Procedure1<Graph> _function = new Procedure1<Graph>() {
+ @Override
+ public void apply(final Graph it) {
+ FsmGenChecker.checkGraph(it, logger);
+ }
+ };
+ IteratorExtensions.<Graph>forEach(Iterators.<Graph>filter(gc.eAllContents(), Graph.class), _function);
+ final Procedure1<Node> _function_1 = new Procedure1<Node>() {
+ @Override
+ public void apply(final Node it) {
+ FsmGenChecker.checkNode(it, logger);
+ }
+ };
+ IteratorExtensions.<Node>forEach(Iterators.<Node>filter(gc.eAllContents(), Node.class), _function_1);
+ final Procedure1<Link> _function_2 = new Procedure1<Link>() {
+ @Override
+ public void apply(final Link it) {
+ FsmGenChecker.checkLink(it, logger);
+ }
+ };
+ IteratorExtensions.<Link>forEach(Iterators.<Link>filter(gc.eAllContents(), Link.class), _function_2);
+ }
+
+ private static void checkLink(final Link it, final ILogger logger) {
+ TransitionBase _transition = it.getTransition();
+ boolean _equals = Objects.equal(_transition, null);
+ if (_equals) {
+ logger.logError("graph doesn\'t point to ROOM transition");
+ } else {
+ boolean _eIsProxy = it.getTransition().eIsProxy();
+ if (_eIsProxy) {
+ logger.logError("unresolved ROOM transition");
+ } else {
+ EObject _eContainer = it.getTransition().eContainer();
+ boolean _equals_1 = Objects.equal(_eContainer, null);
+ if (_equals_1) {
+ logger.logError("dangling ROOM transition");
+ } else {
+ Node _target = it.getTarget();
+ boolean _equals_2 = Objects.equal(_target, null);
+ if (_equals_2) {
+ logger.logError("link without target");
+ } else {
+ if ((Objects.equal(it.getSource(), null) && (it.getTransition() instanceof NonInitialTransition))) {
+ logger.logError("non-initial link without source");
+ }
+ }
+ }
+ }
+ }
+ Node _source = it.getSource();
+ boolean _notEquals = (!Objects.equal(_source, null));
+ if (_notEquals) {
+ FsmGenChecker.checkLinkEnd(it, it.getSource(), logger);
+ }
+ FsmGenChecker.checkLinkEnd(it, it.getTarget(), logger);
+ }
+
+ private static void checkLinkEnd(final Link link, final Node node, final ILogger logger) {
+ EObject _eContainer = node.eContainer();
+ EObject _eContainer_1 = link.eContainer();
+ boolean _equals = Objects.equal(_eContainer, _eContainer_1);
+ if (_equals) {
+ return;
+ } else {
+ StateGraphNode _stateGraphNode = node.getStateGraphNode();
+ boolean _not = (!(_stateGraphNode instanceof TrPoint));
+ if (_not) {
+ logger.logError("subgraph item is not transition point");
+ } else {
+ EObject _eContainer_2 = node.eContainer().eContainer();
+ boolean _not_1 = (!(_eContainer_2 instanceof Node));
+ if (_not_1) {
+ logger.logError("subgraph item is in unexpected container");
+ } else {
+ EObject _eContainer_3 = node.eContainer().eContainer();
+ StateGraphNode _stateGraphNode_1 = ((Node) _eContainer_3).getStateGraphNode();
+ boolean _not_2 = (!(_stateGraphNode_1 instanceof State));
+ if (_not_2) {
+ logger.logError("subgraph item is in unexpected container");
+ } else {
+ EObject _eContainer_4 = node.eContainer().eContainer().eContainer();
+ EObject _eContainer_5 = link.eContainer();
+ boolean _notEquals = (!Objects.equal(_eContainer_4, _eContainer_5));
+ if (_notEquals) {
+ logger.logError("subgraph item is in unexpected container");
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private static void checkNode(final Node it, final ILogger logger) {
+ StateGraphNode _stateGraphNode = it.getStateGraphNode();
+ boolean _equals = Objects.equal(_stateGraphNode, null);
+ if (_equals) {
+ logger.logError("graph doesn\'t point to ROOM state graph node");
+ } else {
+ boolean _eIsProxy = it.getStateGraphNode().eIsProxy();
+ if (_eIsProxy) {
+ logger.logError("unresolved ROOM graph node");
+ } else {
+ EObject _eContainer = it.getStateGraphNode().eContainer();
+ boolean _equals_1 = Objects.equal(_eContainer, null);
+ if (_equals_1) {
+ logger.logError("dangling ROOM graph node");
+ } else {
+ String _name = it.getStateGraphNode().getName();
+ boolean _equals_2 = Objects.equal(_name, null);
+ if (_equals_2) {
+ logger.logError("ROOM graph node without name");
+ } else {
+ Graph _graph = it.getGraph();
+ boolean _equals_3 = Objects.equal(_graph, null);
+ if (_equals_3) {
+ logger.logError("node isn\'t contained in a graph");
+ }
+ }
+ }
+ }
+ }
+ EList<Link> _incoming = it.getIncoming();
+ for (final Link l : _incoming) {
+ StateGraphNode _stateGraphNode_1 = l.getTarget().getStateGraphNode();
+ StateGraphNode _stateGraphNode_2 = it.getStateGraphNode();
+ boolean _notEquals = (!Objects.equal(_stateGraphNode_1, _stateGraphNode_2));
+ if (_notEquals) {
+ logger.logError("ROOM target node of an incoming transition must be myself");
+ }
+ }
+ EList<Link> _outgoing = it.getOutgoing();
+ for (final Link l_1 : _outgoing) {
+ StateGraphNode _stateGraphNode_3 = l_1.getSource().getStateGraphNode();
+ StateGraphNode _stateGraphNode_4 = it.getStateGraphNode();
+ boolean _notEquals_1 = (!Objects.equal(_stateGraphNode_3, _stateGraphNode_4));
+ if (_notEquals_1) {
+ logger.logError("ROOM source node of an outgoing transition must be myself");
+ }
+ }
+ }
+
+ private static void checkGraph(final Graph it, final ILogger logger) {
+ StateGraph _stateGraph = it.getStateGraph();
+ boolean _equals = Objects.equal(_stateGraph, null);
+ if (_equals) {
+ logger.logError("graph doesn\'t point to ROOM state graph");
+ } else {
+ boolean _eIsProxy = it.getStateGraph().eIsProxy();
+ if (_eIsProxy) {
+ logger.logError("unresolved ROOM graph");
+ } else {
+ EObject _eContainer = it.getStateGraph().eContainer();
+ boolean _equals_1 = Objects.equal(_eContainer, null);
+ if (_equals_1) {
+ logger.logError("dangling ROOM graph");
+ }
+ }
+ }
+ }
+}
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/FsmGenExtensions.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/FsmGenExtensions.java
new file mode 100644
index 000000000..76ea3c4b3
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/FsmGenExtensions.java
@@ -0,0 +1,540 @@
+/**
+ * Copyright (c) 2017 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ */
+package org.eclipse.etrice.core.genmodel.fsm;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Iterators;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.etrice.core.fsm.fSM.CPBranchTransition;
+import org.eclipse.etrice.core.fsm.fSM.ChoicePoint;
+import org.eclipse.etrice.core.fsm.fSM.ContinuationTransition;
+import org.eclipse.etrice.core.fsm.fSM.DetailCode;
+import org.eclipse.etrice.core.fsm.fSM.EntryPoint;
+import org.eclipse.etrice.core.fsm.fSM.ExitPoint;
+import org.eclipse.etrice.core.fsm.fSM.GuardedTransition;
+import org.eclipse.etrice.core.fsm.fSM.InitialTransition;
+import org.eclipse.etrice.core.fsm.fSM.RefinedTransition;
+import org.eclipse.etrice.core.fsm.fSM.State;
+import org.eclipse.etrice.core.fsm.fSM.StateGraphNode;
+import org.eclipse.etrice.core.fsm.fSM.TrPoint;
+import org.eclipse.etrice.core.fsm.fSM.TransitionBase;
+import org.eclipse.etrice.core.fsm.fSM.TransitionPoint;
+import org.eclipse.etrice.core.fsm.fSM.TriggeredTransition;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Graph;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphItem;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Link;
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node;
+import org.eclipse.xtext.xbase.lib.CollectionLiterals;
+import org.eclipse.xtext.xbase.lib.Functions.Function1;
+import org.eclipse.xtext.xbase.lib.IterableExtensions;
+import org.eclipse.xtext.xbase.lib.IteratorExtensions;
+import org.eclipse.xtext.xbase.lib.ListExtensions;
+
+@SuppressWarnings("all")
+public class FsmGenExtensions {
+ public static String _getName(final Node nd) {
+ return nd.getStateGraphNode().getName();
+ }
+
+ public static String _getName(final Link l) {
+ return l.getTransition().getName();
+ }
+
+ public static Iterable<Node> getStateNodes(final Graph g) {
+ final Function1<Node, Boolean> _function = new Function1<Node, Boolean>() {
+ @Override
+ public Boolean apply(final Node it) {
+ StateGraphNode _stateGraphNode = it.getStateGraphNode();
+ return Boolean.valueOf((_stateGraphNode instanceof State));
+ }
+ };
+ return IterableExtensions.<Node>filter(g.getNodes(), _function);
+ }
+
+ public static Iterator<Node> getAllNodes(final Graph g) {
+ return Iterators.<Node>filter(g.eAllContents(), Node.class);
+ }
+
+ public static Iterator<Node> getAllStateNodes(final Graph g) {
+ final Function1<Node, Boolean> _function = new Function1<Node, Boolean>() {
+ @Override
+ public Boolean apply(final Node it) {
+ StateGraphNode _stateGraphNode = it.getStateGraphNode();
+ return Boolean.valueOf((_stateGraphNode instanceof State));
+ }
+ };
+ return IteratorExtensions.<Node>filter(FsmGenExtensions.getAllNodes(g), _function);
+ }
+
+ public static Iterable<Node> getChoicePointNodes(final Graph g) {
+ final Function1<Node, Boolean> _function = new Function1<Node, Boolean>() {
+ @Override
+ public Boolean apply(final Node it) {
+ StateGraphNode _stateGraphNode = it.getStateGraphNode();
+ return Boolean.valueOf((_stateGraphNode instanceof ChoicePoint));
+ }
+ };
+ return IterableExtensions.<Node>filter(g.getNodes(), _function);
+ }
+
+ public static Iterator<Node> getAllChoicePointNodes(final Graph g) {
+ final Function1<Node, Boolean> _function = new Function1<Node, Boolean>() {
+ @Override
+ public Boolean apply(final Node it) {
+ StateGraphNode _stateGraphNode = it.getStateGraphNode();
+ return Boolean.valueOf((_stateGraphNode instanceof ChoicePoint));
+ }
+ };
+ return IteratorExtensions.<Node>filter(FsmGenExtensions.getAllNodes(g), _function);
+ }
+
+ public static Iterable<Node> getTrPointNodes(final Graph g) {
+ final Function1<Node, Boolean> _function = new Function1<Node, Boolean>() {
+ @Override
+ public Boolean apply(final Node it) {
+ StateGraphNode _stateGraphNode = it.getStateGraphNode();
+ return Boolean.valueOf((_stateGraphNode instanceof TrPoint));
+ }
+ };
+ return IterableExtensions.<Node>filter(g.getNodes(), _function);
+ }
+
+ public static Iterator<Node> getAllTrPointNodes(final Graph g) {
+ final Function1<Node, Boolean> _function = new Function1<Node, Boolean>() {
+ @Override
+ public Boolean apply(final Node it) {
+ StateGraphNode _stateGraphNode = it.getStateGraphNode();
+ return Boolean.valueOf((_stateGraphNode instanceof TrPoint));
+ }
+ };
+ return IteratorExtensions.<Node>filter(FsmGenExtensions.getAllNodes(g), _function);
+ }
+
+ public static Iterable<Node> getTransitionPointNodes(final Graph g) {
+ final Function1<Node, Boolean> _function = new Function1<Node, Boolean>() {
+ @Override
+ public Boolean apply(final Node it) {
+ StateGraphNode _stateGraphNode = it.getStateGraphNode();
+ return Boolean.valueOf((_stateGraphNode instanceof TransitionPoint));
+ }
+ };
+ return IterableExtensions.<Node>filter(g.getNodes(), _function);
+ }
+
+ public static Iterator<Node> getAllTransitionPointNodes(final Graph g) {
+ final Function1<Node, Boolean> _function = new Function1<Node, Boolean>() {
+ @Override
+ public Boolean apply(final Node it) {
+ StateGraphNode _stateGraphNode = it.getStateGraphNode();
+ return Boolean.valueOf((_stateGraphNode instanceof TransitionPoint));
+ }
+ };
+ return IteratorExtensions.<Node>filter(FsmGenExtensions.getAllNodes(g), _function);
+ }
+
+ public static Iterable<Node> getEntryPointNodes(final Graph g) {
+ final Function1<Node, Boolean> _function = new Function1<Node, Boolean>() {
+ @Override
+ public Boolean apply(final Node it) {
+ StateGraphNode _stateGraphNode = it.getStateGraphNode();
+ return Boolean.valueOf((_stateGraphNode instanceof EntryPoint));
+ }
+ };
+ return IterableExtensions.<Node>filter(g.getNodes(), _function);
+ }
+
+ public static Iterator<Node> getAllEntryPointNodes(final Graph g) {
+ final Function1<Node, Boolean> _function = new Function1<Node, Boolean>() {
+ @Override
+ public Boolean apply(final Node it) {
+ StateGraphNode _stateGraphNode = it.getStateGraphNode();
+ return Boolean.valueOf((_stateGraphNode instanceof EntryPoint));
+ }
+ };
+ return IteratorExtensions.<Node>filter(FsmGenExtensions.getAllNodes(g), _function);
+ }
+
+ public static Iterable<Node> getExitPointNodes(final Graph g) {
+ final Function1<Node, Boolean> _function = new Function1<Node, Boolean>() {
+ @Override
+ public Boolean apply(final Node it) {
+ StateGraphNode _stateGraphNode = it.getStateGraphNode();
+ return Boolean.valueOf((_stateGraphNode instanceof ExitPoint));
+ }
+ };
+ return IterableExtensions.<Node>filter(g.getNodes(), _function);
+ }
+
+ public static Iterator<Node> getAllExitPointNodes(final Graph g) {
+ final Function1<Node, Boolean> _function = new Function1<Node, Boolean>() {
+ @Override
+ public Boolean apply(final Node it) {
+ StateGraphNode _stateGraphNode = it.getStateGraphNode();
+ return Boolean.valueOf((_stateGraphNode instanceof ExitPoint));
+ }
+ };
+ return IteratorExtensions.<Node>filter(FsmGenExtensions.getAllNodes(g), _function);
+ }
+
+ public static Iterable<State> getStates(final Graph g) {
+ final Function1<Node, StateGraphNode> _function = new Function1<Node, StateGraphNode>() {
+ @Override
+ public StateGraphNode apply(final Node it) {
+ return it.getStateGraphNode();
+ }
+ };
+ return Iterables.<State>filter(IterableExtensions.<Node, StateGraphNode>map(FsmGenExtensions.getStateNodes(g), _function), State.class);
+ }
+
+ public static Iterator<State> getAllStates(final Graph g) {
+ final Function1<Node, StateGraphNode> _function = new Function1<Node, StateGraphNode>() {
+ @Override
+ public StateGraphNode apply(final Node it) {
+ return it.getStateGraphNode();
+ }
+ };
+ return Iterators.<State>filter(IteratorExtensions.<Node, StateGraphNode>map(FsmGenExtensions.getAllStateNodes(g), _function), State.class);
+ }
+
+ public static Iterable<ChoicePoint> getChoicePoints(final Graph g) {
+ final Function1<Node, StateGraphNode> _function = new Function1<Node, StateGraphNode>() {
+ @Override
+ public StateGraphNode apply(final Node it) {
+ return it.getStateGraphNode();
+ }
+ };
+ return Iterables.<ChoicePoint>filter(IterableExtensions.<Node, StateGraphNode>map(FsmGenExtensions.getChoicePointNodes(g), _function), ChoicePoint.class);
+ }
+
+ public static Iterable<TrPoint> getTrPoints(final Graph g) {
+ final Function1<Node, StateGraphNode> _function = new Function1<Node, StateGraphNode>() {
+ @Override
+ public StateGraphNode apply(final Node it) {
+ return it.getStateGraphNode();
+ }
+ };
+ return Iterables.<TrPoint>filter(IterableExtensions.<Node, StateGraphNode>map(FsmGenExtensions.getTrPointNodes(g), _function), TrPoint.class);
+ }
+
+ public static InitialTransition getInitialTransition(final Graph g) {
+ final Function1<Link, TransitionBase> _function = new Function1<Link, TransitionBase>() {
+ @Override
+ public TransitionBase apply(final Link it) {
+ return it.getTransition();
+ }
+ };
+ return IterableExtensions.<InitialTransition>head(Iterables.<InitialTransition>filter(ListExtensions.<Link, TransitionBase>map(g.getLinks(), _function), InitialTransition.class));
+ }
+
+ public static Iterator<Link> getAllLinks(final Graph g) {
+ return Iterators.<Link>filter(g.eAllContents(), Link.class);
+ }
+
+ public static Iterator<Link> getAllInitialTranisitionLinks(final Graph g) {
+ final Function1<Link, Boolean> _function = new Function1<Link, Boolean>() {
+ @Override
+ public Boolean apply(final Link it) {
+ TransitionBase _transition = it.getTransition();
+ return Boolean.valueOf((_transition instanceof InitialTransition));
+ }
+ };
+ return IteratorExtensions.<Link>filter(FsmGenExtensions.getAllLinks(g), _function);
+ }
+
+ public static Iterator<Link> getAllTriggeredTranisitionLinks(final Graph g) {
+ final Function1<Link, Boolean> _function = new Function1<Link, Boolean>() {
+ @Override
+ public Boolean apply(final Link it) {
+ TransitionBase _transition = it.getTransition();
+ return Boolean.valueOf((_transition instanceof TriggeredTransition));
+ }
+ };
+ return IteratorExtensions.<Link>filter(FsmGenExtensions.getAllLinks(g), _function);
+ }
+
+ public static Iterator<Link> getAllContinuationTranisitionLinks(final Graph g) {
+ final Function1<Link, Boolean> _function = new Function1<Link, Boolean>() {
+ @Override
+ public Boolean apply(final Link it) {
+ TransitionBase _transition = it.getTransition();
+ return Boolean.valueOf((_transition instanceof ContinuationTransition));
+ }
+ };
+ return IteratorExtensions.<Link>filter(FsmGenExtensions.getAllLinks(g), _function);
+ }
+
+ public static Iterator<Link> getAllCPBranchTranisitionLinks(final Graph g) {
+ final Function1<Link, Boolean> _function = new Function1<Link, Boolean>() {
+ @Override
+ public Boolean apply(final Link it) {
+ TransitionBase _transition = it.getTransition();
+ return Boolean.valueOf((_transition instanceof CPBranchTransition));
+ }
+ };
+ return IteratorExtensions.<Link>filter(FsmGenExtensions.getAllLinks(g), _function);
+ }
+
+ /**
+ * returns all links whose transitions are chain heads
+ *
+ * @param g a graph
+ * @return all deeply contained links that are chain heads
+ *
+ * @see #isChainHead(Link))
+ */
+ public static Iterator<Link> getAllChainHeads(final Graph g) {
+ final Function1<Link, Boolean> _function = new Function1<Link, Boolean>() {
+ @Override
+ public Boolean apply(final Link it) {
+ return Boolean.valueOf(FsmGenExtensions.isChainHead(it));
+ }
+ };
+ return IteratorExtensions.<Link>filter(FsmGenExtensions.getAllLinks(g), _function);
+ }
+
+ /**
+ * @param l a link
+ * @return {@code true} if the transition associated with this link is a chain head
+ *
+ * @see #isChainHead(TransitionBase))
+ */
+ public static boolean isChainHead(final Link l) {
+ return FsmGenExtensions.isChainHead(l.getTransition());
+ }
+
+ /**
+ * the head of a transition chain is an initial, a guarded or a triggered transition
+ *
+ * @param l a link
+ * @return {@code true} if this transition is of one of the above types
+ */
+ public static boolean isChainHead(final TransitionBase t) {
+ boolean _xifexpression = false;
+ if ((t instanceof RefinedTransition)) {
+ _xifexpression = FsmGenExtensions.isChainHead(((RefinedTransition)t).getTarget());
+ } else {
+ _xifexpression = (((t instanceof InitialTransition) ||
+ (t instanceof GuardedTransition)) ||
+ (t instanceof TriggeredTransition));
+ }
+ return _xifexpression;
+ }
+
+ public static Iterable<Link> getOutgoingTriggeredTransitionLinks(final Node s) {
+ final Function1<Link, Boolean> _function = new Function1<Link, Boolean>() {
+ @Override
+ public Boolean apply(final Link it) {
+ TransitionBase _transition = it.getTransition();
+ return Boolean.valueOf((_transition instanceof TriggeredTransition));
+ }
+ };
+ return IterableExtensions.<Link>filter(s.getOutgoing(), _function);
+ }
+
+ public static Iterable<TriggeredTransition> getOutgoingTriggeredTransitions(final Node s) {
+ final Function1<Link, TransitionBase> _function = new Function1<Link, TransitionBase>() {
+ @Override
+ public TransitionBase apply(final Link it) {
+ return it.getTransition();
+ }
+ };
+ return Iterables.<TriggeredTransition>filter(IterableExtensions.<Link, TransitionBase>map(FsmGenExtensions.getOutgoingTriggeredTransitionLinks(s), _function), TriggeredTransition.class);
+ }
+
+ public static List<TransitionBase> getOutgoingTransitionsHierarchically(final Node s) {
+ final Function1<Link, TransitionBase> _function = new Function1<Link, TransitionBase>() {
+ @Override
+ public TransitionBase apply(final Link it) {
+ return it.getTransition();
+ }
+ };
+ return ListExtensions.<Link, TransitionBase>map(FsmGenExtensions.getOutgoingLinksHierarchically(s), _function);
+ }
+
+ public static ArrayList<Link> getOutgoingLinksHierarchically(final Node s) {
+ final ArrayList<Link> result = CollectionLiterals.<Link>newArrayList();
+ Node current = s;
+ while ((current != null)) {
+ {
+ result.addAll(s.getOutgoing());
+ final Function1<Node, EList<Link>> _function = new Function1<Node, EList<Link>>() {
+ @Override
+ public EList<Link> apply(final Node it) {
+ return it.getOutgoing();
+ }
+ };
+ Iterables.<Link>addAll(result, Iterables.<Link>concat(IterableExtensions.<Node, EList<Link>>map(FsmGenExtensions.getTransitionPointNodes(s.getGraph()), _function)));
+ current = FsmGenExtensions.getParentState(current);
+ }
+ }
+ return result;
+ }
+
+ public static boolean isTopLevel(final Graph g) {
+ boolean _xifexpression = false;
+ if ((g != null)) {
+ EObject _eContainer = g.eContainer();
+ _xifexpression = (_eContainer instanceof GraphContainer);
+ } else {
+ _xifexpression = true;
+ }
+ return _xifexpression;
+ }
+
+ public static boolean isEmpty(final Graph g) {
+ return ((g == null) || (g.getNodes().isEmpty() && g.getLinks().isEmpty()));
+ }
+
+ public static boolean isLeaf(final Node n) {
+ Graph _subgraph = n.getSubgraph();
+ return (_subgraph == null);
+ }
+
+ public static boolean isTopLevel(final Node n) {
+ return FsmGenExtensions.isTopLevel(n.getGraph());
+ }
+
+ public static Node getParentState(final Node n) {
+ Node _xifexpression = null;
+ boolean _isTopLevel = FsmGenExtensions.isTopLevel(n);
+ if (_isTopLevel) {
+ _xifexpression = null;
+ } else {
+ EObject _eContainer = n.getGraph().eContainer();
+ _xifexpression = ((Node) _eContainer);
+ }
+ return _xifexpression;
+ }
+
+ public static Link getChoicepointDefaultBranch(final Node n) {
+ StateGraphNode _stateGraphNode = n.getStateGraphNode();
+ boolean _not = (!(_stateGraphNode instanceof ChoicePoint));
+ if (_not) {
+ return null;
+ }
+ final Function1<Link, Boolean> _function = new Function1<Link, Boolean>() {
+ @Override
+ public Boolean apply(final Link it) {
+ TransitionBase _transition = it.getTransition();
+ return Boolean.valueOf((_transition instanceof ContinuationTransition));
+ }
+ };
+ return IterableExtensions.<Link>head(IterableExtensions.<Link>filter(n.getOutgoing(), _function));
+ }
+
+ public static Node getParentState(final Link l) {
+ Node _xifexpression = null;
+ boolean _isTopLevel = FsmGenExtensions.isTopLevel(l.getGraph());
+ if (_isTopLevel) {
+ _xifexpression = null;
+ } else {
+ EObject _eContainer = l.getGraph().eContainer();
+ _xifexpression = ((Node) _eContainer);
+ }
+ return _xifexpression;
+ }
+
+ public static boolean isHandler(final Link l) {
+ boolean _xblockexpression = false;
+ {
+ final StateGraphNode sourceNode = l.getSource().getStateGraphNode();
+ boolean _xifexpression = false;
+ if ((sourceNode instanceof TransitionPoint)) {
+ _xifexpression = ((TransitionPoint)sourceNode).isHandler();
+ } else {
+ _xifexpression = false;
+ }
+ _xblockexpression = _xifexpression;
+ }
+ return _xblockexpression;
+ }
+
+ public static List<DetailCode> getAllDetailCodes(final Graph graph) {
+ final ArrayList<DetailCode> detailCodes = CollectionLiterals.<DetailCode>newArrayList();
+ if ((graph != null)) {
+ final Function1<Link, TransitionBase> _function = new Function1<Link, TransitionBase>() {
+ @Override
+ public TransitionBase apply(final Link it) {
+ return it.getTransition();
+ }
+ };
+ final Iterator<TransitionBase> allTransitions = IteratorExtensions.<Link, TransitionBase>map(FsmGenExtensions.getAllLinks(graph), _function);
+ final Function1<TransitionBase, DetailCode> _function_1 = new Function1<TransitionBase, DetailCode>() {
+ @Override
+ public DetailCode apply(final TransitionBase it) {
+ return it.getAction();
+ }
+ };
+ List<DetailCode> _list = IteratorExtensions.<DetailCode>toList(IteratorExtensions.<TransitionBase, DetailCode>map(allTransitions, _function_1));
+ Iterables.<DetailCode>addAll(detailCodes, _list);
+ final Function1<Node, StateGraphNode> _function_2 = new Function1<Node, StateGraphNode>() {
+ @Override
+ public StateGraphNode apply(final Node it) {
+ return it.getStateGraphNode();
+ }
+ };
+ final Iterator<State> allStates = Iterators.<State>filter(IteratorExtensions.<Node, StateGraphNode>map(FsmGenExtensions.getAllStateNodes(graph), _function_2), State.class);
+ final Function1<State, DetailCode> _function_3 = new Function1<State, DetailCode>() {
+ @Override
+ public DetailCode apply(final State it) {
+ return it.getEntryCode();
+ }
+ };
+ List<DetailCode> _list_1 = IteratorExtensions.<DetailCode>toList(IteratorExtensions.<State, DetailCode>map(allStates, _function_3));
+ Iterables.<DetailCode>addAll(detailCodes, _list_1);
+ final Function1<State, DetailCode> _function_4 = new Function1<State, DetailCode>() {
+ @Override
+ public DetailCode apply(final State it) {
+ return it.getDoCode();
+ }
+ };
+ List<DetailCode> _list_2 = IteratorExtensions.<DetailCode>toList(IteratorExtensions.<State, DetailCode>map(allStates, _function_4));
+ Iterables.<DetailCode>addAll(detailCodes, _list_2);
+ final Function1<State, DetailCode> _function_5 = new Function1<State, DetailCode>() {
+ @Override
+ public DetailCode apply(final State it) {
+ return it.getExitCode();
+ }
+ };
+ List<DetailCode> _list_3 = IteratorExtensions.<DetailCode>toList(IteratorExtensions.<State, DetailCode>map(allStates, _function_5));
+ Iterables.<DetailCode>addAll(detailCodes, _list_3);
+ }
+ return detailCodes;
+ }
+
+ public static Link getLinkFor(final GraphContainer gc, final TransitionBase t) {
+ final Function1<Link, Boolean> _function = new Function1<Link, Boolean>() {
+ @Override
+ public Boolean apply(final Link it) {
+ TransitionBase _transition = it.getTransition();
+ return Boolean.valueOf((_transition == t));
+ }
+ };
+ return IteratorExtensions.<Link>findFirst(FsmGenExtensions.getAllLinks(gc.getGraph()), _function);
+ }
+
+ public static String getName(final GraphItem l) {
+ if (l instanceof Link) {
+ return _getName((Link)l);
+ } else if (l instanceof Node) {
+ return _getName((Node)l);
+ } else {
+ throw new IllegalArgumentException("Unhandled parameter types: " +
+ Arrays.<Object>asList(l).toString());
+ }
+ }
+}
diff --git a/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/TriggerExtensions.java b/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/TriggerExtensions.java
new file mode 100644
index 000000000..dc45ccf27
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.genmodel.fsm/xtend-gen/org/eclipse/etrice/core/genmodel/fsm/TriggerExtensions.java
@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) 2017 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Henrik Rentz-Reichert (initial contribution)
+ */
+package org.eclipse.etrice.core.genmodel.fsm;
+
+import com.google.common.base.Objects;
+import com.google.inject.Inject;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.etrice.core.fsm.fSM.MessageFromIf;
+import org.eclipse.etrice.core.fsm.fSM.Trigger;
+import org.eclipse.etrice.core.fsm.naming.FSMNameProvider;
+import org.eclipse.xtext.xbase.lib.Extension;
+
+@SuppressWarnings("all")
+public class TriggerExtensions {
+ public static String TRIGGER_SEP = "#";
+
+ @Inject
+ @Extension
+ protected FSMNameProvider _fSMNameProvider;
+
+ public String getTriggerTag(final MessageFromIf it) {
+ String _name = it.getFrom().getName();
+ String _plus = (_name + TriggerExtensions.TRIGGER_SEP);
+ String _messageName = this._fSMNameProvider.getMessageName(it.getMessage());
+ return (_plus + _messageName);
+ }
+
+ public boolean isMatching(final Trigger trig, final String trigstr) {
+ EList<MessageFromIf> _msgFromIfPairs = trig.getMsgFromIfPairs();
+ for (final MessageFromIf mif : _msgFromIfPairs) {
+ {
+ final String tr = this.getTriggerTag(mif);
+ boolean _equals = Objects.equal(tr, trigstr);
+ if (_equals) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+}

Back to the top