Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2010-12-17 23:39:44 +0000
committerHenrik Rentz-Reichert2010-12-17 23:39:44 +0000
commita18223dad8781158e889261776110780c401525d (patch)
tree8550318ab83de220e8e5be978d3d0501e5651fa0 /plugins/org.eclipse.etrice.generator
downloadorg.eclipse.etrice-a18223dad8781158e889261776110780c401525d.tar.gz
org.eclipse.etrice-a18223dad8781158e889261776110780c401525d.tar.xz
org.eclipse.etrice-a18223dad8781158e889261776110780c401525d.zip
initial contribution (cf. http://dev.eclipse.org/ipzilla/show_bug.cgi?id=4670)
Diffstat (limited to 'plugins/org.eclipse.etrice.generator')
-rw-r--r--plugins/org.eclipse.etrice.generator/.gitignore1
-rw-r--r--plugins/org.eclipse.etrice.generator/META-INF/MANIFEST.MF41
-rw-r--r--plugins/org.eclipse.etrice.generator/about.html28
-rw-r--r--plugins/org.eclipse.etrice.generator/build.properties14
-rw-r--r--plugins/org.eclipse.etrice.generator/model/etricegen.ecore197
-rw-r--r--plugins/org.eclipse.etrice.generator/model/etricegen.genmodel161
-rw-r--r--plugins/org.eclipse.etrice.generator/model/howto.txt3
-rw-r--r--plugins/org.eclipse.etrice.generator/plugin.properties8
-rw-r--r--plugins/org.eclipse.etrice.generator/plugin.xml21
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/builder/ILogger.java21
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/builder/InstanceModelBuilder.java762
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/builder/ValidationException.java25
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ActiveTrigger.java131
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ActorInstance.java54
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/BindingInstance.java48
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ConnectionInstance.java140
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/Counter.java72
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ETriceGenFactory.java172
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ETriceGenPackage.java2577
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ExpandedActorClass.java233
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/IDiagnostician.java13
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ITransitionChainVisitor.java24
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/InstanceBase.java103
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/InterfaceItemInstance.java44
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/PortInstance.java105
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/PortKind.java239
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/Root.java170
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/SAPInstance.java54
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/SPPInstance.java103
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ServiceImplInstance.java54
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/StructureInstance.java180
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/SubSystemInstance.java81
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/TransitionChain.java81
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ActiveTriggerImpl.java333
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ActorInstanceImpl.java157
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/BindingInstanceImpl.java171
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ConnectionInstanceImpl.java424
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/CounterImpl.java187
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ETriceGenFactoryImpl.java304
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ETriceGenPackageImpl.java1120
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ExpandedActorClassImpl.java1191
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/InstanceBaseImpl.java254
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/InterfaceItemInstanceImpl.java135
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/PortInstanceImpl.java294
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/RootImpl.java590
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/SAPInstanceImpl.java158
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/SPPInstanceImpl.java318
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ServiceImplInstanceImpl.java160
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/StructureInstanceImpl.java473
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/SubSystemInstanceImpl.java241
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/TransitionChainImpl.java302
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/util/ETriceGenAdapterFactory.java507
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/util/ETriceGenResourceFactoryImpl.java45
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/util/ETriceGenResourceImpl.java32
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/util/ETriceGenSwitch.java557
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ActiveTriggerValidator.java28
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ActorInstanceValidator.java21
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/BindingInstanceValidator.java23
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ConnectionInstanceValidator.java26
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/CounterValidator.java20
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ExpandedActorClassValidator.java21
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/IDiagnosticianValidator.java19
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ITransitionChainVisitorValidator.java19
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/InstanceBaseValidator.java22
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/InterfaceItemInstanceValidator.java23
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/PortInstanceValidator.java28
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/RootValidator.java37
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/SAPInstanceValidator.java21
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/SPPInstanceValidator.java27
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ServiceImplInstanceValidator.java21
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/StructureInstanceValidator.java38
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/SubSystemInstanceValidator.java23
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/TransitionChainValidator.java24
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/workflow/InstanceModelCreator.java108
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/workflow/WorkflowComponentWithTwoSlots.java44
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/workflow/WorkflowDiagnostician.java64
-rw-r--r--plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/workflow/XtendStdlibLogger.java49
-rw-r--r--plugins/org.eclipse.etrice.generator/text/description.txt120
78 files changed, 14739 insertions, 0 deletions
diff --git a/plugins/org.eclipse.etrice.generator/.gitignore b/plugins/org.eclipse.etrice.generator/.gitignore
new file mode 100644
index 000000000..ba077a403
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/.gitignore
@@ -0,0 +1 @@
+bin
diff --git a/plugins/org.eclipse.etrice.generator/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.generator/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..0a9d54ef4
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/META-INF/MANIFEST.MF
@@ -0,0 +1,41 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: eTrice Generator Model
+Bundle-SymbolicName: org.eclipse.etrice.generator;singleton:=true
+Bundle-Version: 0.1.0
+Bundle-ClassPath: .
+Bundle-Vendor: eTrice (Incubation)
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6,
+ J2SE-1.5
+Export-Package: org.eclipse.etrice.generator.builder;uses:="org.eclipse.emf.ecore,org.eclipse.etrice.generator.etricegen",
+ org.eclipse.etrice.generator.etricegen;uses:="org.eclipse.emf.ecore,org.eclipse.emf.common.util,org.eclipse.etrice.core.room",
+ org.eclipse.etrice.generator.etricegen.impl;
+ uses:="org.eclipse.emf.ecore,
+ org.eclipse.emf.common.util,
+ org.eclipse.etrice.core.room.impl,
+ org.eclipse.etrice.core.room,
+ org.eclipse.etrice.generator.etricegen,
+ org.eclipse.emf.ecore.impl,
+ org.eclipse.emf.common.notify",
+ org.eclipse.etrice.generator.etricegen.util;
+ uses:="org.eclipse.emf.ecore.xmi.impl,
+ org.eclipse.emf.ecore.resource,
+ org.eclipse.emf.ecore,
+ org.eclipse.emf.common.util,
+ org.eclipse.emf.common.notify.impl,
+ org.eclipse.etrice.core.room,
+ org.eclipse.etrice.generator.etricegen,
+ org.eclipse.emf.ecore.resource.impl,
+ org.eclipse.emf.common.notify",
+ org.eclipse.etrice.generator.workflow;
+ uses:="org.eclipse.emf.ecore,
+ org.eclipse.etrice.generator.etricegen,
+ org.eclipse.emf.mwe2.runtime.workflow,
+ org.eclipse.etrice.generator.builder"
+Require-Bundle: org.eclipse.etrice.core.room;bundle-version="0.1.0",
+ org.eclipse.core.runtime;bundle-version="3.6.0",
+ org.eclipse.emf.ecore;bundle-version="2.6.0";visibility:=reexport,
+ org.eclipse.emf.mwe2.runtime;bundle-version="1.0.1",
+ org.eclipse.emf.ecore.xmi;bundle-version="2.5.0",
+ org.eclipse.xtend.util.stdlib;bundle-version="1.0.1"
+Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.etrice.generator/about.html b/plugins/org.eclipse.etrice.generator/about.html
new file mode 100644
index 000000000..f47dbddbb
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.generator/build.properties b/plugins/org.eclipse.etrice.generator/build.properties
new file mode 100644
index 000000000..b10b95c1e
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/build.properties
@@ -0,0 +1,14 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml
+jars.compile.order = .
+source.. = src/,\
+ model/
+output.. = bin/
diff --git a/plugins/org.eclipse.etrice.generator/model/etricegen.ecore b/plugins/org.eclipse.etrice.generator/model/etricegen.ecore
new file mode 100644
index 000000000..a88ff7be9
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/model/etricegen.ecore
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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="etricegen"
+ nsURI="http://www.eclipse.org/etrice/generator" nsPrefix="etricegen">
+ <eClassifiers xsi:type="ecore:EClass" name="Root">
+ <eOperations name="getReferencedModels" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//RoomModel">
+ <eParameters name="cls" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//RoomClass"/>
+ </eOperations>
+ <eOperations name="getReferencedProtocols" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//ProtocolClass">
+ <eParameters name="cls" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//ActorClass"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="subSystems" upperBound="-1"
+ eType="#//SubSystemInstance" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="models" upperBound="-1"
+ eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//RoomModel"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="xpActorClasses" upperBound="-1"
+ eType="#//ExpandedActorClass" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="usedDataClasses" upperBound="-1"
+ eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//DataClass"
+ volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="usedProtocolClasses" upperBound="-1"
+ eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//ProtocolClass"
+ volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="usedActorClasses" upperBound="-1"
+ eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//ActorClass"
+ volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="usedRoomModels" upperBound="-1"
+ eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//RoomModel"
+ volatile="true" transient="true" derived="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Counter">
+ <eOperations name="getAndIncrementCount" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="return getAndIncrementCount(1);"/>
+ </eAnnotations>
+ </eOperations>
+ <eOperations name="getAndIncrementCount" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="body" value="int count = getCounter();&#xD;&#xA;setCounter(count+n);&#xD;&#xA;return count;"/>
+ </eAnnotations>
+ <eParameters name="n" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="counter" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
+ defaultValueLiteral="0"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="InstanceBase" abstract="true">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="path" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
+ changeable="false" volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="objId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="StructureInstance" eSuperTypes="#//InstanceBase">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="instances" upperBound="-1"
+ eType="#//ActorInstance" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ports" upperBound="-1"
+ eType="#//PortInstance" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="saps" upperBound="-1" eType="#//SAPInstance"
+ containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="spps" upperBound="-1" eType="#//SPPInstance"
+ containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="services" upperBound="-1"
+ eType="#//ServiceImplInstance" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="bindings" upperBound="-1"
+ eType="#//BindingInstance" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="connections" upperBound="-1"
+ eType="#//ConnectionInstance" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="allContainedInstances"
+ upperBound="-1" eType="#//ActorInstance" volatile="true" transient="true"
+ derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="orderedIfItemInstances"
+ upperBound="-1" eType="#//InterfaceItemInstance" changeable="false" transient="true"
+ derived="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="SubSystemInstance" eSuperTypes="#//StructureInstance">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="subSystemClass" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//SubSystemClass"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="objCounter" eType="#//Counter"
+ containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ActorInstance" eSuperTypes="#//StructureInstance">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="actorClass" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//ActorClass"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="InterfaceItemInstance" eSuperTypes="#//InstanceBase">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="peers" upperBound="-1"
+ eType="#//InterfaceItemInstance"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="PortInstance" eSuperTypes="#//InterfaceItemInstance">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="port" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//Port"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//PortKind"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="bindings" upperBound="-1"
+ eType="#//BindingInstance" eOpposite="#//BindingInstance/ports"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EEnum" name="PortKind">
+ <eLiterals name="external" literal="external"/>
+ <eLiterals name="internal" value="1" literal="internal"/>
+ <eLiterals name="relay" value="2" literal="relay"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="BindingInstance">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ports" upperBound="2" eType="#//PortInstance"
+ eOpposite="#//PortInstance/bindings"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="SAPInstance" eSuperTypes="#//InterfaceItemInstance">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="sap" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//SAPRef"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="SPPInstance" eSuperTypes="#//InstanceBase">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="spp" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//SPPRef"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="incoming" upperBound="-1"
+ eType="#//ConnectionInstance" eOpposite="#//ConnectionInstance/toSPP"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="outgoing" eType="#//ConnectionInstance"
+ eOpposite="#//ConnectionInstance/fromSPP"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ServiceImplInstance" eSuperTypes="#//InterfaceItemInstance">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="svcImpl" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//ServiceImplementation"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ConnectionInstance">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="fromAI" eType="#//ActorInstance"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="fromSPP" eType="#//SPPInstance"
+ eOpposite="#//SPPInstance/outgoing"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="toSPP" eType="#//SPPInstance"
+ eOpposite="#//SPPInstance/incoming"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="connection" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//LayerConnection"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ActiveTrigger">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="msg" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//Message"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ifitem" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//InterfaceItem"/>
+ <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.room/src-gen/org/eclipse/etrice/core/Room.ecore#//TriggeredTransition"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="TransitionChain">
+ <eOperations name="getStateContext" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.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.room/src-gen/org/eclipse/etrice/core/Room.ecore#//Transition"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ITransitionChainVisitor" instanceTypeName="ITransitionChainVisitor"
+ abstract="true" interface="true"/>
+ <eClassifiers xsi:type="ecore:EClass" name="IDiagnostician" instanceTypeName="IDiagnostician"
+ abstract="true" interface="true"/>
+ <eClassifiers xsi:type="ecore:EClass" name="ExpandedActorClass" eSuperTypes="../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//ActorClass">
+ <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.room/src-gen/org/eclipse/etrice/core/Room.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.room/src-gen/org/eclipse/etrice/core/Room.ecore#//StateGraphItem"/>
+ </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.room/src-gen/org/eclipse/etrice/core/Room.ecore#//InterfaceItem"/>
+ </eOperations>
+ <eOperations name="hasStateMachine" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <eOperations name="getCode" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eParameters name="code" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//DetailCode"/>
+ </eOperations>
+ <eOperations name="getTriggerCodeName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eParameters name="mif" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//MessageFromIf"/>
+ </eOperations>
+ <eOperations name="getTriggerCodeName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eParameters name="mif" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eOperations>
+ <eOperations name="getOutgoingTransitions" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//Transition">
+ <eParameters name="node" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//StateGraphNode"/>
+ </eOperations>
+ <eOperations name="getIncomingTransitions" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//Transition">
+ <eParameters name="node" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//StateGraphNode"/>
+ </eOperations>
+ <eOperations name="getActiveTriggers" upperBound="-1" eType="#//ActiveTrigger">
+ <eParameters name="state" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//State"/>
+ </eOperations>
+ <eOperations name="getTriggers" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//MessageFromIf"/>
+ <eOperations name="getOwnTriggers" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.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.room/src-gen/org/eclipse/etrice/core/Room.ecore#//MessageFromIf"/>
+ </eOperations>
+ <eOperations name="getChain" eType="#//TransitionChain">
+ <eParameters name="trans" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//Transition"/>
+ </eOperations>
+ <eOperations name="getTransitionChains" upperBound="-1" eType="#//TransitionChain"/>
+ <eOperations name="getOwnTransitionChains" upperBound="-1" eType="#//TransitionChain"/>
+ <eOperations name="getNode" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//StateGraphNode">
+ <eParameters name="tt" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//TransitionTerminal"/>
+ </eOperations>
+ <eOperations name="isMatching" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eParameters name="trig" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.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.room/src-gen/org/eclipse/etrice/core/Room.ecore#//ContinuationTransition">
+ <eParameters name="out" upperBound="-1" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//Transition"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="actorClass" eType="ecore:EClass ../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.ecore#//ActorClass"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/org.eclipse.etrice.generator/model/etricegen.genmodel b/plugins/org.eclipse.etrice.generator/model/etricegen.genmodel
new file mode 100644
index 000000000..b7e307563
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/model/etricegen.genmodel
@@ -0,0 +1,161 @@
+<?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=""
+ modelDirectory="/org.eclipse.etrice.generator/src" modelPluginID="org.eclipse.etrice.generator"
+ modelName="eTriceGen" importerID="org.eclipse.emf.importer.ecore" complianceLevel="6.0"
+ copyrightFields="false" usedGenPackages="../../org.eclipse.etrice.core.room/src-gen/org/eclipse/etrice/core/Room.genmodel#//room">
+ <foreignModel>roomgen.ecore</foreignModel>
+ <genPackages prefix="ETriceGen" basePackage="org.eclipse.etrice.generator" resource="XMI"
+ disposableProviderFactory="true" ecorePackage="etricegen.ecore#/">
+ <genEnums typeSafeEnumCompatible="false" ecoreEnum="etricegen.ecore#//PortKind">
+ <genEnumLiterals ecoreEnumLiteral="etricegen.ecore#//PortKind/external"/>
+ <genEnumLiterals ecoreEnumLiteral="etricegen.ecore#//PortKind/internal"/>
+ <genEnumLiterals ecoreEnumLiteral="etricegen.ecore#//PortKind/relay"/>
+ </genEnums>
+ <genClasses ecoreClass="etricegen.ecore#//Root">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference etricegen.ecore#//Root/subSystems"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//Root/models"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference etricegen.ecore#//Root/xpActorClasses"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//Root/usedDataClasses"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//Root/usedProtocolClasses"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//Root/usedActorClasses"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//Root/usedRoomModels"/>
+ <genOperations ecoreOperation="etricegen.ecore#//Root/getReferencedModels">
+ <genParameters ecoreParameter="etricegen.ecore#//Root/getReferencedModels/cls"/>
+ </genOperations>
+ <genOperations ecoreOperation="etricegen.ecore#//Root/getReferencedProtocols">
+ <genParameters ecoreParameter="etricegen.ecore#//Root/getReferencedProtocols/cls"/>
+ </genOperations>
+ </genClasses>
+ <genClasses ecoreClass="etricegen.ecore#//Counter">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute etricegen.ecore#//Counter/counter"/>
+ <genOperations ecoreOperation="etricegen.ecore#//Counter/getAndIncrementCount"/>
+ <genOperations ecoreOperation="etricegen.ecore#//Counter/getAndIncrementCount.1">
+ <genParameters ecoreParameter="etricegen.ecore#//Counter/getAndIncrementCount.1/n"/>
+ </genOperations>
+ </genClasses>
+ <genClasses image="false" ecoreClass="etricegen.ecore#//InstanceBase">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute etricegen.ecore#//InstanceBase/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute etricegen.ecore#//InstanceBase/path"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute etricegen.ecore#//InstanceBase/objId"/>
+ </genClasses>
+ <genClasses ecoreClass="etricegen.ecore#//StructureInstance">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference etricegen.ecore#//StructureInstance/instances"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference etricegen.ecore#//StructureInstance/ports"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference etricegen.ecore#//StructureInstance/saps"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference etricegen.ecore#//StructureInstance/spps"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference etricegen.ecore#//StructureInstance/services"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference etricegen.ecore#//StructureInstance/bindings"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference etricegen.ecore#//StructureInstance/connections"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//StructureInstance/allContainedInstances"/>
+ <genFeatures property="Readonly" notify="false" createChild="false" ecoreFeature="ecore:EReference etricegen.ecore#//StructureInstance/orderedIfItemInstances"/>
+ </genClasses>
+ <genClasses ecoreClass="etricegen.ecore#//SubSystemInstance">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//SubSystemInstance/subSystemClass"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference etricegen.ecore#//SubSystemInstance/objCounter"/>
+ </genClasses>
+ <genClasses ecoreClass="etricegen.ecore#//ActorInstance">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//ActorInstance/actorClass"/>
+ </genClasses>
+ <genClasses ecoreClass="etricegen.ecore#//InterfaceItemInstance">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//InterfaceItemInstance/peers"/>
+ </genClasses>
+ <genClasses ecoreClass="etricegen.ecore#//PortInstance">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//PortInstance/port"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute etricegen.ecore#//PortInstance/kind"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//PortInstance/bindings"/>
+ </genClasses>
+ <genClasses ecoreClass="etricegen.ecore#//BindingInstance">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//BindingInstance/ports"/>
+ </genClasses>
+ <genClasses ecoreClass="etricegen.ecore#//SAPInstance">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//SAPInstance/sap"/>
+ </genClasses>
+ <genClasses ecoreClass="etricegen.ecore#//SPPInstance">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//SPPInstance/spp"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//SPPInstance/incoming"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//SPPInstance/outgoing"/>
+ </genClasses>
+ <genClasses ecoreClass="etricegen.ecore#//ServiceImplInstance">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//ServiceImplInstance/svcImpl"/>
+ </genClasses>
+ <genClasses ecoreClass="etricegen.ecore#//ConnectionInstance">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//ConnectionInstance/fromAI"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//ConnectionInstance/fromSPP"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//ConnectionInstance/toSPP"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//ConnectionInstance/connection"/>
+ </genClasses>
+ <genClasses ecoreClass="etricegen.ecore#//ActiveTrigger">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//ActiveTrigger/msg"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//ActiveTrigger/ifitem"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute etricegen.ecore#//ActiveTrigger/trigger"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//ActiveTrigger/transitions"/>
+ </genClasses>
+ <genClasses ecoreClass="etricegen.ecore#//TransitionChain">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//TransitionChain/transition"/>
+ <genOperations ecoreOperation="etricegen.ecore#//TransitionChain/getStateContext"/>
+ <genOperations ecoreOperation="etricegen.ecore#//TransitionChain/isHandler"/>
+ <genOperations ecoreOperation="etricegen.ecore#//TransitionChain/genExecuteChain">
+ <genParameters ecoreParameter="etricegen.ecore#//TransitionChain/genExecuteChain/tcv"/>
+ </genOperations>
+ </genClasses>
+ <genClasses image="false" ecoreClass="etricegen.ecore#//ITransitionChainVisitor"/>
+ <genClasses image="false" ecoreClass="etricegen.ecore#//IDiagnostician"/>
+ <genClasses ecoreClass="etricegen.ecore#//ExpandedActorClass">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference etricegen.ecore#//ExpandedActorClass/actorClass"/>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/prepare">
+ <genParameters ecoreParameter="etricegen.ecore#//ExpandedActorClass/prepare/validator"/>
+ </genOperations>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/release"/>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/addOwnObject">
+ <genParameters ecoreParameter="etricegen.ecore#//ExpandedActorClass/addOwnObject/obj"/>
+ </genOperations>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/isOwnObject">
+ <genParameters ecoreParameter="etricegen.ecore#//ExpandedActorClass/isOwnObject/obj"/>
+ </genOperations>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/getInterfaceItemLocalId">
+ <genParameters ecoreParameter="etricegen.ecore#//ExpandedActorClass/getInterfaceItemLocalId/ifitem"/>
+ </genOperations>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/hasStateMachine"/>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/getCode">
+ <genParameters ecoreParameter="etricegen.ecore#//ExpandedActorClass/getCode/code"/>
+ </genOperations>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/getTriggerCodeName">
+ <genParameters ecoreParameter="etricegen.ecore#//ExpandedActorClass/getTriggerCodeName/mif"/>
+ </genOperations>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/getTriggerCodeName.1">
+ <genParameters ecoreParameter="etricegen.ecore#//ExpandedActorClass/getTriggerCodeName.1/mif"/>
+ </genOperations>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/getOutgoingTransitions">
+ <genParameters ecoreParameter="etricegen.ecore#//ExpandedActorClass/getOutgoingTransitions/node"/>
+ </genOperations>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/getIncomingTransitions">
+ <genParameters ecoreParameter="etricegen.ecore#//ExpandedActorClass/getIncomingTransitions/node"/>
+ </genOperations>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/getActiveTriggers">
+ <genParameters ecoreParameter="etricegen.ecore#//ExpandedActorClass/getActiveTriggers/state"/>
+ </genOperations>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/getTriggers"/>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/getOwnTriggers"/>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/getMessageID">
+ <genParameters ecoreParameter="etricegen.ecore#//ExpandedActorClass/getMessageID/mif"/>
+ </genOperations>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/getChain">
+ <genParameters ecoreParameter="etricegen.ecore#//ExpandedActorClass/getChain/trans"/>
+ </genOperations>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/getTransitionChains"/>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/getOwnTransitionChains"/>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/getNode">
+ <genParameters ecoreParameter="etricegen.ecore#//ExpandedActorClass/getNode/tt"/>
+ </genOperations>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/isMatching">
+ <genParameters ecoreParameter="etricegen.ecore#//ExpandedActorClass/isMatching/trig"/>
+ <genParameters ecoreParameter="etricegen.ecore#//ExpandedActorClass/isMatching/trigstr"/>
+ </genOperations>
+ <genOperations ecoreOperation="etricegen.ecore#//ExpandedActorClass/getDefaultBranch">
+ <genParameters ecoreParameter="etricegen.ecore#//ExpandedActorClass/getDefaultBranch/out"/>
+ </genOperations>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/org.eclipse.etrice.generator/model/howto.txt b/plugins/org.eclipse.etrice.generator/model/howto.txt
new file mode 100644
index 000000000..bc0443211
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/model/howto.txt
@@ -0,0 +1,3 @@
+The instances.ecore model references the Room.ecore model.
+Therefore the instances.genmodel also has to reference the Room.genmodel
+(this can be done in the lower part of the Create Genmodel Wizzard). \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.generator/plugin.properties b/plugins/org.eclipse.etrice.generator/plugin.properties
new file mode 100644
index 000000000..c075509b7
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/plugin.properties
@@ -0,0 +1,8 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+pluginName = eTriceGen Model
+providerName = www.example.org
diff --git a/plugins/org.eclipse.etrice.generator/plugin.xml b/plugins/org.eclipse.etrice.generator/plugin.xml
new file mode 100644
index 000000000..d9f39f2e7
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/plugin.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ <copyright>
+ </copyright>
+
+ $Id$
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="http://www.eclipse.org/etrice/generator"
+ class="org.eclipse.etrice.generator.etricegen.ETriceGenPackage"
+ genModel="model/etricegen.genmodel"/>
+ </extension>
+
+
+</plugin>
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/builder/ILogger.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/builder/ILogger.java
new file mode 100644
index 000000000..e0e233161
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/builder/ILogger.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * 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.generator.builder;
+
+import org.eclipse.emf.ecore.EObject;
+
+public interface ILogger {
+
+ void logInfo(String text);
+ void logError(String text, EObject obj);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/builder/InstanceModelBuilder.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/builder/InstanceModelBuilder.java
new file mode 100644
index 000000000..6b33836bb
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/builder/InstanceModelBuilder.java
@@ -0,0 +1,762 @@
+/*******************************************************************************
+ * 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.generator.builder;
+
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.etrice.core.room.ActorClass;
+import org.eclipse.etrice.core.room.ActorContainerRef;
+import org.eclipse.etrice.core.room.ActorRef;
+import org.eclipse.etrice.core.room.Binding;
+import org.eclipse.etrice.core.room.BindingEndPoint;
+import org.eclipse.etrice.core.room.RefSAPoint;
+import org.eclipse.etrice.core.room.SubSystemClass;
+import org.eclipse.etrice.core.room.ExternalPort;
+import org.eclipse.etrice.core.room.LayerConnection;
+import org.eclipse.etrice.core.room.Port;
+import org.eclipse.etrice.core.room.ProtocolClass;
+import org.eclipse.etrice.core.room.RelaySAPoint;
+import org.eclipse.etrice.core.room.RoomModel;
+import org.eclipse.etrice.core.room.SAPRef;
+import org.eclipse.etrice.core.room.SAPoint;
+import org.eclipse.etrice.core.room.SPPRef;
+import org.eclipse.etrice.core.room.SPPoint;
+import org.eclipse.etrice.core.room.ServiceImplementation;
+import org.eclipse.etrice.core.room.SubSystemRef;
+import org.eclipse.etrice.generator.etricegen.ActorInstance;
+import org.eclipse.etrice.generator.etricegen.BindingInstance;
+import org.eclipse.etrice.generator.etricegen.ConnectionInstance;
+import org.eclipse.etrice.generator.etricegen.Counter;
+import org.eclipse.etrice.generator.etricegen.ETriceGenFactory;
+import org.eclipse.etrice.generator.etricegen.ExpandedActorClass;
+import org.eclipse.etrice.generator.etricegen.IDiagnostician;
+import org.eclipse.etrice.generator.etricegen.PortInstance;
+import org.eclipse.etrice.generator.etricegen.PortKind;
+import org.eclipse.etrice.generator.etricegen.Root;
+import org.eclipse.etrice.generator.etricegen.SAPInstance;
+import org.eclipse.etrice.generator.etricegen.SPPInstance;
+import org.eclipse.etrice.generator.etricegen.ServiceImplInstance;
+import org.eclipse.etrice.generator.etricegen.StructureInstance;
+import org.eclipse.etrice.generator.etricegen.SubSystemInstance;
+import org.eclipse.etrice.generator.etricegen.impl.StructureInstanceImpl;
+
+/**
+ * A class for the creation of an intermediate model combining all information needed by
+ * the code generator.
+ *
+ * @author Henrik Rentz-Reichert
+ *
+ */
+public class InstanceModelBuilder {
+
+ /**
+ * the first object id used for the {@link org.eclipse.etrice.core.etrice.runtime.messaging.Address Address}es s of runtime instances
+ */
+ private static final int OBJ_ID_OFFSET = 100;
+
+ /**
+ * a set containing all relay ports for fast frequent access to this information
+ */
+ private HashSet<Port> relayPorts = new HashSet<Port>();
+
+ /**
+ * an instance of a logger
+ */
+ private ILogger logger;
+
+ /**
+ * an isntance of a diagnostician
+ */
+ private IDiagnostician diagnostician;
+
+ /**
+ * the only constructor takes a logger and a diagnostician as arguments
+ * @param logger
+ * @param diagnostician
+ */
+ public InstanceModelBuilder(ILogger logger, IDiagnostician diagnostician) {
+ this.logger = logger;
+ this.diagnostician = diagnostician;
+ }
+
+ // TODOHRR: combine a RoomProject (.room_proj) with RoomModels (.room)
+
+ /**
+ * Creates a model of all instances for all sub systems.
+ * Actor instances are created in a hierarchical structure.
+ * There is only one list of port per actor instances.
+ * Ports have a type attribute (relay, intern, external).
+ * Bindings connect port instances. And since ports are
+ * instances it is possible to have pointers back to the
+ * bindings.
+ * After creating the instance tree ports are connected to
+ * their peers.
+ * Similar SAPs, Services and layer conenctions are treated.
+ * Finally expanded (xp) actor classes are created which
+ * contain also inherited state graph items and where RefinedStates
+ * are removed and their contents is relocated.
+ *
+ * @param models
+ * @return the root of the newly created instance model
+ */
+ public Root createInstanceModel(List<RoomModel> models) {
+ Root root = ETriceGenFactory.eINSTANCE.createRoot();
+ root.getModels().addAll(models);
+
+ determineRelayPorts(root);
+
+ for (RoomModel model : models) {
+ for (SubSystemClass comp : model.getSubSystemClasses()) {
+ root.getSubSystems().add(createSubSystemInstance(comp));
+ }
+ }
+
+ connectPorts(root);
+ checkPortMultiplicity(root);
+
+ connectServices(root);
+
+ createExpandedActorClasses(root);
+
+ return root;
+ }
+
+ /**
+ * Connect all services hierarchically. This finally connects SAPs with corresponding services
+ * according to layer connections.
+ *
+ * @param root
+ */
+ private void connectServices(Root root) {
+ createServiceMappings(root);
+ bindSAPs(root);
+ }
+
+ /**
+ * Hierarchically create service mappings at each starting point of layer connections (root level).
+ *
+ * @param root
+ */
+ private void createServiceMappings(Root root) {
+ for (SubSystemInstance comp : root.getSubSystems()) {
+ createServiceMappings(comp);
+ }
+ }
+
+ /**
+ * Hierarchically create service mappings at each starting point of layer connections (recursively for all structure instances).
+ *
+ * @see createServiceMappings
+ * @param si
+ */
+ private void createServiceMappings(StructureInstance si) {
+ for (ConnectionInstance ci : si.getConnections()) {
+ if (ci.getFromSPP()==null) {
+ // this connection originates at an actor instance
+ addService(ci.getFromAI(), ci);
+ }
+ else if (ci.getFromSPP().getIncoming().isEmpty()) {
+ // this connection originates at an SPP instance which is not connected outside
+ addService(si, ci);
+ }
+ }
+
+ // recursive call for all children
+ for (ActorInstance child : si.getInstances()) {
+ createServiceMappings(child);
+ }
+ }
+
+ /**
+ * Determines a connected services and attaches it to the protocol2service mapping
+ * of a structure instance
+ *
+ * @param si
+ * @param ci
+ */
+ private void addService(StructureInstance si, ConnectionInstance ci) {
+ assert(si instanceof StructureInstanceImpl): "unknown implementation "+si.eClass().getName();
+ StructureInstanceImpl sii = (StructureInstanceImpl) si;
+
+ ProtocolClass pc = ci.getToSPP().getSpp().getProtocol();
+ if (sii.protocol2service.get(pc)!=null) {
+
+ // this protocol is already handled on this level
+
+ EObject obj = null;
+ if (si instanceof ActorInstance)
+ obj = ((ActorInstance)si).getActorClass();
+ else if (si instanceof SubSystemInstance)
+ obj = ((SubSystemInstance)si).getSubSystemClass();
+ else
+ obj = si;
+ diagnostician.error("A service can only be offered once per actor instance, consider pushing one down to a contained actor!", obj);
+ }
+ else {
+ if (ci.getFromSPP()!=null && ci.getFromSPP().getSpp().getProtocol()!=pc) {
+ diagnostician.error("Layer connection must connect same protocols!", ci.getConnection());
+ }
+ else {
+ // now we follow the layer connections
+ while(true) {
+ SPPInstance sppi = ci.getToSPP();
+ if (sppi.getOutgoing()==null) {
+ // we reached the end, find the ServiceImplementation
+ boolean found = false;
+ if (sppi.eContainer() instanceof ActorInstance) {
+ ActorInstance implementor = (ActorInstance) sppi.eContainer();
+ for (ServiceImplInstance svc : implementor.getServices()) {
+ if (svc.getSvcImpl().getSpp()==sppi.getSpp()) {
+ found = true;
+ sii.protocol2service.put(pc, svc);
+ }
+ }
+ }
+ else {
+ assert(false);
+ }
+ if (!found) {
+ diagnostician.error("An SPP mus be connected by a layer connection or implemented by a ServiceImplementation!", sppi.getSpp());
+ }
+ return;
+ }
+ else {
+ ci = sppi.getOutgoing();
+ if (ci.getToSPP().getSpp().getProtocol()!=pc) {
+ diagnostician.error("Layer connection must connect same protocols!", ci.getConnection());
+ return;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Connect a SAP to its service (root level)
+ *
+ * @param root
+ */
+ private void bindSAPs(Root root) {
+ for (SubSystemInstance comp : root.getSubSystems()) {
+ bindSAPs(comp);
+ setServiceObjectIDs(comp, comp.getObjCounter());
+ }
+ }
+
+ /**
+ * Connect a SAP to its service (recursively for all structure instances).
+ *
+ * @param si
+ */
+ private void bindSAPs(StructureInstance si) {
+ for (SAPInstance sap : si.getSaps()) {
+ bindSAP(si, sap);
+ }
+
+ // recursive call for all children
+ for (ActorInstance child : si.getInstances()) {
+ bindSAPs(child);
+ }
+ }
+
+ /**
+ * Do the actual binding of a SAP.
+ *
+ * @param si
+ * @param sap
+ */
+ private void bindSAP(StructureInstance si, SAPInstance sap) {
+ assert(si instanceof StructureInstanceImpl);
+ StructureInstanceImpl sii = (StructureInstanceImpl) si;
+
+ // walk up the container hierarchy until the sap is satisfied
+ do {
+ ServiceImplInstance svc = sii.protocol2service.get(sap.getSap().getProtocol());
+ if (svc!=null) {
+ sap.getPeers().add(svc);
+ svc.getPeers().add(sap);
+ return;
+ }
+ if (sii.eContainer() instanceof StructureInstanceImpl)
+ sii = (StructureInstanceImpl) sii.eContainer();
+ else
+ sii = null;
+ }
+ while (sii!=null);
+
+ diagnostician.error("SAP not satisfied!", sap.getSap());
+ }
+
+ /**
+ * Finally recursively the Address object IDs are calculated and assigned
+ * @param si
+ * @param counter
+ */
+ private void setServiceObjectIDs(StructureInstance si, Counter counter) {
+ for (ServiceImplInstance svc : si.getServices()) {
+ svc.setObjId(counter.getAndIncrementCount(svc.getPeers().size()));
+ }
+
+ // recursive call for all children
+ for (ActorInstance child : si.getInstances()) {
+ setServiceObjectIDs(child, counter);
+ }
+ }
+
+ /**
+ * for efficiency reasons we create a set holding all relay ports
+ * @param root - the root object
+ */
+ private void determineRelayPorts(Root root) {
+ for (RoomModel model : root.getModels()) {
+ for (ActorClass ac : model.getActorClasses()) {
+ for (Port port : ac.getIfPorts()) {
+ boolean external = false;
+ for (ExternalPort ep : ac.getExtPorts()) {
+ if (ep.getIfport()==port) {
+ external = true;
+ break;
+ }
+ }
+ if (!external) {
+ relayPorts.add(port);
+
+ // check whether relay port is multiply connected
+ int count = 0;
+ for (Binding b : ac.getBindings()) {
+ if (b.getEndpoint1().getPort()==port)
+ ++count;
+ if (b.getEndpoint2().getPort()==port)
+ ++count;
+ }
+ if (count>1)
+ diagnostician.error("relay port is multiply connected inside its actor class", port);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * hierarchically (i.e. recursively) creates all instances implied by this component
+ * @param comp - the component class
+ * @return the newly created hierarchy of instances
+ */
+ private SubSystemInstance createSubSystemInstance(SubSystemClass comp) {
+ logger.logInfo("InstanceModelBuilder: creating component instance from "+comp.getName());
+
+ SubSystemInstance instance = ETriceGenFactory.eINSTANCE.createSubSystemInstance();
+
+ instance.setName(comp.getName());
+ Counter objCounter = ETriceGenFactory.eINSTANCE.createCounter();
+ objCounter.setCounter(OBJ_ID_OFFSET);
+ instance.setObjCounter(objCounter);
+ instance.setObjId(objCounter.getAndIncrementCount());
+ instance.setSubSystemClass(comp);
+
+ for (ActorRef ar : comp.getActorRefs()) {
+ instance.getInstances().add(recursivelyCreateActorInstances(objCounter, ar));
+ }
+
+ // bindings are handled now since port instances of sub-actor instances are available
+ createBindingInstances(instance, comp.getBindings());
+ createConnectionInstances(instance, comp.getConnections());
+
+ return instance;
+ }
+
+ /**
+ * hierarchically (i.e. recursively) creates all instances implied by this actor
+ * @param instance - the root component instance
+ * @param aref - create the instance sub-tree of this actor reference
+ * @return the newly created actor instance
+ */
+ private ActorInstance recursivelyCreateActorInstances(Counter objCounter, ActorRef aref) {
+ logger.logInfo("InstanceModelBuilder: creating actor instance "+aref.getName()+" from "+aref.getType().getName());
+
+ ActorInstance ai = ETriceGenFactory.eINSTANCE.createActorInstance();
+
+ ai.setName(aref.getName());
+ ai.setObjId(objCounter.getAndIncrementCount());
+ ActorClass ac = aref.getType();
+ ai.setActorClass(ac);
+
+ // create a list of super classes, super first, sub-classes last
+ LinkedList<ActorClass> classes = new LinkedList<ActorClass>();
+ classes.addFirst(ac);
+ while (ac.getBase()!=null) {
+ ac = ac.getBase();
+ classes.addFirst(ac);
+ }
+
+ // create instances for super classes recursively (ports, actor refs and bindings)
+ // super classes first ensures that actor refs are present when bindings are created
+ for (ActorClass acl : classes) {
+ // first we add our port instances to have them numbered subsequently
+ createPortInstances(objCounter, ai, acl);
+ createServiceRelatedInstances(objCounter, ai, acl);
+
+ // recurse down into sub-actors
+ for (ActorRef ar : acl.getActorRefs()) {
+ ai.getInstances().add(recursivelyCreateActorInstances(objCounter, ar));
+ }
+
+ }
+ for (ActorClass acl : classes) {
+ // bindings are handled now since port instances of sub-actor instances are available
+ createBindingInstances(ai, acl.getBindings());
+ createConnectionInstances(ai, acl.getConnections());
+ }
+
+ return ai;
+ }
+
+ /**
+ * create port instances for every kind of port
+ * @param objCounter - for unique object id used for address creation
+ * @param ai - the currently considered actor instance
+ * @param ac - the actor class (might be a base class)
+ */
+ private void createPortInstances(Counter objCounter, ActorInstance ai,
+ ActorClass ac) {
+ for (ExternalPort port : ac.getExtPorts()) {
+ PortInstance pi = ETriceGenFactory.eINSTANCE.createPortInstance();
+
+ pi.setName(port.getIfport().getName());
+ // replicated ports have subsequent object IDs
+ pi.setObjId(objCounter.getAndIncrementCount(port.getIfport().getMultiplicity()));
+ pi.setPort(port.getIfport());
+ pi.setKind(PortKind.EXTERNAL);
+
+ ai.getPorts().add(pi);
+ }
+ for (Port port : ac.getIntPorts()) {
+ PortInstance pi = ETriceGenFactory.eINSTANCE.createPortInstance();
+
+ pi.setName(port.getName());
+ // replicated ports have subsequent object IDs
+ pi.setObjId(objCounter.getAndIncrementCount(port.getMultiplicity()));
+ pi.setPort(port);
+ pi.setKind(PortKind.INTERNAL);
+
+ ai.getPorts().add(pi);
+ }
+ for (Port port : ac.getIfPorts()) {
+ if (relayPorts.contains(port)) {
+ PortInstance pi = ETriceGenFactory.eINSTANCE.createPortInstance();
+
+ pi.setName(port.getName());
+ // relay ports are not instantiated and thus have no object ID
+ //pi.setObjId(instance.getAndIncrementObjCount());
+ pi.setPort(port);
+ pi.setKind(PortKind.RELAY);
+
+ ai.getPorts().add(pi);
+ }
+ }
+ }
+
+ /**
+ * create sap, spp and service instances
+ * @param objCounter - for unique object id used for address creation
+ * @param ai - the currently considered actor instance
+ * @param ac - the actor class (might be a base class)
+ */
+ private void createServiceRelatedInstances(Counter objCounter, ActorInstance ai,
+ ActorClass ac) {
+ for (SAPRef sap : ac.getStrSAPs()) {
+ SAPInstance si = ETriceGenFactory.eINSTANCE.createSAPInstance();
+ si.setName(sap.getName());
+ si.setObjId(objCounter.getAndIncrementCount());
+ si.setSap(sap);
+
+ ai.getSaps().add(si);
+ }
+ for (SPPRef sap : ac.getIfSPPs()) {
+ SPPInstance si = ETriceGenFactory.eINSTANCE.createSPPInstance();
+ si.setName(sap.getName());
+ // SPPs are not instantiated and thus need no object ID
+ //si.setObjId(objCounter.getAndIncrementCount());
+ si.setSpp(sap);
+
+ ai.getSpps().add(si);
+ }
+ for (ServiceImplementation svcimpl : ac.getServiceImplementations()) {
+ ServiceImplInstance sii = ETriceGenFactory.eINSTANCE.createServiceImplInstance();
+ sii.setName(svcimpl.getSpp().getName());
+ //will set the object ID later when we know all connected saps
+ //sii.setObjId(objCounter.getAndIncrementCount());
+ sii.setSvcImpl(svcimpl);
+
+ ai.getServices().add(sii);
+ }
+ }
+
+ /**
+ * create binding instances. Since bindings connect port instances the ports can point back to their bindings
+ * using EOpposite
+ * @param ai - create bindings for this actor instance
+ * @param bindings - a list of bindings
+ */
+ private void createBindingInstances(StructureInstance ai, EList<Binding> bindings) {
+ for (Binding bind : bindings) {
+ BindingInstance bi = ETriceGenFactory.eINSTANCE.createBindingInstance();
+
+ if (bind.getEndpoint1().getActorRef()==null && bind.getEndpoint2().getActorRef()!=null) {
+ bi.getPorts().add(getPortInstance(ai, bind.getEndpoint1()));
+ bi.getPorts().add(getPortInstance(ai, bind.getEndpoint2()));
+ }
+ else if (bind.getEndpoint1().getActorRef()!=null && bind.getEndpoint2().getActorRef()==null) {
+ bi.getPorts().add(getPortInstance(ai, bind.getEndpoint2()));
+ bi.getPorts().add(getPortInstance(ai, bind.getEndpoint1()));
+ }
+ else if (bind.getEndpoint1().getActorRef()!=null && bind.getEndpoint2().getActorRef()!=null) {
+ bi.getPorts().add(getPortInstance(ai, bind.getEndpoint1()));
+ bi.getPorts().add(getPortInstance(ai, bind.getEndpoint2()));
+ }
+ else {
+ diagnostician.error("binding connects two ports of the same actor", bind, -1);
+ }
+
+ ai.getBindings().add(bi);
+ }
+ }
+
+ /**
+ * Create layer connection instances.
+ * @param si - create layer connections for this actor instance
+ * @param connections - a list of layer connections
+ */
+ private void createConnectionInstances(StructureInstance si, EList<LayerConnection> connections) {
+ for (LayerConnection lc : connections) {
+ ConnectionInstance ci = ETriceGenFactory.eINSTANCE.createConnectionInstance();
+
+ ci.setConnection(lc);
+
+ SAPoint from = lc.getFrom();
+ if (from instanceof RefSAPoint) {
+ if (((RefSAPoint)from).getRef() instanceof ActorRef) {
+ ActorInstance fromAI = getActorInstance(si, ((ActorRef)((RefSAPoint)from).getRef()));
+ ci.setFromAI(fromAI);
+ }
+ else {
+ //TODOHRR: handle SubSystemRef
+ System.err.println("error");
+ }
+ }
+ else if (from instanceof RelaySAPoint) {
+ SPPInstance sppi = getSPPInstance(si, null, ((RelaySAPoint)from).getRelay());
+ if (sppi.getOutgoing()!=null)
+ diagnostician.error("SPPRef has several outgoing layer connections!", sppi.getSpp());
+ ci.setFromSPP(sppi);
+ }
+ else {
+ assert(false): "unknown type of "+from.eClass().getName();
+ }
+
+ SPPoint to = lc.getTo();
+ SPPInstance sppi = getSPPInstance(si, to.getRef(), to.getService());
+ ci.setToSPP(sppi);
+
+ si.getConnections().add(ci);
+ }
+ }
+
+ /**
+ * Returns the endpoint of a layer connection.
+ *
+ * @param si
+ * @param ar
+ * @param spp
+ * @return
+ */
+ private SPPInstance getSPPInstance(StructureInstance si, ActorContainerRef ar, SPPRef spp) {
+ if (ar==null) {
+ for (SPPInstance sppi : si.getSpps()) {
+ if (sppi.getSpp()==spp)
+ return sppi;
+ }
+ }
+ else {
+ if (ar instanceof ActorRef) {
+ ActorInstance subai = getActorInstance(si, (ActorRef)ar);
+ if (subai!=null)
+ return getSPPInstance(subai, null, spp);
+ }
+ else if (ar instanceof SubSystemRef) {
+ // TODOHRR: handle SubSystemRef
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns an actor instances corresponding to an ActorRef.
+ *
+ * @param si
+ * @param ar
+ * @return
+ */
+ private ActorInstance getActorInstance(StructureInstance si, ActorRef ar) {
+ for (ActorInstance subai : si.getInstances()) {
+ if (subai.getName().equals(ar.getName())) {
+ return subai;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * get a port instance for a binding endpoint
+ * @param si - consider this actor instance
+ * @param be - the binding endpoint to match
+ * @return the port instance found
+ */
+ private PortInstance getPortInstance(StructureInstance si, BindingEndPoint be) {
+ if (be.getActorRef()==null) {
+ for (PortInstance pi : si.getPorts()) {
+ if (pi.getPort()==be.getPort()) {
+ if (pi.getKind()==PortKind.EXTERNAL)
+ diagnostician.error("binding connects external end port to sub-actor interface", be.eContainer(), -1);
+ return pi;
+ }
+ }
+ }
+ else {
+ for (ActorInstance subai : si.getInstances()) {
+ if (subai.getName().equals(be.getActorRef().getName())) {
+ for (PortInstance pi : subai.getPorts()) {
+ if (pi.getPort()==be.getPort()) {
+ if (pi.getKind()==PortKind.INTERNAL)
+ diagnostician.error("binding connects to sub-actor internal end port", be.eContainer(), -1);
+ return pi;
+ }
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * set peer ports in the whole instance model
+ * @param root
+ */
+ private void connectPorts(Root root) {
+ TreeIterator<EObject> it = root.eAllContents();
+ while (it.hasNext()) {
+ EObject obj = it.next();
+ if (obj instanceof ActorInstance) {
+ for (PortInstance pi : ((ActorInstance) obj).getPorts()) {
+ if (pi.getKind()!=PortKind.RELAY) {
+ List<PortInstance> peers = getFinalPeers(pi, null);
+ pi.getPeers().addAll(peers);
+ // we don't have to add pi to its peer.peers since we do that once we reach there
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * determine final peers of an end port
+ * @param pi - a end port
+ * @param from - the binding from which we reached pi or null if start
+ * @return a list of final peer port instances (end ports themselves)
+ */
+ private List<PortInstance> getFinalPeers(PortInstance pi, BindingInstance from) {
+ List<PortInstance> peers = new LinkedList<PortInstance>();
+
+ for (BindingInstance bi : pi.getBindings()) {
+ if (bi==from)
+ // skip the binding where we came from
+ continue;
+
+ if (from!=null && from.eContainer()==bi.eContainer())
+ // the container of a binding instance is a StructureInstance
+ // by this we make sure that we go from inside to outside or vice versa
+ continue;
+
+ PortInstance end = (bi.getPorts().get(0)!=pi)? bi.getPorts().get(0) : bi.getPorts().get(1);
+ if (end.getKind()==PortKind.RELAY)
+ // continue recursion
+ peers.addAll(getFinalPeers(end, bi));
+ else
+ // this is a final peer
+ peers.add(end);
+ }
+ return peers;
+ }
+
+ /**
+ * check that the number of peer ports does not exceed the multiplicity of a port
+ * @param root
+ */
+ private void checkPortMultiplicity(Root root) {
+ TreeIterator<EObject> it = root.eAllContents();
+ while (it.hasNext()) {
+ EObject obj = it.next();
+ if (obj instanceof ActorInstance) {
+ ActorInstance ai = (ActorInstance) obj;
+ for (PortInstance pi : ai.getPorts()) {
+ if (pi.getKind()!=PortKind.RELAY) {
+ if (pi.getBindings().size()>pi.getPort().getMultiplicity())
+ diagnostician.error("number of peers "+pi.getBindings().size()
+ + " of port "+pi.getName()
+ +" exceeds multiplicity "+pi.getPort().getMultiplicity()
+ +" in instance "+ai.getPath(), pi);
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * expanded (xp) actor classes are created which
+ * contain also inherited features and where RefinedStates
+ * are removed and their contents is relocated.
+ * @param root - the model root
+ */
+ private void createExpandedActorClasses(Root root) {
+ for (ActorClass ac : root.getUsedActorClasses()) {
+ root.getXpActorClasses().add(createExpandedActorClass(ac));
+ }
+ }
+
+ /**
+ * create an expanded actor class from the original model class
+ * @param ac - the original model class
+ * @return - the newly created expanded actor class
+ */
+ private ExpandedActorClass createExpandedActorClass(ActorClass ac) {
+ logger.logInfo("InstanceModelBuilder: creating expanded actor class from "+ac.getName()
+ +" of "+((RoomModel)ac.eContainer()).getName());
+
+ ExpandedActorClass xpac = ETriceGenFactory.eINSTANCE.createExpandedActorClass();
+ xpac.setName(ac.getName());
+ xpac.setActorClass(ac);
+ xpac.setAbstract(ac.isAbstract());
+
+ xpac.prepare(diagnostician);
+
+ return xpac;
+ }
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/builder/ValidationException.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/builder/ValidationException.java
new file mode 100644
index 000000000..ef29090b6
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/builder/ValidationException.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * 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.generator.builder;
+
+public class ValidationException extends RuntimeException {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2180285017071261665L;
+
+ public ValidationException(String msg) {
+ super(msg);
+ }
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ActiveTrigger.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ActiveTrigger.java
new file mode 100644
index 000000000..d1e664001
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ActiveTrigger.java
@@ -0,0 +1,131 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.etrice.core.room.InterfaceItem;
+import org.eclipse.etrice.core.room.Message;
+import org.eclipse.etrice.core.room.TriggeredTransition;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Active Trigger</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.ActiveTrigger#getMsg <em>Msg</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.ActiveTrigger#getIfitem <em>Ifitem</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.ActiveTrigger#getTrigger <em>Trigger</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.ActiveTrigger#getTransitions <em>Transitions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getActiveTrigger()
+ * @model
+ * @generated
+ */
+public interface ActiveTrigger extends EObject {
+ /**
+ * 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(Message)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getActiveTrigger_Msg()
+ * @model
+ * @generated
+ */
+ Message getMsg();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.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(Message 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(InterfaceItem)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getActiveTrigger_Ifitem()
+ * @model
+ * @generated
+ */
+ InterfaceItem getIfitem();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.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(InterfaceItem 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.generator.etricegen.ETriceGenPackage#getActiveTrigger_Trigger()
+ * @model
+ * @generated
+ */
+ String getTrigger();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.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.room.TriggeredTransition}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Transitions</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>Transitions</em>' reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getActiveTrigger_Transitions()
+ * @model
+ * @generated
+ */
+ EList<TriggeredTransition> getTransitions();
+
+} // ActiveTrigger
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ActorInstance.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ActorInstance.java
new file mode 100644
index 000000000..83282a0be
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ActorInstance.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.etrice.core.room.ActorClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Actor Instance</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.ActorInstance#getActorClass <em>Actor Class</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getActorInstance()
+ * @model
+ * @generated
+ */
+public interface ActorInstance extends StructureInstance {
+ /**
+ * Returns the value of the '<em><b>Actor Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Actor Class</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Actor Class</em>' reference.
+ * @see #setActorClass(ActorClass)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getActorInstance_ActorClass()
+ * @model
+ * @generated
+ */
+ ActorClass getActorClass();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.ActorInstance#getActorClass <em>Actor Class</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Actor Class</em>' reference.
+ * @see #getActorClass()
+ * @generated
+ */
+ void setActorClass(ActorClass value);
+
+} // ActorInstance
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/BindingInstance.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/BindingInstance.java
new file mode 100644
index 000000000..7690cd2a7
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/BindingInstance.java
@@ -0,0 +1,48 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Binding Instance</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.BindingInstance#getPorts <em>Ports</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getBindingInstance()
+ * @model
+ * @generated
+ */
+public interface BindingInstance extends EObject {
+ /**
+ * Returns the value of the '<em><b>Ports</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.etrice.generator.etricegen.PortInstance}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.generator.etricegen.PortInstance#getBindings <em>Bindings</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Ports</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>Ports</em>' reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getBindingInstance_Ports()
+ * @see org.eclipse.etrice.generator.etricegen.PortInstance#getBindings
+ * @model opposite="bindings" upper="2"
+ * @generated
+ */
+ EList<PortInstance> getPorts();
+
+} // BindingInstance
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ConnectionInstance.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ConnectionInstance.java
new file mode 100644
index 000000000..1bc257cd0
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ConnectionInstance.java
@@ -0,0 +1,140 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.etrice.core.room.LayerConnection;
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Connection Instance</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.ConnectionInstance#getFromAI <em>From AI</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.ConnectionInstance#getFromSPP <em>From SPP</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.ConnectionInstance#getToSPP <em>To SPP</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.ConnectionInstance#getConnection <em>Connection</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getConnectionInstance()
+ * @model
+ * @generated
+ */
+public interface ConnectionInstance extends EObject {
+ /**
+ * Returns the value of the '<em><b>From AI</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>From AI</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>From AI</em>' reference.
+ * @see #setFromAI(ActorInstance)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getConnectionInstance_FromAI()
+ * @model
+ * @generated
+ */
+ ActorInstance getFromAI();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.ConnectionInstance#getFromAI <em>From AI</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>From AI</em>' reference.
+ * @see #getFromAI()
+ * @generated
+ */
+ void setFromAI(ActorInstance value);
+
+ /**
+ * Returns the value of the '<em><b>From SPP</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.generator.etricegen.SPPInstance#getOutgoing <em>Outgoing</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>From SPP</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>From SPP</em>' reference.
+ * @see #setFromSPP(SPPInstance)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getConnectionInstance_FromSPP()
+ * @see org.eclipse.etrice.generator.etricegen.SPPInstance#getOutgoing
+ * @model opposite="outgoing"
+ * @generated
+ */
+ SPPInstance getFromSPP();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.ConnectionInstance#getFromSPP <em>From SPP</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>From SPP</em>' reference.
+ * @see #getFromSPP()
+ * @generated
+ */
+ void setFromSPP(SPPInstance value);
+
+ /**
+ * Returns the value of the '<em><b>To SPP</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.generator.etricegen.SPPInstance#getIncoming <em>Incoming</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>To SPP</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>To SPP</em>' reference.
+ * @see #setToSPP(SPPInstance)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getConnectionInstance_ToSPP()
+ * @see org.eclipse.etrice.generator.etricegen.SPPInstance#getIncoming
+ * @model opposite="incoming"
+ * @generated
+ */
+ SPPInstance getToSPP();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.ConnectionInstance#getToSPP <em>To SPP</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>To SPP</em>' reference.
+ * @see #getToSPP()
+ * @generated
+ */
+ void setToSPP(SPPInstance value);
+
+ /**
+ * Returns the value of the '<em><b>Connection</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Connection</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Connection</em>' reference.
+ * @see #setConnection(LayerConnection)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getConnectionInstance_Connection()
+ * @model
+ * @generated
+ */
+ LayerConnection getConnection();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.ConnectionInstance#getConnection <em>Connection</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Connection</em>' reference.
+ * @see #getConnection()
+ * @generated
+ */
+ void setConnection(LayerConnection value);
+
+} // ConnectionInstance
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/Counter.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/Counter.java
new file mode 100644
index 000000000..abcaaf59c
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/Counter.java
@@ -0,0 +1,72 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Counter</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.Counter#getCounter <em>Counter</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getCounter()
+ * @model
+ * @generated
+ */
+public interface Counter extends EObject {
+ /**
+ * Returns the value of the '<em><b>Counter</b></em>' attribute.
+ * The default value is <code>"0"</code>.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Counter</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Counter</em>' attribute.
+ * @see #setCounter(int)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getCounter_Counter()
+ * @model default="0"
+ * @generated
+ */
+ int getCounter();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.Counter#getCounter <em>Counter</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Counter</em>' attribute.
+ * @see #getCounter()
+ * @generated
+ */
+ void setCounter(int value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * annotation="http://www.eclipse.org/emf/2002/GenModel body='return getAndIncrementCount(1);'"
+ * @generated
+ */
+ int getAndIncrementCount();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='int count = getCounter();\r\nsetCounter(count+n);\r\nreturn count;'"
+ * @generated
+ */
+ int getAndIncrementCount(int n);
+
+} // Counter
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ETriceGenFactory.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ETriceGenFactory.java
new file mode 100644
index 000000000..6796a2a7a
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ETriceGenFactory.java
@@ -0,0 +1,172 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+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.generator.etricegen.ETriceGenPackage
+ * @generated
+ */
+public interface ETriceGenFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ ETriceGenFactory eINSTANCE = org.eclipse.etrice.generator.etricegen.impl.ETriceGenFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Root</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Root</em>'.
+ * @generated
+ */
+ Root createRoot();
+
+ /**
+ * Returns a new object of class '<em>Counter</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Counter</em>'.
+ * @generated
+ */
+ Counter createCounter();
+
+ /**
+ * Returns a new object of class '<em>Structure Instance</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Structure Instance</em>'.
+ * @generated
+ */
+ StructureInstance createStructureInstance();
+
+ /**
+ * Returns a new object of class '<em>Sub System Instance</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Sub System Instance</em>'.
+ * @generated
+ */
+ SubSystemInstance createSubSystemInstance();
+
+ /**
+ * Returns a new object of class '<em>Actor Instance</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Actor Instance</em>'.
+ * @generated
+ */
+ ActorInstance createActorInstance();
+
+ /**
+ * Returns a new object of class '<em>Interface Item Instance</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Interface Item Instance</em>'.
+ * @generated
+ */
+ InterfaceItemInstance createInterfaceItemInstance();
+
+ /**
+ * Returns a new object of class '<em>Port Instance</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Port Instance</em>'.
+ * @generated
+ */
+ PortInstance createPortInstance();
+
+ /**
+ * Returns a new object of class '<em>Binding Instance</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Binding Instance</em>'.
+ * @generated
+ */
+ BindingInstance createBindingInstance();
+
+ /**
+ * Returns a new object of class '<em>SAP Instance</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>SAP Instance</em>'.
+ * @generated
+ */
+ SAPInstance createSAPInstance();
+
+ /**
+ * Returns a new object of class '<em>SPP Instance</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>SPP Instance</em>'.
+ * @generated
+ */
+ SPPInstance createSPPInstance();
+
+ /**
+ * Returns a new object of class '<em>Service Impl Instance</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Service Impl Instance</em>'.
+ * @generated
+ */
+ ServiceImplInstance createServiceImplInstance();
+
+ /**
+ * Returns a new object of class '<em>Connection Instance</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Connection Instance</em>'.
+ * @generated
+ */
+ ConnectionInstance createConnectionInstance();
+
+ /**
+ * 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>Transition Chain</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Transition Chain</em>'.
+ * @generated
+ */
+ TransitionChain createTransitionChain();
+
+ /**
+ * Returns a new object of class '<em>Expanded Actor Class</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Expanded Actor Class</em>'.
+ * @generated
+ */
+ ExpandedActorClass createExpandedActorClass();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ ETriceGenPackage getETriceGenPackage();
+
+} //ETriceGenFactory
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ETriceGenPackage.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ETriceGenPackage.java
new file mode 100644
index 000000000..2b1088fee
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ETriceGenPackage.java
@@ -0,0 +1,2577 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.etrice.core.room.RoomPackage;
+
+/**
+ * <!-- 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 enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface ETriceGenPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "etricegen";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/etrice/generator";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "etricegen";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ ETriceGenPackage eINSTANCE = org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.generator.etricegen.impl.RootImpl <em>Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.RootImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getRoot()
+ * @generated
+ */
+ int ROOT = 0;
+
+ /**
+ * The feature id for the '<em><b>Sub Systems</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ROOT__SUB_SYSTEMS = 0;
+
+ /**
+ * The feature id for the '<em><b>Models</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ROOT__MODELS = 1;
+
+ /**
+ * The feature id for the '<em><b>Xp Actor Classes</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ROOT__XP_ACTOR_CLASSES = 2;
+
+ /**
+ * The feature id for the '<em><b>Used Data Classes</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ROOT__USED_DATA_CLASSES = 3;
+
+ /**
+ * The feature id for the '<em><b>Used Protocol Classes</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ROOT__USED_PROTOCOL_CLASSES = 4;
+
+ /**
+ * The feature id for the '<em><b>Used Actor Classes</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ROOT__USED_ACTOR_CLASSES = 5;
+
+ /**
+ * The feature id for the '<em><b>Used Room Models</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ROOT__USED_ROOM_MODELS = 6;
+
+ /**
+ * The number of structural features of the '<em>Root</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ROOT_FEATURE_COUNT = 7;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.generator.etricegen.impl.CounterImpl <em>Counter</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.CounterImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getCounter()
+ * @generated
+ */
+ int COUNTER = 1;
+
+ /**
+ * The feature id for the '<em><b>Counter</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COUNTER__COUNTER = 0;
+
+ /**
+ * The number of structural features of the '<em>Counter</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int COUNTER_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.generator.etricegen.impl.InstanceBaseImpl <em>Instance Base</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.InstanceBaseImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getInstanceBase()
+ * @generated
+ */
+ int INSTANCE_BASE = 2;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTANCE_BASE__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTANCE_BASE__PATH = 1;
+
+ /**
+ * The feature id for the '<em><b>Obj Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTANCE_BASE__OBJ_ID = 2;
+
+ /**
+ * The number of structural features of the '<em>Instance Base</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INSTANCE_BASE_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.generator.etricegen.impl.StructureInstanceImpl <em>Structure Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.StructureInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getStructureInstance()
+ * @generated
+ */
+ int STRUCTURE_INSTANCE = 3;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRUCTURE_INSTANCE__NAME = INSTANCE_BASE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRUCTURE_INSTANCE__PATH = INSTANCE_BASE__PATH;
+
+ /**
+ * The feature id for the '<em><b>Obj Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRUCTURE_INSTANCE__OBJ_ID = INSTANCE_BASE__OBJ_ID;
+
+ /**
+ * The feature id for the '<em><b>Instances</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRUCTURE_INSTANCE__INSTANCES = INSTANCE_BASE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Ports</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRUCTURE_INSTANCE__PORTS = INSTANCE_BASE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Saps</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRUCTURE_INSTANCE__SAPS = INSTANCE_BASE_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Spps</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRUCTURE_INSTANCE__SPPS = INSTANCE_BASE_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Services</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRUCTURE_INSTANCE__SERVICES = INSTANCE_BASE_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Bindings</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRUCTURE_INSTANCE__BINDINGS = INSTANCE_BASE_FEATURE_COUNT + 5;
+
+ /**
+ * The feature id for the '<em><b>Connections</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRUCTURE_INSTANCE__CONNECTIONS = INSTANCE_BASE_FEATURE_COUNT + 6;
+
+ /**
+ * The feature id for the '<em><b>All Contained Instances</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRUCTURE_INSTANCE__ALL_CONTAINED_INSTANCES = INSTANCE_BASE_FEATURE_COUNT + 7;
+
+ /**
+ * The feature id for the '<em><b>Ordered If Item Instances</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRUCTURE_INSTANCE__ORDERED_IF_ITEM_INSTANCES = INSTANCE_BASE_FEATURE_COUNT + 8;
+
+ /**
+ * The number of structural features of the '<em>Structure Instance</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STRUCTURE_INSTANCE_FEATURE_COUNT = INSTANCE_BASE_FEATURE_COUNT + 9;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.generator.etricegen.impl.SubSystemInstanceImpl <em>Sub System Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.SubSystemInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getSubSystemInstance()
+ * @generated
+ */
+ int SUB_SYSTEM_INSTANCE = 4;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_SYSTEM_INSTANCE__NAME = STRUCTURE_INSTANCE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_SYSTEM_INSTANCE__PATH = STRUCTURE_INSTANCE__PATH;
+
+ /**
+ * The feature id for the '<em><b>Obj Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_SYSTEM_INSTANCE__OBJ_ID = STRUCTURE_INSTANCE__OBJ_ID;
+
+ /**
+ * The feature id for the '<em><b>Instances</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_SYSTEM_INSTANCE__INSTANCES = STRUCTURE_INSTANCE__INSTANCES;
+
+ /**
+ * The feature id for the '<em><b>Ports</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_SYSTEM_INSTANCE__PORTS = STRUCTURE_INSTANCE__PORTS;
+
+ /**
+ * The feature id for the '<em><b>Saps</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_SYSTEM_INSTANCE__SAPS = STRUCTURE_INSTANCE__SAPS;
+
+ /**
+ * The feature id for the '<em><b>Spps</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_SYSTEM_INSTANCE__SPPS = STRUCTURE_INSTANCE__SPPS;
+
+ /**
+ * The feature id for the '<em><b>Services</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_SYSTEM_INSTANCE__SERVICES = STRUCTURE_INSTANCE__SERVICES;
+
+ /**
+ * The feature id for the '<em><b>Bindings</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_SYSTEM_INSTANCE__BINDINGS = STRUCTURE_INSTANCE__BINDINGS;
+
+ /**
+ * The feature id for the '<em><b>Connections</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_SYSTEM_INSTANCE__CONNECTIONS = STRUCTURE_INSTANCE__CONNECTIONS;
+
+ /**
+ * The feature id for the '<em><b>All Contained Instances</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_SYSTEM_INSTANCE__ALL_CONTAINED_INSTANCES = STRUCTURE_INSTANCE__ALL_CONTAINED_INSTANCES;
+
+ /**
+ * The feature id for the '<em><b>Ordered If Item Instances</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_SYSTEM_INSTANCE__ORDERED_IF_ITEM_INSTANCES = STRUCTURE_INSTANCE__ORDERED_IF_ITEM_INSTANCES;
+
+ /**
+ * The feature id for the '<em><b>Sub System Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_SYSTEM_INSTANCE__SUB_SYSTEM_CLASS = STRUCTURE_INSTANCE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Obj Counter</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_SYSTEM_INSTANCE__OBJ_COUNTER = STRUCTURE_INSTANCE_FEATURE_COUNT + 1;
+
+ /**
+ * The number of structural features of the '<em>Sub System Instance</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SUB_SYSTEM_INSTANCE_FEATURE_COUNT = STRUCTURE_INSTANCE_FEATURE_COUNT + 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.generator.etricegen.impl.ActorInstanceImpl <em>Actor Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.ActorInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getActorInstance()
+ * @generated
+ */
+ int ACTOR_INSTANCE = 5;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTOR_INSTANCE__NAME = STRUCTURE_INSTANCE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTOR_INSTANCE__PATH = STRUCTURE_INSTANCE__PATH;
+
+ /**
+ * The feature id for the '<em><b>Obj Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTOR_INSTANCE__OBJ_ID = STRUCTURE_INSTANCE__OBJ_ID;
+
+ /**
+ * The feature id for the '<em><b>Instances</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTOR_INSTANCE__INSTANCES = STRUCTURE_INSTANCE__INSTANCES;
+
+ /**
+ * The feature id for the '<em><b>Ports</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTOR_INSTANCE__PORTS = STRUCTURE_INSTANCE__PORTS;
+
+ /**
+ * The feature id for the '<em><b>Saps</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTOR_INSTANCE__SAPS = STRUCTURE_INSTANCE__SAPS;
+
+ /**
+ * The feature id for the '<em><b>Spps</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTOR_INSTANCE__SPPS = STRUCTURE_INSTANCE__SPPS;
+
+ /**
+ * The feature id for the '<em><b>Services</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTOR_INSTANCE__SERVICES = STRUCTURE_INSTANCE__SERVICES;
+
+ /**
+ * The feature id for the '<em><b>Bindings</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTOR_INSTANCE__BINDINGS = STRUCTURE_INSTANCE__BINDINGS;
+
+ /**
+ * The feature id for the '<em><b>Connections</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTOR_INSTANCE__CONNECTIONS = STRUCTURE_INSTANCE__CONNECTIONS;
+
+ /**
+ * The feature id for the '<em><b>All Contained Instances</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTOR_INSTANCE__ALL_CONTAINED_INSTANCES = STRUCTURE_INSTANCE__ALL_CONTAINED_INSTANCES;
+
+ /**
+ * The feature id for the '<em><b>Ordered If Item Instances</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTOR_INSTANCE__ORDERED_IF_ITEM_INSTANCES = STRUCTURE_INSTANCE__ORDERED_IF_ITEM_INSTANCES;
+
+ /**
+ * The feature id for the '<em><b>Actor Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTOR_INSTANCE__ACTOR_CLASS = STRUCTURE_INSTANCE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Actor Instance</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ACTOR_INSTANCE_FEATURE_COUNT = STRUCTURE_INSTANCE_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.generator.etricegen.impl.InterfaceItemInstanceImpl <em>Interface Item Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.InterfaceItemInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getInterfaceItemInstance()
+ * @generated
+ */
+ int INTERFACE_ITEM_INSTANCE = 6;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INTERFACE_ITEM_INSTANCE__NAME = INSTANCE_BASE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INTERFACE_ITEM_INSTANCE__PATH = INSTANCE_BASE__PATH;
+
+ /**
+ * The feature id for the '<em><b>Obj Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INTERFACE_ITEM_INSTANCE__OBJ_ID = INSTANCE_BASE__OBJ_ID;
+
+ /**
+ * The feature id for the '<em><b>Peers</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INTERFACE_ITEM_INSTANCE__PEERS = INSTANCE_BASE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Interface Item Instance</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int INTERFACE_ITEM_INSTANCE_FEATURE_COUNT = INSTANCE_BASE_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.generator.etricegen.impl.PortInstanceImpl <em>Port Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.PortInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getPortInstance()
+ * @generated
+ */
+ int PORT_INSTANCE = 7;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PORT_INSTANCE__NAME = INTERFACE_ITEM_INSTANCE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PORT_INSTANCE__PATH = INTERFACE_ITEM_INSTANCE__PATH;
+
+ /**
+ * The feature id for the '<em><b>Obj Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PORT_INSTANCE__OBJ_ID = INTERFACE_ITEM_INSTANCE__OBJ_ID;
+
+ /**
+ * The feature id for the '<em><b>Peers</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PORT_INSTANCE__PEERS = INTERFACE_ITEM_INSTANCE__PEERS;
+
+ /**
+ * The feature id for the '<em><b>Port</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PORT_INSTANCE__PORT = INTERFACE_ITEM_INSTANCE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Kind</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PORT_INSTANCE__KIND = INTERFACE_ITEM_INSTANCE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Bindings</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PORT_INSTANCE__BINDINGS = INTERFACE_ITEM_INSTANCE_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>Port Instance</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PORT_INSTANCE_FEATURE_COUNT = INTERFACE_ITEM_INSTANCE_FEATURE_COUNT + 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.generator.etricegen.impl.BindingInstanceImpl <em>Binding Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.BindingInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getBindingInstance()
+ * @generated
+ */
+ int BINDING_INSTANCE = 8;
+
+ /**
+ * The feature id for the '<em><b>Ports</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BINDING_INSTANCE__PORTS = 0;
+
+ /**
+ * The number of structural features of the '<em>Binding Instance</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BINDING_INSTANCE_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.generator.etricegen.impl.SAPInstanceImpl <em>SAP Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.SAPInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getSAPInstance()
+ * @generated
+ */
+ int SAP_INSTANCE = 9;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SAP_INSTANCE__NAME = INTERFACE_ITEM_INSTANCE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SAP_INSTANCE__PATH = INTERFACE_ITEM_INSTANCE__PATH;
+
+ /**
+ * The feature id for the '<em><b>Obj Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SAP_INSTANCE__OBJ_ID = INTERFACE_ITEM_INSTANCE__OBJ_ID;
+
+ /**
+ * The feature id for the '<em><b>Peers</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SAP_INSTANCE__PEERS = INTERFACE_ITEM_INSTANCE__PEERS;
+
+ /**
+ * The feature id for the '<em><b>Sap</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SAP_INSTANCE__SAP = INTERFACE_ITEM_INSTANCE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>SAP Instance</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SAP_INSTANCE_FEATURE_COUNT = INTERFACE_ITEM_INSTANCE_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.generator.etricegen.impl.SPPInstanceImpl <em>SPP Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.SPPInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getSPPInstance()
+ * @generated
+ */
+ int SPP_INSTANCE = 10;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SPP_INSTANCE__NAME = INSTANCE_BASE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SPP_INSTANCE__PATH = INSTANCE_BASE__PATH;
+
+ /**
+ * The feature id for the '<em><b>Obj Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SPP_INSTANCE__OBJ_ID = INSTANCE_BASE__OBJ_ID;
+
+ /**
+ * The feature id for the '<em><b>Spp</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SPP_INSTANCE__SPP = INSTANCE_BASE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Incoming</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SPP_INSTANCE__INCOMING = INSTANCE_BASE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Outgoing</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SPP_INSTANCE__OUTGOING = INSTANCE_BASE_FEATURE_COUNT + 2;
+
+ /**
+ * The number of structural features of the '<em>SPP Instance</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SPP_INSTANCE_FEATURE_COUNT = INSTANCE_BASE_FEATURE_COUNT + 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.generator.etricegen.impl.ServiceImplInstanceImpl <em>Service Impl Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.ServiceImplInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getServiceImplInstance()
+ * @generated
+ */
+ int SERVICE_IMPL_INSTANCE = 11;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SERVICE_IMPL_INSTANCE__NAME = INTERFACE_ITEM_INSTANCE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SERVICE_IMPL_INSTANCE__PATH = INTERFACE_ITEM_INSTANCE__PATH;
+
+ /**
+ * The feature id for the '<em><b>Obj Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SERVICE_IMPL_INSTANCE__OBJ_ID = INTERFACE_ITEM_INSTANCE__OBJ_ID;
+
+ /**
+ * The feature id for the '<em><b>Peers</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SERVICE_IMPL_INSTANCE__PEERS = INTERFACE_ITEM_INSTANCE__PEERS;
+
+ /**
+ * The feature id for the '<em><b>Svc Impl</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SERVICE_IMPL_INSTANCE__SVC_IMPL = INTERFACE_ITEM_INSTANCE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Service Impl Instance</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SERVICE_IMPL_INSTANCE_FEATURE_COUNT = INTERFACE_ITEM_INSTANCE_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.generator.etricegen.impl.ConnectionInstanceImpl <em>Connection Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.ConnectionInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getConnectionInstance()
+ * @generated
+ */
+ int CONNECTION_INSTANCE = 12;
+
+ /**
+ * The feature id for the '<em><b>From AI</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONNECTION_INSTANCE__FROM_AI = 0;
+
+ /**
+ * The feature id for the '<em><b>From SPP</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONNECTION_INSTANCE__FROM_SPP = 1;
+
+ /**
+ * The feature id for the '<em><b>To SPP</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONNECTION_INSTANCE__TO_SPP = 2;
+
+ /**
+ * The feature id for the '<em><b>Connection</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONNECTION_INSTANCE__CONNECTION = 3;
+
+ /**
+ * The number of structural features of the '<em>Connection Instance</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int CONNECTION_INSTANCE_FEATURE_COUNT = 4;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.generator.etricegen.impl.ActiveTriggerImpl <em>Active Trigger</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.ActiveTriggerImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getActiveTrigger()
+ * @generated
+ */
+ int ACTIVE_TRIGGER = 13;
+
+ /**
+ * 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.generator.etricegen.impl.TransitionChainImpl <em>Transition Chain</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.TransitionChainImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getTransitionChain()
+ * @generated
+ */
+ int TRANSITION_CHAIN = 14;
+
+ /**
+ * 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 number of structural features of the '<em>Transition Chain</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int TRANSITION_CHAIN_FEATURE_COUNT = 1;
+
+ /**
+ * 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.generator.etricegen.impl.ETriceGenPackageImpl#getITransitionChainVisitor()
+ * @generated
+ */
+ int ITRANSITION_CHAIN_VISITOR = 15;
+
+ /**
+ * 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 IDiagnostician <em>IDiagnostician</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see IDiagnostician
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getIDiagnostician()
+ * @generated
+ */
+ int IDIAGNOSTICIAN = 16;
+
+ /**
+ * 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 org.eclipse.etrice.generator.etricegen.impl.ExpandedActorClassImpl <em>Expanded Actor Class</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.ExpandedActorClassImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getExpandedActorClass()
+ * @generated
+ */
+ int EXPANDED_ACTOR_CLASS = 17;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__NAME = RoomPackage.ACTOR_CLASS__NAME;
+
+ /**
+ * The feature id for the '<em><b>Bindings</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__BINDINGS = RoomPackage.ACTOR_CLASS__BINDINGS;
+
+ /**
+ * The feature id for the '<em><b>Connections</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__CONNECTIONS = RoomPackage.ACTOR_CLASS__CONNECTIONS;
+
+ /**
+ * The feature id for the '<em><b>If SP Ps</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__IF_SP_PS = RoomPackage.ACTOR_CLASS__IF_SP_PS;
+
+ /**
+ * The feature id for the '<em><b>Actor Refs</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__ACTOR_REFS = RoomPackage.ACTOR_CLASS__ACTOR_REFS;
+
+ /**
+ * The feature id for the '<em><b>Base</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__BASE = RoomPackage.ACTOR_CLASS__BASE;
+
+ /**
+ * The feature id for the '<em><b>If Ports</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__IF_PORTS = RoomPackage.ACTOR_CLASS__IF_PORTS;
+
+ /**
+ * The feature id for the '<em><b>User Code1</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__USER_CODE1 = RoomPackage.ACTOR_CLASS__USER_CODE1;
+
+ /**
+ * The feature id for the '<em><b>User Code2</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__USER_CODE2 = RoomPackage.ACTOR_CLASS__USER_CODE2;
+
+ /**
+ * The feature id for the '<em><b>Int Ports</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__INT_PORTS = RoomPackage.ACTOR_CLASS__INT_PORTS;
+
+ /**
+ * The feature id for the '<em><b>Ext Ports</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__EXT_PORTS = RoomPackage.ACTOR_CLASS__EXT_PORTS;
+
+ /**
+ * The feature id for the '<em><b>Service Implementations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__SERVICE_IMPLEMENTATIONS = RoomPackage.ACTOR_CLASS__SERVICE_IMPLEMENTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Str SA Ps</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__STR_SA_PS = RoomPackage.ACTOR_CLASS__STR_SA_PS;
+
+ /**
+ * The feature id for the '<em><b>Attributes</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__ATTRIBUTES = RoomPackage.ACTOR_CLASS__ATTRIBUTES;
+
+ /**
+ * The feature id for the '<em><b>Operations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__OPERATIONS = RoomPackage.ACTOR_CLASS__OPERATIONS;
+
+ /**
+ * The feature id for the '<em><b>State Machine</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__STATE_MACHINE = RoomPackage.ACTOR_CLASS__STATE_MACHINE;
+
+ /**
+ * The feature id for the '<em><b>Actor Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS__ACTOR_CLASS = RoomPackage.ACTOR_CLASS_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Expanded Actor Class</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EXPANDED_ACTOR_CLASS_FEATURE_COUNT = RoomPackage.ACTOR_CLASS_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.etrice.generator.etricegen.PortKind <em>Port Kind</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.PortKind
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getPortKind()
+ * @generated
+ */
+ int PORT_KIND = 18;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.generator.etricegen.Root <em>Root</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Root</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.Root
+ * @generated
+ */
+ EClass getRoot();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.etrice.generator.etricegen.Root#getSubSystems <em>Sub Systems</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Sub Systems</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.Root#getSubSystems()
+ * @see #getRoot()
+ * @generated
+ */
+ EReference getRoot_SubSystems();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.etrice.generator.etricegen.Root#getModels <em>Models</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Models</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.Root#getModels()
+ * @see #getRoot()
+ * @generated
+ */
+ EReference getRoot_Models();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.etrice.generator.etricegen.Root#getXpActorClasses <em>Xp Actor Classes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Xp Actor Classes</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.Root#getXpActorClasses()
+ * @see #getRoot()
+ * @generated
+ */
+ EReference getRoot_XpActorClasses();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.etrice.generator.etricegen.Root#getUsedDataClasses <em>Used Data Classes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Used Data Classes</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.Root#getUsedDataClasses()
+ * @see #getRoot()
+ * @generated
+ */
+ EReference getRoot_UsedDataClasses();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.etrice.generator.etricegen.Root#getUsedProtocolClasses <em>Used Protocol Classes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Used Protocol Classes</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.Root#getUsedProtocolClasses()
+ * @see #getRoot()
+ * @generated
+ */
+ EReference getRoot_UsedProtocolClasses();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.etrice.generator.etricegen.Root#getUsedActorClasses <em>Used Actor Classes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Used Actor Classes</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.Root#getUsedActorClasses()
+ * @see #getRoot()
+ * @generated
+ */
+ EReference getRoot_UsedActorClasses();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.etrice.generator.etricegen.Root#getUsedRoomModels <em>Used Room Models</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Used Room Models</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.Root#getUsedRoomModels()
+ * @see #getRoot()
+ * @generated
+ */
+ EReference getRoot_UsedRoomModels();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.generator.etricegen.Counter <em>Counter</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Counter</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.Counter
+ * @generated
+ */
+ EClass getCounter();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.etrice.generator.etricegen.Counter#getCounter <em>Counter</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Counter</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.Counter#getCounter()
+ * @see #getCounter()
+ * @generated
+ */
+ EAttribute getCounter_Counter();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.generator.etricegen.InstanceBase <em>Instance Base</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Instance Base</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.InstanceBase
+ * @generated
+ */
+ EClass getInstanceBase();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.etrice.generator.etricegen.InstanceBase#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.InstanceBase#getName()
+ * @see #getInstanceBase()
+ * @generated
+ */
+ EAttribute getInstanceBase_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.etrice.generator.etricegen.InstanceBase#getPath <em>Path</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Path</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.InstanceBase#getPath()
+ * @see #getInstanceBase()
+ * @generated
+ */
+ EAttribute getInstanceBase_Path();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.etrice.generator.etricegen.InstanceBase#getObjId <em>Obj Id</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Obj Id</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.InstanceBase#getObjId()
+ * @see #getInstanceBase()
+ * @generated
+ */
+ EAttribute getInstanceBase_ObjId();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.generator.etricegen.StructureInstance <em>Structure Instance</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Structure Instance</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.StructureInstance
+ * @generated
+ */
+ EClass getStructureInstance();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getInstances <em>Instances</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Instances</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.StructureInstance#getInstances()
+ * @see #getStructureInstance()
+ * @generated
+ */
+ EReference getStructureInstance_Instances();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getPorts <em>Ports</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Ports</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.StructureInstance#getPorts()
+ * @see #getStructureInstance()
+ * @generated
+ */
+ EReference getStructureInstance_Ports();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getSaps <em>Saps</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Saps</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.StructureInstance#getSaps()
+ * @see #getStructureInstance()
+ * @generated
+ */
+ EReference getStructureInstance_Saps();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getSpps <em>Spps</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Spps</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.StructureInstance#getSpps()
+ * @see #getStructureInstance()
+ * @generated
+ */
+ EReference getStructureInstance_Spps();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getServices <em>Services</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Services</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.StructureInstance#getServices()
+ * @see #getStructureInstance()
+ * @generated
+ */
+ EReference getStructureInstance_Services();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getBindings <em>Bindings</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Bindings</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.StructureInstance#getBindings()
+ * @see #getStructureInstance()
+ * @generated
+ */
+ EReference getStructureInstance_Bindings();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getConnections <em>Connections</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Connections</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.StructureInstance#getConnections()
+ * @see #getStructureInstance()
+ * @generated
+ */
+ EReference getStructureInstance_Connections();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getAllContainedInstances <em>All Contained Instances</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>All Contained Instances</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.StructureInstance#getAllContainedInstances()
+ * @see #getStructureInstance()
+ * @generated
+ */
+ EReference getStructureInstance_AllContainedInstances();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getOrderedIfItemInstances <em>Ordered If Item Instances</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Ordered If Item Instances</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.StructureInstance#getOrderedIfItemInstances()
+ * @see #getStructureInstance()
+ * @generated
+ */
+ EReference getStructureInstance_OrderedIfItemInstances();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.generator.etricegen.SubSystemInstance <em>Sub System Instance</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Sub System Instance</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.SubSystemInstance
+ * @generated
+ */
+ EClass getSubSystemInstance();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.generator.etricegen.SubSystemInstance#getSubSystemClass <em>Sub System Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Sub System Class</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.SubSystemInstance#getSubSystemClass()
+ * @see #getSubSystemInstance()
+ * @generated
+ */
+ EReference getSubSystemInstance_SubSystemClass();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.etrice.generator.etricegen.SubSystemInstance#getObjCounter <em>Obj Counter</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Obj Counter</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.SubSystemInstance#getObjCounter()
+ * @see #getSubSystemInstance()
+ * @generated
+ */
+ EReference getSubSystemInstance_ObjCounter();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.generator.etricegen.ActorInstance <em>Actor Instance</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Actor Instance</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.ActorInstance
+ * @generated
+ */
+ EClass getActorInstance();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.generator.etricegen.ActorInstance#getActorClass <em>Actor Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Actor Class</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.ActorInstance#getActorClass()
+ * @see #getActorInstance()
+ * @generated
+ */
+ EReference getActorInstance_ActorClass();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.generator.etricegen.InterfaceItemInstance <em>Interface Item Instance</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Interface Item Instance</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.InterfaceItemInstance
+ * @generated
+ */
+ EClass getInterfaceItemInstance();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.etrice.generator.etricegen.InterfaceItemInstance#getPeers <em>Peers</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Peers</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.InterfaceItemInstance#getPeers()
+ * @see #getInterfaceItemInstance()
+ * @generated
+ */
+ EReference getInterfaceItemInstance_Peers();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.generator.etricegen.PortInstance <em>Port Instance</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Port Instance</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.PortInstance
+ * @generated
+ */
+ EClass getPortInstance();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.generator.etricegen.PortInstance#getPort <em>Port</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Port</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.PortInstance#getPort()
+ * @see #getPortInstance()
+ * @generated
+ */
+ EReference getPortInstance_Port();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.etrice.generator.etricegen.PortInstance#getKind <em>Kind</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Kind</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.PortInstance#getKind()
+ * @see #getPortInstance()
+ * @generated
+ */
+ EAttribute getPortInstance_Kind();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.etrice.generator.etricegen.PortInstance#getBindings <em>Bindings</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Bindings</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.PortInstance#getBindings()
+ * @see #getPortInstance()
+ * @generated
+ */
+ EReference getPortInstance_Bindings();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.generator.etricegen.BindingInstance <em>Binding Instance</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Binding Instance</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.BindingInstance
+ * @generated
+ */
+ EClass getBindingInstance();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.etrice.generator.etricegen.BindingInstance#getPorts <em>Ports</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Ports</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.BindingInstance#getPorts()
+ * @see #getBindingInstance()
+ * @generated
+ */
+ EReference getBindingInstance_Ports();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.generator.etricegen.SAPInstance <em>SAP Instance</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>SAP Instance</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.SAPInstance
+ * @generated
+ */
+ EClass getSAPInstance();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.generator.etricegen.SAPInstance#getSap <em>Sap</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Sap</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.SAPInstance#getSap()
+ * @see #getSAPInstance()
+ * @generated
+ */
+ EReference getSAPInstance_Sap();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.generator.etricegen.SPPInstance <em>SPP Instance</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>SPP Instance</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.SPPInstance
+ * @generated
+ */
+ EClass getSPPInstance();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.generator.etricegen.SPPInstance#getSpp <em>Spp</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Spp</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.SPPInstance#getSpp()
+ * @see #getSPPInstance()
+ * @generated
+ */
+ EReference getSPPInstance_Spp();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.etrice.generator.etricegen.SPPInstance#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.generator.etricegen.SPPInstance#getIncoming()
+ * @see #getSPPInstance()
+ * @generated
+ */
+ EReference getSPPInstance_Incoming();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.generator.etricegen.SPPInstance#getOutgoing <em>Outgoing</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Outgoing</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.SPPInstance#getOutgoing()
+ * @see #getSPPInstance()
+ * @generated
+ */
+ EReference getSPPInstance_Outgoing();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.generator.etricegen.ServiceImplInstance <em>Service Impl Instance</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Service Impl Instance</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.ServiceImplInstance
+ * @generated
+ */
+ EClass getServiceImplInstance();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.generator.etricegen.ServiceImplInstance#getSvcImpl <em>Svc Impl</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Svc Impl</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.ServiceImplInstance#getSvcImpl()
+ * @see #getServiceImplInstance()
+ * @generated
+ */
+ EReference getServiceImplInstance_SvcImpl();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.generator.etricegen.ConnectionInstance <em>Connection Instance</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Connection Instance</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.ConnectionInstance
+ * @generated
+ */
+ EClass getConnectionInstance();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.generator.etricegen.ConnectionInstance#getFromAI <em>From AI</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>From AI</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.ConnectionInstance#getFromAI()
+ * @see #getConnectionInstance()
+ * @generated
+ */
+ EReference getConnectionInstance_FromAI();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.generator.etricegen.ConnectionInstance#getFromSPP <em>From SPP</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>From SPP</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.ConnectionInstance#getFromSPP()
+ * @see #getConnectionInstance()
+ * @generated
+ */
+ EReference getConnectionInstance_FromSPP();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.generator.etricegen.ConnectionInstance#getToSPP <em>To SPP</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>To SPP</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.ConnectionInstance#getToSPP()
+ * @see #getConnectionInstance()
+ * @generated
+ */
+ EReference getConnectionInstance_ToSPP();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.generator.etricegen.ConnectionInstance#getConnection <em>Connection</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Connection</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.ConnectionInstance#getConnection()
+ * @see #getConnectionInstance()
+ * @generated
+ */
+ EReference getConnectionInstance_Connection();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.generator.etricegen.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.generator.etricegen.ActiveTrigger
+ * @generated
+ */
+ EClass getActiveTrigger();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.generator.etricegen.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.generator.etricegen.ActiveTrigger#getMsg()
+ * @see #getActiveTrigger()
+ * @generated
+ */
+ EReference getActiveTrigger_Msg();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.generator.etricegen.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.generator.etricegen.ActiveTrigger#getIfitem()
+ * @see #getActiveTrigger()
+ * @generated
+ */
+ EReference getActiveTrigger_Ifitem();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.etrice.generator.etricegen.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.generator.etricegen.ActiveTrigger#getTrigger()
+ * @see #getActiveTrigger()
+ * @generated
+ */
+ EAttribute getActiveTrigger_Trigger();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.etrice.generator.etricegen.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.generator.etricegen.ActiveTrigger#getTransitions()
+ * @see #getActiveTrigger()
+ * @generated
+ */
+ EReference getActiveTrigger_Transitions();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.etrice.generator.etricegen.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.generator.etricegen.TransitionChain
+ * @generated
+ */
+ EClass getTransitionChain();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.generator.etricegen.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.generator.etricegen.TransitionChain#getTransition()
+ * @see #getTransitionChain()
+ * @generated
+ */
+ EReference getTransitionChain_Transition();
+
+ /**
+ * 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 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 org.eclipse.etrice.generator.etricegen.ExpandedActorClass <em>Expanded Actor Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Expanded Actor Class</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.ExpandedActorClass
+ * @generated
+ */
+ EClass getExpandedActorClass();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.etrice.generator.etricegen.ExpandedActorClass#getActorClass <em>Actor Class</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Actor Class</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.ExpandedActorClass#getActorClass()
+ * @see #getExpandedActorClass()
+ * @generated
+ */
+ EReference getExpandedActorClass_ActorClass();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.etrice.generator.etricegen.PortKind <em>Port Kind</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for enum '<em>Port Kind</em>'.
+ * @see org.eclipse.etrice.generator.etricegen.PortKind
+ * @generated
+ */
+ EEnum getPortKind();
+
+ /**
+ * 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
+ */
+ ETriceGenFactory getETriceGenFactory();
+
+ /**
+ * <!-- 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 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.generator.etricegen.impl.RootImpl <em>Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.RootImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getRoot()
+ * @generated
+ */
+ EClass ROOT = eINSTANCE.getRoot();
+
+ /**
+ * The meta object literal for the '<em><b>Sub Systems</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ROOT__SUB_SYSTEMS = eINSTANCE.getRoot_SubSystems();
+
+ /**
+ * The meta object literal for the '<em><b>Models</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ROOT__MODELS = eINSTANCE.getRoot_Models();
+
+ /**
+ * The meta object literal for the '<em><b>Xp Actor Classes</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ROOT__XP_ACTOR_CLASSES = eINSTANCE.getRoot_XpActorClasses();
+
+ /**
+ * The meta object literal for the '<em><b>Used Data Classes</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ROOT__USED_DATA_CLASSES = eINSTANCE.getRoot_UsedDataClasses();
+
+ /**
+ * The meta object literal for the '<em><b>Used Protocol Classes</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ROOT__USED_PROTOCOL_CLASSES = eINSTANCE.getRoot_UsedProtocolClasses();
+
+ /**
+ * The meta object literal for the '<em><b>Used Actor Classes</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ROOT__USED_ACTOR_CLASSES = eINSTANCE.getRoot_UsedActorClasses();
+
+ /**
+ * The meta object literal for the '<em><b>Used Room Models</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ROOT__USED_ROOM_MODELS = eINSTANCE.getRoot_UsedRoomModels();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.generator.etricegen.impl.CounterImpl <em>Counter</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.CounterImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getCounter()
+ * @generated
+ */
+ EClass COUNTER = eINSTANCE.getCounter();
+
+ /**
+ * The meta object literal for the '<em><b>Counter</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute COUNTER__COUNTER = eINSTANCE.getCounter_Counter();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.generator.etricegen.impl.InstanceBaseImpl <em>Instance Base</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.InstanceBaseImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getInstanceBase()
+ * @generated
+ */
+ EClass INSTANCE_BASE = eINSTANCE.getInstanceBase();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INSTANCE_BASE__NAME = eINSTANCE.getInstanceBase_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Path</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INSTANCE_BASE__PATH = eINSTANCE.getInstanceBase_Path();
+
+ /**
+ * The meta object literal for the '<em><b>Obj Id</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute INSTANCE_BASE__OBJ_ID = eINSTANCE.getInstanceBase_ObjId();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.generator.etricegen.impl.StructureInstanceImpl <em>Structure Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.StructureInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getStructureInstance()
+ * @generated
+ */
+ EClass STRUCTURE_INSTANCE = eINSTANCE.getStructureInstance();
+
+ /**
+ * The meta object literal for the '<em><b>Instances</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STRUCTURE_INSTANCE__INSTANCES = eINSTANCE.getStructureInstance_Instances();
+
+ /**
+ * The meta object literal for the '<em><b>Ports</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STRUCTURE_INSTANCE__PORTS = eINSTANCE.getStructureInstance_Ports();
+
+ /**
+ * The meta object literal for the '<em><b>Saps</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STRUCTURE_INSTANCE__SAPS = eINSTANCE.getStructureInstance_Saps();
+
+ /**
+ * The meta object literal for the '<em><b>Spps</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STRUCTURE_INSTANCE__SPPS = eINSTANCE.getStructureInstance_Spps();
+
+ /**
+ * The meta object literal for the '<em><b>Services</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STRUCTURE_INSTANCE__SERVICES = eINSTANCE.getStructureInstance_Services();
+
+ /**
+ * The meta object literal for the '<em><b>Bindings</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STRUCTURE_INSTANCE__BINDINGS = eINSTANCE.getStructureInstance_Bindings();
+
+ /**
+ * The meta object literal for the '<em><b>Connections</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STRUCTURE_INSTANCE__CONNECTIONS = eINSTANCE.getStructureInstance_Connections();
+
+ /**
+ * The meta object literal for the '<em><b>All Contained Instances</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STRUCTURE_INSTANCE__ALL_CONTAINED_INSTANCES = eINSTANCE.getStructureInstance_AllContainedInstances();
+
+ /**
+ * The meta object literal for the '<em><b>Ordered If Item Instances</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference STRUCTURE_INSTANCE__ORDERED_IF_ITEM_INSTANCES = eINSTANCE.getStructureInstance_OrderedIfItemInstances();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.generator.etricegen.impl.SubSystemInstanceImpl <em>Sub System Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.SubSystemInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getSubSystemInstance()
+ * @generated
+ */
+ EClass SUB_SYSTEM_INSTANCE = eINSTANCE.getSubSystemInstance();
+
+ /**
+ * The meta object literal for the '<em><b>Sub System Class</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference SUB_SYSTEM_INSTANCE__SUB_SYSTEM_CLASS = eINSTANCE.getSubSystemInstance_SubSystemClass();
+
+ /**
+ * The meta object literal for the '<em><b>Obj Counter</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference SUB_SYSTEM_INSTANCE__OBJ_COUNTER = eINSTANCE.getSubSystemInstance_ObjCounter();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.generator.etricegen.impl.ActorInstanceImpl <em>Actor Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.ActorInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getActorInstance()
+ * @generated
+ */
+ EClass ACTOR_INSTANCE = eINSTANCE.getActorInstance();
+
+ /**
+ * The meta object literal for the '<em><b>Actor Class</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ACTOR_INSTANCE__ACTOR_CLASS = eINSTANCE.getActorInstance_ActorClass();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.generator.etricegen.impl.InterfaceItemInstanceImpl <em>Interface Item Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.InterfaceItemInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getInterfaceItemInstance()
+ * @generated
+ */
+ EClass INTERFACE_ITEM_INSTANCE = eINSTANCE.getInterfaceItemInstance();
+
+ /**
+ * The meta object literal for the '<em><b>Peers</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference INTERFACE_ITEM_INSTANCE__PEERS = eINSTANCE.getInterfaceItemInstance_Peers();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.generator.etricegen.impl.PortInstanceImpl <em>Port Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.PortInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getPortInstance()
+ * @generated
+ */
+ EClass PORT_INSTANCE = eINSTANCE.getPortInstance();
+
+ /**
+ * The meta object literal for the '<em><b>Port</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PORT_INSTANCE__PORT = eINSTANCE.getPortInstance_Port();
+
+ /**
+ * The meta object literal for the '<em><b>Kind</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PORT_INSTANCE__KIND = eINSTANCE.getPortInstance_Kind();
+
+ /**
+ * The meta object literal for the '<em><b>Bindings</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PORT_INSTANCE__BINDINGS = eINSTANCE.getPortInstance_Bindings();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.generator.etricegen.impl.BindingInstanceImpl <em>Binding Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.BindingInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getBindingInstance()
+ * @generated
+ */
+ EClass BINDING_INSTANCE = eINSTANCE.getBindingInstance();
+
+ /**
+ * The meta object literal for the '<em><b>Ports</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference BINDING_INSTANCE__PORTS = eINSTANCE.getBindingInstance_Ports();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.generator.etricegen.impl.SAPInstanceImpl <em>SAP Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.SAPInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getSAPInstance()
+ * @generated
+ */
+ EClass SAP_INSTANCE = eINSTANCE.getSAPInstance();
+
+ /**
+ * The meta object literal for the '<em><b>Sap</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference SAP_INSTANCE__SAP = eINSTANCE.getSAPInstance_Sap();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.generator.etricegen.impl.SPPInstanceImpl <em>SPP Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.SPPInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getSPPInstance()
+ * @generated
+ */
+ EClass SPP_INSTANCE = eINSTANCE.getSPPInstance();
+
+ /**
+ * The meta object literal for the '<em><b>Spp</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference SPP_INSTANCE__SPP = eINSTANCE.getSPPInstance_Spp();
+
+ /**
+ * The meta object literal for the '<em><b>Incoming</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference SPP_INSTANCE__INCOMING = eINSTANCE.getSPPInstance_Incoming();
+
+ /**
+ * The meta object literal for the '<em><b>Outgoing</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference SPP_INSTANCE__OUTGOING = eINSTANCE.getSPPInstance_Outgoing();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.generator.etricegen.impl.ServiceImplInstanceImpl <em>Service Impl Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.ServiceImplInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getServiceImplInstance()
+ * @generated
+ */
+ EClass SERVICE_IMPL_INSTANCE = eINSTANCE.getServiceImplInstance();
+
+ /**
+ * The meta object literal for the '<em><b>Svc Impl</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference SERVICE_IMPL_INSTANCE__SVC_IMPL = eINSTANCE.getServiceImplInstance_SvcImpl();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.generator.etricegen.impl.ConnectionInstanceImpl <em>Connection Instance</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.ConnectionInstanceImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getConnectionInstance()
+ * @generated
+ */
+ EClass CONNECTION_INSTANCE = eINSTANCE.getConnectionInstance();
+
+ /**
+ * The meta object literal for the '<em><b>From AI</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CONNECTION_INSTANCE__FROM_AI = eINSTANCE.getConnectionInstance_FromAI();
+
+ /**
+ * The meta object literal for the '<em><b>From SPP</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CONNECTION_INSTANCE__FROM_SPP = eINSTANCE.getConnectionInstance_FromSPP();
+
+ /**
+ * The meta object literal for the '<em><b>To SPP</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CONNECTION_INSTANCE__TO_SPP = eINSTANCE.getConnectionInstance_ToSPP();
+
+ /**
+ * The meta object literal for the '<em><b>Connection</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference CONNECTION_INSTANCE__CONNECTION = eINSTANCE.getConnectionInstance_Connection();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.generator.etricegen.impl.ActiveTriggerImpl <em>Active Trigger</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.ActiveTriggerImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#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.generator.etricegen.impl.TransitionChainImpl <em>Transition Chain</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.TransitionChainImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#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 '{@link ITransitionChainVisitor <em>ITransition Chain Visitor</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see ITransitionChainVisitor
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getITransitionChainVisitor()
+ * @generated
+ */
+ EClass ITRANSITION_CHAIN_VISITOR = eINSTANCE.getITransitionChainVisitor();
+
+ /**
+ * The meta object literal for the '{@link IDiagnostician <em>IDiagnostician</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see IDiagnostician
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getIDiagnostician()
+ * @generated
+ */
+ EClass IDIAGNOSTICIAN = eINSTANCE.getIDiagnostician();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.generator.etricegen.impl.ExpandedActorClassImpl <em>Expanded Actor Class</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.impl.ExpandedActorClassImpl
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getExpandedActorClass()
+ * @generated
+ */
+ EClass EXPANDED_ACTOR_CLASS = eINSTANCE.getExpandedActorClass();
+
+ /**
+ * The meta object literal for the '<em><b>Actor Class</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference EXPANDED_ACTOR_CLASS__ACTOR_CLASS = eINSTANCE.getExpandedActorClass_ActorClass();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.etrice.generator.etricegen.PortKind <em>Port Kind</em>}' enum.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.PortKind
+ * @see org.eclipse.etrice.generator.etricegen.impl.ETriceGenPackageImpl#getPortKind()
+ * @generated
+ */
+ EEnum PORT_KIND = eINSTANCE.getPortKind();
+
+ }
+
+} //ETriceGenPackage
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ExpandedActorClass.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ExpandedActorClass.java
new file mode 100644
index 000000000..2b3b8e163
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ExpandedActorClass.java
@@ -0,0 +1,233 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.etrice.core.room.ActorClass;
+import org.eclipse.etrice.core.room.ContinuationTransition;
+import org.eclipse.etrice.core.room.DetailCode;
+import org.eclipse.etrice.core.room.InterfaceItem;
+import org.eclipse.etrice.core.room.MessageFromIf;
+import org.eclipse.etrice.core.room.State;
+import org.eclipse.etrice.core.room.StateGraphItem;
+import org.eclipse.etrice.core.room.StateGraphNode;
+import org.eclipse.etrice.core.room.Transition;
+import org.eclipse.etrice.core.room.TransitionTerminal;
+import org.eclipse.etrice.core.room.Trigger;
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Explicit Actor Class</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.ExpandedActorClass#getActorClass <em>Actor Class</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getExpandedActorClass()
+ * @model
+ * @generated
+ */
+public interface ExpandedActorClass extends ActorClass {
+ /**
+ * Returns the value of the '<em><b>Actor Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Actor Class</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Actor Class</em>' reference.
+ * @see #setActorClass(ActorClass)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getExpandedActorClass_ActorClass()
+ * @model
+ * @generated
+ */
+ ActorClass getActorClass();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.ExpandedActorClass#getActorClass <em>Actor Class</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Actor Class</em>' reference.
+ * @see #getActorClass()
+ * @generated
+ */
+ void setActorClass(ActorClass value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model validatorType="org.eclipse.etrice.generator.etricegen.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
+ */
+ int getInterfaceItemLocalId(InterfaceItem ifitem);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ boolean hasStateMachine();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ String getCode(DetailCode code);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ String getTriggerCodeName(MessageFromIf mif);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ String getTriggerCodeName(String mif);
+
+ /**
+ * <!-- 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 kind="operation"
+ * @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
+ */
+ StateGraphNode getNode(TransitionTerminal tt);
+
+ /**
+ * <!-- 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);
+
+} // ExplicitActorClass
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/IDiagnostician.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/IDiagnostician.java
new file mode 100644
index 000000000..3033c4990
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/IDiagnostician.java
@@ -0,0 +1,13 @@
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.emf.ecore.EObject;
+
+public interface IDiagnostician {
+
+ void warning(String msg, EObject source);
+ void warning(String msg, EObject source, int feature);
+ void error(String msg, EObject source);
+ void error(String msg, EObject source, int feature);
+
+ boolean isFailed();
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ITransitionChainVisitor.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ITransitionChainVisitor.java
new file mode 100644
index 000000000..51253318b
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ITransitionChainVisitor.java
@@ -0,0 +1,24 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.etrice.core.room.CPBranchTransition;
+import org.eclipse.etrice.core.room.ContinuationTransition;
+import org.eclipse.etrice.core.room.State;
+import org.eclipse.etrice.core.room.Transition;
+
+public interface ITransitionChainVisitor {
+ String genTypedData();
+ String genActionOperationCall(Transition tr);
+ String genEntryOperationCall(State state);
+ String genExitOperationCall(State state);
+ String genElseIfBranch(CPBranchTransition tr);
+ String genElseBranch(ContinuationTransition tr);
+ String genEndIf();
+ String genReturnState(State state);
+
+} // ITransitionChainVisitor
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/InstanceBase.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/InstanceBase.java
new file mode 100644
index 000000000..6637a2bb9
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/InstanceBase.java
@@ -0,0 +1,103 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Instance Base</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.InstanceBase#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.InstanceBase#getPath <em>Path</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.InstanceBase#getObjId <em>Obj Id</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getInstanceBase()
+ * @model abstract="true"
+ * @generated
+ */
+public interface InstanceBase extends EObject {
+
+ /**
+ * delimiter character for paths
+ */
+ static char pathDelim = '/';
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getInstanceBase_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.InstanceBase#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Path</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Path</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Path</em>' attribute.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getInstanceBase_Path()
+ * @model transient="true" changeable="false" volatile="true" derived="true"
+ * @generated
+ */
+ String getPath();
+
+ /**
+ * Returns the value of the '<em><b>Obj Id</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Obj Id</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Obj Id</em>' attribute.
+ * @see #setObjId(int)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getInstanceBase_ObjId()
+ * @model
+ * @generated
+ */
+ int getObjId();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.InstanceBase#getObjId <em>Obj Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Obj Id</em>' attribute.
+ * @see #getObjId()
+ * @generated
+ */
+ void setObjId(int value);
+
+} // InstanceBase
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/InterfaceItemInstance.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/InterfaceItemInstance.java
new file mode 100644
index 000000000..f3e95607d
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/InterfaceItemInstance.java
@@ -0,0 +1,44 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Interface Item Instance</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.InterfaceItemInstance#getPeers <em>Peers</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getInterfaceItemInstance()
+ * @model
+ * @generated
+ */
+public interface InterfaceItemInstance extends InstanceBase {
+ /**
+ * Returns the value of the '<em><b>Peers</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.etrice.generator.etricegen.InterfaceItemInstance}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Peers</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>Peers</em>' reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getInterfaceItemInstance_Peers()
+ * @model
+ * @generated
+ */
+ EList<InterfaceItemInstance> getPeers();
+
+} // InterfaceItemInstance
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/PortInstance.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/PortInstance.java
new file mode 100644
index 000000000..833b3f181
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/PortInstance.java
@@ -0,0 +1,105 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.etrice.core.room.Port;
+import org.eclipse.emf.common.util.EList;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Port Instance</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.PortInstance#getPort <em>Port</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.PortInstance#getKind <em>Kind</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.PortInstance#getBindings <em>Bindings</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getPortInstance()
+ * @model
+ * @generated
+ */
+public interface PortInstance extends InterfaceItemInstance {
+
+ /**
+ * Returns the value of the '<em><b>Port</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Port</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Port</em>' reference.
+ * @see #setPort(Port)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getPortInstance_Port()
+ * @model
+ * @generated
+ */
+ Port getPort();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.PortInstance#getPort <em>Port</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Port</em>' reference.
+ * @see #getPort()
+ * @generated
+ */
+ void setPort(Port value);
+
+ /**
+ * Returns the value of the '<em><b>Kind</b></em>' attribute.
+ * The literals are from the enumeration {@link org.eclipse.etrice.generator.etricegen.PortKind}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Kind</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Kind</em>' attribute.
+ * @see org.eclipse.etrice.generator.etricegen.PortKind
+ * @see #setKind(PortKind)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getPortInstance_Kind()
+ * @model
+ * @generated
+ */
+ PortKind getKind();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.PortInstance#getKind <em>Kind</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Kind</em>' attribute.
+ * @see org.eclipse.etrice.generator.etricegen.PortKind
+ * @see #getKind()
+ * @generated
+ */
+ void setKind(PortKind value);
+
+ /**
+ * Returns the value of the '<em><b>Bindings</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.etrice.generator.etricegen.BindingInstance}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.generator.etricegen.BindingInstance#getPorts <em>Ports</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Bindings</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>Bindings</em>' reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getPortInstance_Bindings()
+ * @see org.eclipse.etrice.generator.etricegen.BindingInstance#getPorts
+ * @model opposite="ports"
+ * @generated
+ */
+ EList<BindingInstance> getBindings();
+} // PortInstance
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/PortKind.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/PortKind.java
new file mode 100644
index 000000000..756bbb918
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/PortKind.java
@@ -0,0 +1,239 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.util.Enumerator;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the literals of the enumeration '<em><b>Port Kind</b></em>',
+ * and utility methods for working with them.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getPortKind()
+ * @model
+ * @generated
+ */
+public enum PortKind implements Enumerator {
+ /**
+ * The '<em><b>External</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #EXTERNAL_VALUE
+ * @generated
+ * @ordered
+ */
+ EXTERNAL(0, "external", "external"),
+
+ /**
+ * The '<em><b>Internal</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #INTERNAL_VALUE
+ * @generated
+ * @ordered
+ */
+ INTERNAL(1, "internal", "internal"),
+
+ /**
+ * The '<em><b>Relay</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #RELAY_VALUE
+ * @generated
+ * @ordered
+ */
+ RELAY(2, "relay", "relay");
+
+ /**
+ * The '<em><b>External</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>External</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #EXTERNAL
+ * @model name="external"
+ * @generated
+ * @ordered
+ */
+ public static final int EXTERNAL_VALUE = 0;
+
+ /**
+ * The '<em><b>Internal</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Internal</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #INTERNAL
+ * @model name="internal"
+ * @generated
+ * @ordered
+ */
+ public static final int INTERNAL_VALUE = 1;
+
+ /**
+ * The '<em><b>Relay</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>Relay</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #RELAY
+ * @model name="relay"
+ * @generated
+ * @ordered
+ */
+ public static final int RELAY_VALUE = 2;
+
+ /**
+ * An array of all the '<em><b>Port Kind</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static final PortKind[] VALUES_ARRAY =
+ new PortKind[] {
+ EXTERNAL,
+ INTERNAL,
+ RELAY,
+ };
+
+ /**
+ * A public read-only list of all the '<em><b>Port Kind</b></em>' enumerators.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final List<PortKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
+
+ /**
+ * Returns the '<em><b>Port Kind</b></em>' literal with the specified literal value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static PortKind get(String literal) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ PortKind result = VALUES_ARRAY[i];
+ if (result.toString().equals(literal)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Port Kind</b></em>' literal with the specified name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static PortKind getByName(String name) {
+ for (int i = 0; i < VALUES_ARRAY.length; ++i) {
+ PortKind result = VALUES_ARRAY[i];
+ if (result.getName().equals(name)) {
+ return result;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the '<em><b>Port Kind</b></em>' literal with the specified integer value.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static PortKind get(int value) {
+ switch (value) {
+ case EXTERNAL_VALUE: return EXTERNAL;
+ case INTERNAL_VALUE: return INTERNAL;
+ case RELAY_VALUE: return RELAY;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final int value;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String name;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private final String literal;
+
+ /**
+ * Only this class can construct instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private PortKind(int value, String name, String literal) {
+ this.value = value;
+ this.name = name;
+ this.literal = literal;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Returns the literal value of the enumerator, which is its string representation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ return literal;
+ }
+
+} //PortKind
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/Root.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/Root.java
new file mode 100644
index 000000000..e663fdf27
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/Root.java
@@ -0,0 +1,170 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.etrice.core.room.ActorClass;
+import org.eclipse.etrice.core.room.DataClass;
+import org.eclipse.etrice.core.room.ProtocolClass;
+import org.eclipse.etrice.core.room.RoomClass;
+import org.eclipse.etrice.core.room.RoomModel;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Root</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.Root#getSubSystems <em>Sub Systems</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.Root#getModels <em>Models</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.Root#getXpActorClasses <em>Xp Actor Classes</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.Root#getUsedDataClasses <em>Used Data Classes</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.Root#getUsedProtocolClasses <em>Used Protocol Classes</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.Root#getUsedActorClasses <em>Used Actor Classes</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.Root#getUsedRoomModels <em>Used Room Models</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getRoot()
+ * @model
+ * @generated
+ */
+public interface Root extends EObject {
+ /**
+ * Returns the value of the '<em><b>Sub Systems</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.etrice.generator.etricegen.SubSystemInstance}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Sub Systems</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>Sub Systems</em>' containment reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getRoot_SubSystems()
+ * @model containment="true"
+ * @generated
+ */
+ EList<SubSystemInstance> getSubSystems();
+
+ /**
+ * Returns the value of the '<em><b>Models</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.etrice.core.room.RoomModel}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Models</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>Models</em>' reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getRoot_Models()
+ * @model
+ * @generated
+ */
+ EList<RoomModel> getModels();
+
+ /**
+ * Returns the value of the '<em><b>Xp Actor Classes</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.etrice.generator.etricegen.ExpandedActorClass}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Xp Actor Classes</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>Xp Actor Classes</em>' containment reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getRoot_XpActorClasses()
+ * @model containment="true"
+ * @generated
+ */
+ EList<ExpandedActorClass> getXpActorClasses();
+
+ /**
+ * Returns the value of the '<em><b>Used Data Classes</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.etrice.core.room.DataClass}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Used Data Classes</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>Used Data Classes</em>' reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getRoot_UsedDataClasses()
+ * @model transient="true" volatile="true" derived="true"
+ * @generated
+ */
+ EList<DataClass> getUsedDataClasses();
+
+ /**
+ * Returns the value of the '<em><b>Used Protocol Classes</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.etrice.core.room.ProtocolClass}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Used Protocol Classes</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>Used Protocol Classes</em>' reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getRoot_UsedProtocolClasses()
+ * @model transient="true" volatile="true" derived="true"
+ * @generated
+ */
+ EList<ProtocolClass> getUsedProtocolClasses();
+
+ /**
+ * Returns the value of the '<em><b>Used Actor Classes</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.etrice.core.room.ActorClass}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Used Actor Classes</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>Used Actor Classes</em>' reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getRoot_UsedActorClasses()
+ * @model transient="true" volatile="true" derived="true"
+ * @generated
+ */
+ EList<ActorClass> getUsedActorClasses();
+
+ /**
+ * Returns the value of the '<em><b>Used Room Models</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.etrice.core.room.RoomModel}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Used Room Models</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>Used Room Models</em>' reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getRoot_UsedRoomModels()
+ * @model transient="true" volatile="true" derived="true"
+ * @generated
+ */
+ EList<RoomModel> getUsedRoomModels();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<RoomModel> getReferencedModels(RoomClass cls);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model
+ * @generated
+ */
+ EList<ProtocolClass> getReferencedProtocols(ActorClass cls);
+
+} // Root
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/SAPInstance.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/SAPInstance.java
new file mode 100644
index 000000000..9879f443e
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/SAPInstance.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.etrice.core.room.SAPRef;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>SAP Instance</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.SAPInstance#getSap <em>Sap</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getSAPInstance()
+ * @model
+ * @generated
+ */
+public interface SAPInstance extends InterfaceItemInstance {
+ /**
+ * Returns the value of the '<em><b>Sap</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Sap</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Sap</em>' reference.
+ * @see #setSap(SAPRef)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getSAPInstance_Sap()
+ * @model
+ * @generated
+ */
+ SAPRef getSap();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.SAPInstance#getSap <em>Sap</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Sap</em>' reference.
+ * @see #getSap()
+ * @generated
+ */
+ void setSap(SAPRef value);
+
+} // SAPInstance
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/SPPInstance.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/SPPInstance.java
new file mode 100644
index 000000000..52a0f94a8
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/SPPInstance.java
@@ -0,0 +1,103 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.etrice.core.room.SPPRef;
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>SPP Instance</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.SPPInstance#getSpp <em>Spp</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.SPPInstance#getIncoming <em>Incoming</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.SPPInstance#getOutgoing <em>Outgoing</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getSPPInstance()
+ * @model
+ * @generated
+ */
+public interface SPPInstance extends InstanceBase {
+ /**
+ * Returns the value of the '<em><b>Spp</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Spp</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Spp</em>' reference.
+ * @see #setSpp(SPPRef)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getSPPInstance_Spp()
+ * @model
+ * @generated
+ */
+ SPPRef getSpp();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.SPPInstance#getSpp <em>Spp</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Spp</em>' reference.
+ * @see #getSpp()
+ * @generated
+ */
+ void setSpp(SPPRef value);
+
+ /**
+ * Returns the value of the '<em><b>Incoming</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.etrice.generator.etricegen.ConnectionInstance}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.generator.etricegen.ConnectionInstance#getToSPP <em>To SPP</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Incoming</em>' reference 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.generator.etricegen.ETriceGenPackage#getSPPInstance_Incoming()
+ * @see org.eclipse.etrice.generator.etricegen.ConnectionInstance#getToSPP
+ * @model opposite="toSPP"
+ * @generated
+ */
+ EList<ConnectionInstance> getIncoming();
+
+ /**
+ * Returns the value of the '<em><b>Outgoing</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.etrice.generator.etricegen.ConnectionInstance#getFromSPP <em>From SPP</em>}'.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Outgoing</em>' reference 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.
+ * @see #setOutgoing(ConnectionInstance)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getSPPInstance_Outgoing()
+ * @see org.eclipse.etrice.generator.etricegen.ConnectionInstance#getFromSPP
+ * @model opposite="fromSPP"
+ * @generated
+ */
+ ConnectionInstance getOutgoing();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.SPPInstance#getOutgoing <em>Outgoing</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Outgoing</em>' reference.
+ * @see #getOutgoing()
+ * @generated
+ */
+ void setOutgoing(ConnectionInstance value);
+
+} // SPPInstance
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ServiceImplInstance.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ServiceImplInstance.java
new file mode 100644
index 000000000..c40e60208
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/ServiceImplInstance.java
@@ -0,0 +1,54 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.etrice.core.room.ServiceImplementation;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Service Impl Instance</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.ServiceImplInstance#getSvcImpl <em>Svc Impl</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getServiceImplInstance()
+ * @model
+ * @generated
+ */
+public interface ServiceImplInstance extends InterfaceItemInstance {
+ /**
+ * Returns the value of the '<em><b>Svc Impl</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Svc Impl</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Svc Impl</em>' reference.
+ * @see #setSvcImpl(ServiceImplementation)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getServiceImplInstance_SvcImpl()
+ * @model
+ * @generated
+ */
+ ServiceImplementation getSvcImpl();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.ServiceImplInstance#getSvcImpl <em>Svc Impl</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Svc Impl</em>' reference.
+ * @see #getSvcImpl()
+ * @generated
+ */
+ void setSvcImpl(ServiceImplementation value);
+
+} // ServiceImplInstance
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/StructureInstance.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/StructureInstance.java
new file mode 100644
index 000000000..f1885427c
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/StructureInstance.java
@@ -0,0 +1,180 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Structure Instance</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getInstances <em>Instances</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getPorts <em>Ports</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getSaps <em>Saps</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getSpps <em>Spps</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getServices <em>Services</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getBindings <em>Bindings</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getConnections <em>Connections</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getAllContainedInstances <em>All Contained Instances</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.StructureInstance#getOrderedIfItemInstances <em>Ordered If Item Instances</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getStructureInstance()
+ * @model
+ * @generated
+ */
+public interface StructureInstance extends InstanceBase {
+ /**
+ * Returns the value of the '<em><b>Instances</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.etrice.generator.etricegen.ActorInstance}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Instances</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>Instances</em>' containment reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getStructureInstance_Instances()
+ * @model containment="true"
+ * @generated
+ */
+ EList<ActorInstance> getInstances();
+
+ /**
+ * Returns the value of the '<em><b>Ports</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.etrice.generator.etricegen.PortInstance}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Ports</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>Ports</em>' containment reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getStructureInstance_Ports()
+ * @model containment="true"
+ * @generated
+ */
+ EList<PortInstance> getPorts();
+
+ /**
+ * Returns the value of the '<em><b>Saps</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.etrice.generator.etricegen.SAPInstance}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Saps</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>Saps</em>' containment reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getStructureInstance_Saps()
+ * @model containment="true"
+ * @generated
+ */
+ EList<SAPInstance> getSaps();
+
+ /**
+ * Returns the value of the '<em><b>Spps</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.etrice.generator.etricegen.SPPInstance}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Spps</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>Spps</em>' containment reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getStructureInstance_Spps()
+ * @model containment="true"
+ * @generated
+ */
+ EList<SPPInstance> getSpps();
+
+ /**
+ * Returns the value of the '<em><b>Services</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.etrice.generator.etricegen.ServiceImplInstance}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Services</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>Services</em>' containment reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getStructureInstance_Services()
+ * @model containment="true"
+ * @generated
+ */
+ EList<ServiceImplInstance> getServices();
+
+ /**
+ * Returns the value of the '<em><b>Bindings</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.etrice.generator.etricegen.BindingInstance}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Bindings</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>Bindings</em>' containment reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getStructureInstance_Bindings()
+ * @model containment="true"
+ * @generated
+ */
+ EList<BindingInstance> getBindings();
+
+ /**
+ * Returns the value of the '<em><b>Connections</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.etrice.generator.etricegen.ConnectionInstance}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Connections</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>Connections</em>' containment reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getStructureInstance_Connections()
+ * @model containment="true"
+ * @generated
+ */
+ EList<ConnectionInstance> getConnections();
+
+ /**
+ * Returns the value of the '<em><b>All Contained Instances</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.etrice.generator.etricegen.ActorInstance}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>All Contained Instances</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>All Contained Instances</em>' reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getStructureInstance_AllContainedInstances()
+ * @model transient="true" volatile="true" derived="true"
+ * @generated
+ */
+ EList<ActorInstance> getAllContainedInstances();
+
+ /**
+ * Returns the value of the '<em><b>Ordered If Item Instances</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.etrice.generator.etricegen.InterfaceItemInstance}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Ordered If Item Instances</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>Ordered If Item Instances</em>' reference list.
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getStructureInstance_OrderedIfItemInstances()
+ * @model transient="true" changeable="false" derived="true"
+ * @generated
+ */
+ EList<InterfaceItemInstance> getOrderedIfItemInstances();
+
+} // StructureInstance
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/SubSystemInstance.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/SubSystemInstance.java
new file mode 100644
index 000000000..d8e015c0e
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/SubSystemInstance.java
@@ -0,0 +1,81 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.etrice.core.room.SubSystemClass;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Component Instance</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.SubSystemInstance#getSubSystemClass <em>Sub System Class</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.SubSystemInstance#getObjCounter <em>Obj Counter</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getSubSystemInstance()
+ * @model
+ * @generated
+ */
+public interface SubSystemInstance extends StructureInstance {
+ /**
+ * Returns the value of the '<em><b>Sub System Class</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Component Class</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Sub System Class</em>' reference.
+ * @see #setSubSystemClass(SubSystemClass)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getSubSystemInstance_SubSystemClass()
+ * @model
+ * @generated
+ */
+ SubSystemClass getSubSystemClass();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.SubSystemInstance#getSubSystemClass <em>Sub System Class</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Sub System Class</em>' reference.
+ * @see #getSubSystemClass()
+ * @generated
+ */
+ void setSubSystemClass(SubSystemClass value);
+
+ /**
+ * Returns the value of the '<em><b>Obj Counter</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Obj Counter</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Obj Counter</em>' containment reference.
+ * @see #setObjCounter(Counter)
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#getSubSystemInstance_ObjCounter()
+ * @model containment="true"
+ * @generated
+ */
+ Counter getObjCounter();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.SubSystemInstance#getObjCounter <em>Obj Counter</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Obj Counter</em>' containment reference.
+ * @see #getObjCounter()
+ * @generated
+ */
+ void setObjCounter(Counter value);
+
+} // ComponentInstance
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/TransitionChain.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/TransitionChain.java
new file mode 100644
index 000000000..5154911fa
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/TransitionChain.java
@@ -0,0 +1,81 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen;
+
+import org.eclipse.etrice.core.room.State;
+import org.eclipse.etrice.core.room.Transition;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- 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.generator.etricegen.TransitionChain#getTransition <em>Transition</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage#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.generator.etricegen.ETriceGenPackage#getTransitionChain_Transition()
+ * @model
+ * @generated
+ */
+ Transition getTransition();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.etrice.generator.etricegen.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);
+
+ /**
+ * <!-- 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.generator.etricegen.ITransitionChainVisitor"
+ * @generated
+ */
+ String genExecuteChain(ITransitionChainVisitor tcv);
+
+} // TransitionChain
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ActiveTriggerImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ActiveTriggerImpl.java
new file mode 100644
index 000000000..554ff64f4
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ActiveTriggerImpl.java
@@ -0,0 +1,333 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+
+import org.eclipse.etrice.core.room.InterfaceItem;
+import org.eclipse.etrice.core.room.Message;
+import org.eclipse.etrice.core.room.TriggeredTransition;
+import org.eclipse.etrice.generator.etricegen.ActiveTrigger;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+
+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.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Active Trigger</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.ActiveTriggerImpl#getMsg <em>Msg</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.ActiveTriggerImpl#getIfitem <em>Ifitem</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.ActiveTriggerImpl#getTrigger <em>Trigger</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.ActiveTriggerImpl#getTransitions <em>Transitions</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ActiveTriggerImpl extends EObjectImpl implements ActiveTrigger {
+ /**
+ * The cached value of the '{@link #getMsg() <em>Msg</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMsg()
+ * @generated
+ * @ordered
+ */
+ protected Message msg;
+
+ /**
+ * The cached value of the '{@link #getIfitem() <em>Ifitem</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIfitem()
+ * @generated
+ * @ordered
+ */
+ protected InterfaceItem ifitem;
+
+ /**
+ * The default value of the '{@link #getTrigger() <em>Trigger</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTrigger()
+ * @generated
+ * @ordered
+ */
+ protected static final String TRIGGER_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getTrigger() <em>Trigger</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTrigger()
+ * @generated
+ * @ordered
+ */
+ protected String trigger = TRIGGER_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getTransitions() <em>Transitions</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTransitions()
+ * @generated
+ * @ordered
+ */
+ protected EList<TriggeredTransition> transitions;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ActiveTriggerImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ETriceGenPackage.Literals.ACTIVE_TRIGGER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Message getMsg() {
+ if (msg != null && msg.eIsProxy()) {
+ InternalEObject oldMsg = (InternalEObject)msg;
+ msg = (Message)eResolveProxy(oldMsg);
+ if (msg != oldMsg) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ETriceGenPackage.ACTIVE_TRIGGER__MSG, oldMsg, msg));
+ }
+ }
+ return msg;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Message basicGetMsg() {
+ return msg;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMsg(Message newMsg) {
+ Message oldMsg = msg;
+ msg = newMsg;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.ACTIVE_TRIGGER__MSG, oldMsg, msg));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InterfaceItem getIfitem() {
+ if (ifitem != null && ifitem.eIsProxy()) {
+ InternalEObject oldIfitem = (InternalEObject)ifitem;
+ ifitem = (InterfaceItem)eResolveProxy(oldIfitem);
+ if (ifitem != oldIfitem) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ETriceGenPackage.ACTIVE_TRIGGER__IFITEM, oldIfitem, ifitem));
+ }
+ }
+ return ifitem;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InterfaceItem basicGetIfitem() {
+ return ifitem;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setIfitem(InterfaceItem newIfitem) {
+ InterfaceItem oldIfitem = ifitem;
+ ifitem = newIfitem;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.ACTIVE_TRIGGER__IFITEM, oldIfitem, ifitem));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getTrigger() {
+ return trigger;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTrigger(String newTrigger) {
+ String oldTrigger = trigger;
+ trigger = newTrigger;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.ACTIVE_TRIGGER__TRIGGER, oldTrigger, trigger));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<TriggeredTransition> getTransitions() {
+ if (transitions == null) {
+ transitions = new EObjectResolvingEList<TriggeredTransition>(TriggeredTransition.class, this, ETriceGenPackage.ACTIVE_TRIGGER__TRANSITIONS);
+ }
+ return transitions;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ETriceGenPackage.ACTIVE_TRIGGER__MSG:
+ if (resolve) return getMsg();
+ return basicGetMsg();
+ case ETriceGenPackage.ACTIVE_TRIGGER__IFITEM:
+ if (resolve) return getIfitem();
+ return basicGetIfitem();
+ case ETriceGenPackage.ACTIVE_TRIGGER__TRIGGER:
+ return getTrigger();
+ case ETriceGenPackage.ACTIVE_TRIGGER__TRANSITIONS:
+ return getTransitions();
+ }
+ 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 ETriceGenPackage.ACTIVE_TRIGGER__MSG:
+ setMsg((Message)newValue);
+ return;
+ case ETriceGenPackage.ACTIVE_TRIGGER__IFITEM:
+ setIfitem((InterfaceItem)newValue);
+ return;
+ case ETriceGenPackage.ACTIVE_TRIGGER__TRIGGER:
+ setTrigger((String)newValue);
+ return;
+ case ETriceGenPackage.ACTIVE_TRIGGER__TRANSITIONS:
+ getTransitions().clear();
+ getTransitions().addAll((Collection<? extends TriggeredTransition>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.ACTIVE_TRIGGER__MSG:
+ setMsg((Message)null);
+ return;
+ case ETriceGenPackage.ACTIVE_TRIGGER__IFITEM:
+ setIfitem((InterfaceItem)null);
+ return;
+ case ETriceGenPackage.ACTIVE_TRIGGER__TRIGGER:
+ setTrigger(TRIGGER_EDEFAULT);
+ return;
+ case ETriceGenPackage.ACTIVE_TRIGGER__TRANSITIONS:
+ getTransitions().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.ACTIVE_TRIGGER__MSG:
+ return msg != null;
+ case ETriceGenPackage.ACTIVE_TRIGGER__IFITEM:
+ return ifitem != null;
+ case ETriceGenPackage.ACTIVE_TRIGGER__TRIGGER:
+ return TRIGGER_EDEFAULT == null ? trigger != null : !TRIGGER_EDEFAULT.equals(trigger);
+ case ETriceGenPackage.ACTIVE_TRIGGER__TRANSITIONS:
+ return transitions != null && !transitions.isEmpty();
+ }
+ 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(" (trigger: ");
+ result.append(trigger);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ActiveTriggerImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ActorInstanceImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ActorInstanceImpl.java
new file mode 100644
index 000000000..d54bd272d
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ActorInstanceImpl.java
@@ -0,0 +1,157 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.etrice.core.room.ActorClass;
+import org.eclipse.etrice.generator.etricegen.ActorInstance;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Actor Instance</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.ActorInstanceImpl#getActorClass <em>Actor Class</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ActorInstanceImpl extends StructureInstanceImpl implements ActorInstance {
+ /**
+ * The cached value of the '{@link #getActorClass() <em>Actor Class</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getActorClass()
+ * @generated
+ * @ordered
+ */
+ protected ActorClass actorClass;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ActorInstanceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ETriceGenPackage.Literals.ACTOR_INSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ActorClass getActorClass() {
+ if (actorClass != null && actorClass.eIsProxy()) {
+ InternalEObject oldActorClass = (InternalEObject)actorClass;
+ actorClass = (ActorClass)eResolveProxy(oldActorClass);
+ if (actorClass != oldActorClass) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ETriceGenPackage.ACTOR_INSTANCE__ACTOR_CLASS, oldActorClass, actorClass));
+ }
+ }
+ return actorClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ActorClass basicGetActorClass() {
+ return actorClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setActorClass(ActorClass newActorClass) {
+ ActorClass oldActorClass = actorClass;
+ actorClass = newActorClass;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.ACTOR_INSTANCE__ACTOR_CLASS, oldActorClass, actorClass));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ETriceGenPackage.ACTOR_INSTANCE__ACTOR_CLASS:
+ if (resolve) return getActorClass();
+ return basicGetActorClass();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ETriceGenPackage.ACTOR_INSTANCE__ACTOR_CLASS:
+ setActorClass((ActorClass)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.ACTOR_INSTANCE__ACTOR_CLASS:
+ setActorClass((ActorClass)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.ACTOR_INSTANCE__ACTOR_CLASS:
+ return actorClass != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ActorInstanceImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/BindingInstanceImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/BindingInstanceImpl.java
new file mode 100644
index 000000000..dcafafc88
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/BindingInstanceImpl.java
@@ -0,0 +1,171 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+
+import java.util.Collection;
+
+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.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.etrice.generator.etricegen.BindingInstance;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+import org.eclipse.etrice.generator.etricegen.PortInstance;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Binding Instance</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.BindingInstanceImpl#getPorts <em>Ports</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class BindingInstanceImpl extends EObjectImpl implements BindingInstance {
+ /**
+ * The cached value of the '{@link #getPorts() <em>Ports</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPorts()
+ * @generated
+ * @ordered
+ */
+ protected EList<PortInstance> ports;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BindingInstanceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ETriceGenPackage.Literals.BINDING_INSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PortInstance> getPorts() {
+ if (ports == null) {
+ ports = new EObjectWithInverseResolvingEList.ManyInverse<PortInstance>(PortInstance.class, this, ETriceGenPackage.BINDING_INSTANCE__PORTS, ETriceGenPackage.PORT_INSTANCE__BINDINGS);
+ }
+ return ports;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ETriceGenPackage.BINDING_INSTANCE__PORTS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getPorts()).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 ETriceGenPackage.BINDING_INSTANCE__PORTS:
+ return ((InternalEList<?>)getPorts()).basicRemove(otherEnd, 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 ETriceGenPackage.BINDING_INSTANCE__PORTS:
+ return getPorts();
+ }
+ 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 ETriceGenPackage.BINDING_INSTANCE__PORTS:
+ getPorts().clear();
+ getPorts().addAll((Collection<? extends PortInstance>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.BINDING_INSTANCE__PORTS:
+ getPorts().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.BINDING_INSTANCE__PORTS:
+ return ports != null && !ports.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //BindingInstanceImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ConnectionInstanceImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ConnectionInstanceImpl.java
new file mode 100644
index 000000000..f67d05153
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ConnectionInstanceImpl.java
@@ -0,0 +1,424 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+
+import org.eclipse.etrice.core.room.LayerConnection;
+import org.eclipse.etrice.generator.etricegen.ActorInstance;
+import org.eclipse.etrice.generator.etricegen.ConnectionInstance;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+import org.eclipse.etrice.generator.etricegen.SPPInstance;
+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.emf.ecore.impl.EObjectImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Connection Instance</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.ConnectionInstanceImpl#getFromAI <em>From AI</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.ConnectionInstanceImpl#getFromSPP <em>From SPP</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.ConnectionInstanceImpl#getToSPP <em>To SPP</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.ConnectionInstanceImpl#getConnection <em>Connection</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ConnectionInstanceImpl extends EObjectImpl implements ConnectionInstance {
+ /**
+ * The cached value of the '{@link #getFromAI() <em>From AI</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFromAI()
+ * @generated
+ * @ordered
+ */
+ protected ActorInstance fromAI;
+
+ /**
+ * The cached value of the '{@link #getFromSPP() <em>From SPP</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFromSPP()
+ * @generated
+ * @ordered
+ */
+ protected SPPInstance fromSPP;
+
+ /**
+ * The cached value of the '{@link #getToSPP() <em>To SPP</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getToSPP()
+ * @generated
+ * @ordered
+ */
+ protected SPPInstance toSPP;
+
+ /**
+ * The cached value of the '{@link #getConnection() <em>Connection</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getConnection()
+ * @generated
+ * @ordered
+ */
+ protected LayerConnection connection;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ConnectionInstanceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ETriceGenPackage.Literals.CONNECTION_INSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ActorInstance getFromAI() {
+ if (fromAI != null && fromAI.eIsProxy()) {
+ InternalEObject oldFromAI = (InternalEObject)fromAI;
+ fromAI = (ActorInstance)eResolveProxy(oldFromAI);
+ if (fromAI != oldFromAI) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ETriceGenPackage.CONNECTION_INSTANCE__FROM_AI, oldFromAI, fromAI));
+ }
+ }
+ return fromAI;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ActorInstance basicGetFromAI() {
+ return fromAI;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFromAI(ActorInstance newFromAI) {
+ ActorInstance oldFromAI = fromAI;
+ fromAI = newFromAI;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.CONNECTION_INSTANCE__FROM_AI, oldFromAI, fromAI));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SPPInstance getFromSPP() {
+ if (fromSPP != null && fromSPP.eIsProxy()) {
+ InternalEObject oldFromSPP = (InternalEObject)fromSPP;
+ fromSPP = (SPPInstance)eResolveProxy(oldFromSPP);
+ if (fromSPP != oldFromSPP) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ETriceGenPackage.CONNECTION_INSTANCE__FROM_SPP, oldFromSPP, fromSPP));
+ }
+ }
+ return fromSPP;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SPPInstance basicGetFromSPP() {
+ return fromSPP;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetFromSPP(SPPInstance newFromSPP, NotificationChain msgs) {
+ SPPInstance oldFromSPP = fromSPP;
+ fromSPP = newFromSPP;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ETriceGenPackage.CONNECTION_INSTANCE__FROM_SPP, oldFromSPP, newFromSPP);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFromSPP(SPPInstance newFromSPP) {
+ if (newFromSPP != fromSPP) {
+ NotificationChain msgs = null;
+ if (fromSPP != null)
+ msgs = ((InternalEObject)fromSPP).eInverseRemove(this, ETriceGenPackage.SPP_INSTANCE__OUTGOING, SPPInstance.class, msgs);
+ if (newFromSPP != null)
+ msgs = ((InternalEObject)newFromSPP).eInverseAdd(this, ETriceGenPackage.SPP_INSTANCE__OUTGOING, SPPInstance.class, msgs);
+ msgs = basicSetFromSPP(newFromSPP, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.CONNECTION_INSTANCE__FROM_SPP, newFromSPP, newFromSPP));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SPPInstance getToSPP() {
+ if (toSPP != null && toSPP.eIsProxy()) {
+ InternalEObject oldToSPP = (InternalEObject)toSPP;
+ toSPP = (SPPInstance)eResolveProxy(oldToSPP);
+ if (toSPP != oldToSPP) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ETriceGenPackage.CONNECTION_INSTANCE__TO_SPP, oldToSPP, toSPP));
+ }
+ }
+ return toSPP;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SPPInstance basicGetToSPP() {
+ return toSPP;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetToSPP(SPPInstance newToSPP, NotificationChain msgs) {
+ SPPInstance oldToSPP = toSPP;
+ toSPP = newToSPP;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ETriceGenPackage.CONNECTION_INSTANCE__TO_SPP, oldToSPP, newToSPP);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setToSPP(SPPInstance newToSPP) {
+ if (newToSPP != toSPP) {
+ NotificationChain msgs = null;
+ if (toSPP != null)
+ msgs = ((InternalEObject)toSPP).eInverseRemove(this, ETriceGenPackage.SPP_INSTANCE__INCOMING, SPPInstance.class, msgs);
+ if (newToSPP != null)
+ msgs = ((InternalEObject)newToSPP).eInverseAdd(this, ETriceGenPackage.SPP_INSTANCE__INCOMING, SPPInstance.class, msgs);
+ msgs = basicSetToSPP(newToSPP, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.CONNECTION_INSTANCE__TO_SPP, newToSPP, newToSPP));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public LayerConnection getConnection() {
+ if (connection != null && connection.eIsProxy()) {
+ InternalEObject oldConnection = (InternalEObject)connection;
+ connection = (LayerConnection)eResolveProxy(oldConnection);
+ if (connection != oldConnection) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ETriceGenPackage.CONNECTION_INSTANCE__CONNECTION, oldConnection, connection));
+ }
+ }
+ return connection;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public LayerConnection basicGetConnection() {
+ return connection;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setConnection(LayerConnection newConnection) {
+ LayerConnection oldConnection = connection;
+ connection = newConnection;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.CONNECTION_INSTANCE__CONNECTION, oldConnection, connection));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ETriceGenPackage.CONNECTION_INSTANCE__FROM_SPP:
+ if (fromSPP != null)
+ msgs = ((InternalEObject)fromSPP).eInverseRemove(this, ETriceGenPackage.SPP_INSTANCE__OUTGOING, SPPInstance.class, msgs);
+ return basicSetFromSPP((SPPInstance)otherEnd, msgs);
+ case ETriceGenPackage.CONNECTION_INSTANCE__TO_SPP:
+ if (toSPP != null)
+ msgs = ((InternalEObject)toSPP).eInverseRemove(this, ETriceGenPackage.SPP_INSTANCE__INCOMING, SPPInstance.class, msgs);
+ return basicSetToSPP((SPPInstance)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 ETriceGenPackage.CONNECTION_INSTANCE__FROM_SPP:
+ return basicSetFromSPP(null, msgs);
+ case ETriceGenPackage.CONNECTION_INSTANCE__TO_SPP:
+ return basicSetToSPP(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 ETriceGenPackage.CONNECTION_INSTANCE__FROM_AI:
+ if (resolve) return getFromAI();
+ return basicGetFromAI();
+ case ETriceGenPackage.CONNECTION_INSTANCE__FROM_SPP:
+ if (resolve) return getFromSPP();
+ return basicGetFromSPP();
+ case ETriceGenPackage.CONNECTION_INSTANCE__TO_SPP:
+ if (resolve) return getToSPP();
+ return basicGetToSPP();
+ case ETriceGenPackage.CONNECTION_INSTANCE__CONNECTION:
+ if (resolve) return getConnection();
+ return basicGetConnection();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ETriceGenPackage.CONNECTION_INSTANCE__FROM_AI:
+ setFromAI((ActorInstance)newValue);
+ return;
+ case ETriceGenPackage.CONNECTION_INSTANCE__FROM_SPP:
+ setFromSPP((SPPInstance)newValue);
+ return;
+ case ETriceGenPackage.CONNECTION_INSTANCE__TO_SPP:
+ setToSPP((SPPInstance)newValue);
+ return;
+ case ETriceGenPackage.CONNECTION_INSTANCE__CONNECTION:
+ setConnection((LayerConnection)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.CONNECTION_INSTANCE__FROM_AI:
+ setFromAI((ActorInstance)null);
+ return;
+ case ETriceGenPackage.CONNECTION_INSTANCE__FROM_SPP:
+ setFromSPP((SPPInstance)null);
+ return;
+ case ETriceGenPackage.CONNECTION_INSTANCE__TO_SPP:
+ setToSPP((SPPInstance)null);
+ return;
+ case ETriceGenPackage.CONNECTION_INSTANCE__CONNECTION:
+ setConnection((LayerConnection)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.CONNECTION_INSTANCE__FROM_AI:
+ return fromAI != null;
+ case ETriceGenPackage.CONNECTION_INSTANCE__FROM_SPP:
+ return fromSPP != null;
+ case ETriceGenPackage.CONNECTION_INSTANCE__TO_SPP:
+ return toSPP != null;
+ case ETriceGenPackage.CONNECTION_INSTANCE__CONNECTION:
+ return connection != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ConnectionInstanceImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/CounterImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/CounterImpl.java
new file mode 100644
index 000000000..993d8f007
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/CounterImpl.java
@@ -0,0 +1,187 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.etrice.generator.etricegen.Counter;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Counter</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.CounterImpl#getCounter <em>Counter</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class CounterImpl extends EObjectImpl implements Counter {
+ /**
+ * The default value of the '{@link #getCounter() <em>Counter</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCounter()
+ * @generated
+ * @ordered
+ */
+ protected static final int COUNTER_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getCounter() <em>Counter</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCounter()
+ * @generated
+ * @ordered
+ */
+ protected int counter = COUNTER_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CounterImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ETriceGenPackage.Literals.COUNTER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getCounter() {
+ return counter;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCounter(int newCounter) {
+ int oldCounter = counter;
+ counter = newCounter;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.COUNTER__COUNTER, oldCounter, counter));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getAndIncrementCount() {
+ return getAndIncrementCount(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getAndIncrementCount(int n) {
+ int count = getCounter();
+ setCounter(count+n);
+ return count;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ETriceGenPackage.COUNTER__COUNTER:
+ return getCounter();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ETriceGenPackage.COUNTER__COUNTER:
+ setCounter((Integer)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.COUNTER__COUNTER:
+ setCounter(COUNTER_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.COUNTER__COUNTER:
+ return counter != COUNTER_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(" (counter: ");
+ result.append(counter);
+ result.append(')');
+ return result.toString();
+ }
+
+} //CounterImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ETriceGenFactoryImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ETriceGenFactoryImpl.java
new file mode 100644
index 000000000..32efb41f4
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ETriceGenFactoryImpl.java
@@ -0,0 +1,304 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.eclipse.etrice.generator.etricegen.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ETriceGenFactoryImpl extends EFactoryImpl implements ETriceGenFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ETriceGenFactory init() {
+ try {
+ ETriceGenFactory theETriceGenFactory = (ETriceGenFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/etrice/generator");
+ if (theETriceGenFactory != null) {
+ return theETriceGenFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new ETriceGenFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ETriceGenFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case ETriceGenPackage.ROOT: return createRoot();
+ case ETriceGenPackage.COUNTER: return createCounter();
+ case ETriceGenPackage.STRUCTURE_INSTANCE: return createStructureInstance();
+ case ETriceGenPackage.SUB_SYSTEM_INSTANCE: return createSubSystemInstance();
+ case ETriceGenPackage.ACTOR_INSTANCE: return createActorInstance();
+ case ETriceGenPackage.INTERFACE_ITEM_INSTANCE: return createInterfaceItemInstance();
+ case ETriceGenPackage.PORT_INSTANCE: return createPortInstance();
+ case ETriceGenPackage.BINDING_INSTANCE: return createBindingInstance();
+ case ETriceGenPackage.SAP_INSTANCE: return createSAPInstance();
+ case ETriceGenPackage.SPP_INSTANCE: return createSPPInstance();
+ case ETriceGenPackage.SERVICE_IMPL_INSTANCE: return createServiceImplInstance();
+ case ETriceGenPackage.CONNECTION_INSTANCE: return createConnectionInstance();
+ case ETriceGenPackage.ACTIVE_TRIGGER: return createActiveTrigger();
+ case ETriceGenPackage.TRANSITION_CHAIN: return createTransitionChain();
+ case ETriceGenPackage.EXPANDED_ACTOR_CLASS: return createExpandedActorClass();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case ETriceGenPackage.PORT_KIND:
+ return createPortKindFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case ETriceGenPackage.PORT_KIND:
+ return convertPortKindToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Root createRoot() {
+ RootImpl root = new RootImpl();
+ return root;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Counter createCounter() {
+ CounterImpl counter = new CounterImpl();
+ return counter;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StructureInstance createStructureInstance() {
+ StructureInstanceImpl structureInstance = new StructureInstanceImpl();
+ return structureInstance;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SubSystemInstance createSubSystemInstance() {
+ SubSystemInstanceImpl subSystemInstance = new SubSystemInstanceImpl();
+ return subSystemInstance;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ActorInstance createActorInstance() {
+ ActorInstanceImpl actorInstance = new ActorInstanceImpl();
+ return actorInstance;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public InterfaceItemInstance createInterfaceItemInstance() {
+ InterfaceItemInstanceImpl interfaceItemInstance = new InterfaceItemInstanceImpl();
+ return interfaceItemInstance;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PortInstance createPortInstance() {
+ PortInstanceImpl portInstance = new PortInstanceImpl();
+ return portInstance;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BindingInstance createBindingInstance() {
+ BindingInstanceImpl bindingInstance = new BindingInstanceImpl();
+ return bindingInstance;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SAPInstance createSAPInstance() {
+ SAPInstanceImpl sapInstance = new SAPInstanceImpl();
+ return sapInstance;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SPPInstance createSPPInstance() {
+ SPPInstanceImpl sppInstance = new SPPInstanceImpl();
+ return sppInstance;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ServiceImplInstance createServiceImplInstance() {
+ ServiceImplInstanceImpl serviceImplInstance = new ServiceImplInstanceImpl();
+ return serviceImplInstance;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConnectionInstance createConnectionInstance() {
+ ConnectionInstanceImpl connectionInstance = new ConnectionInstanceImpl();
+ return connectionInstance;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ActiveTrigger createActiveTrigger() {
+ ActiveTriggerImpl activeTrigger = new ActiveTriggerImpl();
+ return activeTrigger;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public TransitionChain createTransitionChain() {
+ TransitionChainImpl transitionChain = new TransitionChainImpl();
+ return transitionChain;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ExpandedActorClass createExpandedActorClass() {
+ ExpandedActorClassImpl expandedActorClass = new ExpandedActorClassImpl();
+ return expandedActorClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PortKind createPortKindFromString(EDataType eDataType, String initialValue) {
+ PortKind result = PortKind.get(initialValue);
+ if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertPortKindToString(EDataType eDataType, Object instanceValue) {
+ return instanceValue == null ? null : instanceValue.toString();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ETriceGenPackage getETriceGenPackage() {
+ return (ETriceGenPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static ETriceGenPackage getPackage() {
+ return ETriceGenPackage.eINSTANCE;
+ }
+
+} //ETriceGenFactoryImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ETriceGenPackageImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ETriceGenPackageImpl.java
new file mode 100644
index 000000000..097c944ce
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ETriceGenPackageImpl.java
@@ -0,0 +1,1120 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
+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.room.RoomPackage;
+
+import org.eclipse.etrice.generator.etricegen.ActiveTrigger;
+import org.eclipse.etrice.generator.etricegen.ActorInstance;
+import org.eclipse.etrice.generator.etricegen.BindingInstance;
+import org.eclipse.etrice.generator.etricegen.ConnectionInstance;
+import org.eclipse.etrice.generator.etricegen.Counter;
+import org.eclipse.etrice.generator.etricegen.ETriceGenFactory;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+import org.eclipse.etrice.generator.etricegen.ExpandedActorClass;
+import org.eclipse.etrice.generator.etricegen.InstanceBase;
+import org.eclipse.etrice.generator.etricegen.InterfaceItemInstance;
+import org.eclipse.etrice.generator.etricegen.PortInstance;
+import org.eclipse.etrice.generator.etricegen.PortKind;
+import org.eclipse.etrice.generator.etricegen.Root;
+import org.eclipse.etrice.generator.etricegen.SAPInstance;
+import org.eclipse.etrice.generator.etricegen.SPPInstance;
+import org.eclipse.etrice.generator.etricegen.ServiceImplInstance;
+import org.eclipse.etrice.generator.etricegen.StructureInstance;
+import org.eclipse.etrice.generator.etricegen.SubSystemInstance;
+import org.eclipse.etrice.generator.etricegen.TransitionChain;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ETriceGenPackageImpl extends EPackageImpl implements ETriceGenPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass rootEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass counterEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass instanceBaseEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass structureInstanceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass subSystemInstanceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass actorInstanceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass interfaceItemInstanceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass portInstanceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass bindingInstanceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass sapInstanceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass sppInstanceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass serviceImplInstanceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass connectionInstanceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass activeTriggerEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass transitionChainEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass iTransitionChainVisitorEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass iDiagnosticianEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass expandedActorClassEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EEnum portKindEEnum = 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.generator.etricegen.ETriceGenPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private ETriceGenPackageImpl() {
+ super(eNS_URI, ETriceGenFactory.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 ETriceGenPackage#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 ETriceGenPackage init() {
+ if (isInited) return (ETriceGenPackage)EPackage.Registry.INSTANCE.getEPackage(ETriceGenPackage.eNS_URI);
+
+ // Obtain or create and register package
+ ETriceGenPackageImpl theETriceGenPackage = (ETriceGenPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ETriceGenPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ETriceGenPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ RoomPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theETriceGenPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theETriceGenPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theETriceGenPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(ETriceGenPackage.eNS_URI, theETriceGenPackage);
+ return theETriceGenPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getRoot() {
+ return rootEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getRoot_SubSystems() {
+ return (EReference)rootEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getRoot_Models() {
+ return (EReference)rootEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getRoot_XpActorClasses() {
+ return (EReference)rootEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getRoot_UsedDataClasses() {
+ return (EReference)rootEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getRoot_UsedProtocolClasses() {
+ return (EReference)rootEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getRoot_UsedActorClasses() {
+ return (EReference)rootEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getRoot_UsedRoomModels() {
+ return (EReference)rootEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getCounter() {
+ return counterEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getCounter_Counter() {
+ return (EAttribute)counterEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getInstanceBase() {
+ return instanceBaseEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInstanceBase_Name() {
+ return (EAttribute)instanceBaseEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInstanceBase_Path() {
+ return (EAttribute)instanceBaseEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getInstanceBase_ObjId() {
+ return (EAttribute)instanceBaseEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getStructureInstance() {
+ return structureInstanceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getStructureInstance_Instances() {
+ return (EReference)structureInstanceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getStructureInstance_Ports() {
+ return (EReference)structureInstanceEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getStructureInstance_Saps() {
+ return (EReference)structureInstanceEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getStructureInstance_Spps() {
+ return (EReference)structureInstanceEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getStructureInstance_Services() {
+ return (EReference)structureInstanceEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getStructureInstance_Bindings() {
+ return (EReference)structureInstanceEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getStructureInstance_Connections() {
+ return (EReference)structureInstanceEClass.getEStructuralFeatures().get(6);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getStructureInstance_AllContainedInstances() {
+ return (EReference)structureInstanceEClass.getEStructuralFeatures().get(7);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getStructureInstance_OrderedIfItemInstances() {
+ return (EReference)structureInstanceEClass.getEStructuralFeatures().get(8);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getSubSystemInstance() {
+ return subSystemInstanceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getSubSystemInstance_SubSystemClass() {
+ return (EReference)subSystemInstanceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getSubSystemInstance_ObjCounter() {
+ return (EReference)subSystemInstanceEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getActorInstance() {
+ return actorInstanceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getActorInstance_ActorClass() {
+ return (EReference)actorInstanceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getInterfaceItemInstance() {
+ return interfaceItemInstanceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getInterfaceItemInstance_Peers() {
+ return (EReference)interfaceItemInstanceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getPortInstance() {
+ return portInstanceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPortInstance_Port() {
+ return (EReference)portInstanceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getPortInstance_Kind() {
+ return (EAttribute)portInstanceEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPortInstance_Bindings() {
+ return (EReference)portInstanceEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getBindingInstance() {
+ return bindingInstanceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getBindingInstance_Ports() {
+ return (EReference)bindingInstanceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getSAPInstance() {
+ return sapInstanceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getSAPInstance_Sap() {
+ return (EReference)sapInstanceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getSPPInstance() {
+ return sppInstanceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getSPPInstance_Spp() {
+ return (EReference)sppInstanceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getSPPInstance_Incoming() {
+ return (EReference)sppInstanceEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getSPPInstance_Outgoing() {
+ return (EReference)sppInstanceEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getServiceImplInstance() {
+ return serviceImplInstanceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getServiceImplInstance_SvcImpl() {
+ return (EReference)serviceImplInstanceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getConnectionInstance() {
+ return connectionInstanceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getConnectionInstance_FromAI() {
+ return (EReference)connectionInstanceEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getConnectionInstance_FromSPP() {
+ return (EReference)connectionInstanceEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getConnectionInstance_ToSPP() {
+ return (EReference)connectionInstanceEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getConnectionInstance_Connection() {
+ return (EReference)connectionInstanceEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- 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 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 EClass getITransitionChainVisitor() {
+ return iTransitionChainVisitorEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getIDiagnostician() {
+ return iDiagnosticianEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getExpandedActorClass() {
+ return expandedActorClassEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getExpandedActorClass_ActorClass() {
+ return (EReference)expandedActorClassEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EEnum getPortKind() {
+ return portKindEEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ETriceGenFactory getETriceGenFactory() {
+ return (ETriceGenFactory)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
+ rootEClass = createEClass(ROOT);
+ createEReference(rootEClass, ROOT__SUB_SYSTEMS);
+ createEReference(rootEClass, ROOT__MODELS);
+ createEReference(rootEClass, ROOT__XP_ACTOR_CLASSES);
+ createEReference(rootEClass, ROOT__USED_DATA_CLASSES);
+ createEReference(rootEClass, ROOT__USED_PROTOCOL_CLASSES);
+ createEReference(rootEClass, ROOT__USED_ACTOR_CLASSES);
+ createEReference(rootEClass, ROOT__USED_ROOM_MODELS);
+
+ counterEClass = createEClass(COUNTER);
+ createEAttribute(counterEClass, COUNTER__COUNTER);
+
+ instanceBaseEClass = createEClass(INSTANCE_BASE);
+ createEAttribute(instanceBaseEClass, INSTANCE_BASE__NAME);
+ createEAttribute(instanceBaseEClass, INSTANCE_BASE__PATH);
+ createEAttribute(instanceBaseEClass, INSTANCE_BASE__OBJ_ID);
+
+ structureInstanceEClass = createEClass(STRUCTURE_INSTANCE);
+ createEReference(structureInstanceEClass, STRUCTURE_INSTANCE__INSTANCES);
+ createEReference(structureInstanceEClass, STRUCTURE_INSTANCE__PORTS);
+ createEReference(structureInstanceEClass, STRUCTURE_INSTANCE__SAPS);
+ createEReference(structureInstanceEClass, STRUCTURE_INSTANCE__SPPS);
+ createEReference(structureInstanceEClass, STRUCTURE_INSTANCE__SERVICES);
+ createEReference(structureInstanceEClass, STRUCTURE_INSTANCE__BINDINGS);
+ createEReference(structureInstanceEClass, STRUCTURE_INSTANCE__CONNECTIONS);
+ createEReference(structureInstanceEClass, STRUCTURE_INSTANCE__ALL_CONTAINED_INSTANCES);
+ createEReference(structureInstanceEClass, STRUCTURE_INSTANCE__ORDERED_IF_ITEM_INSTANCES);
+
+ subSystemInstanceEClass = createEClass(SUB_SYSTEM_INSTANCE);
+ createEReference(subSystemInstanceEClass, SUB_SYSTEM_INSTANCE__SUB_SYSTEM_CLASS);
+ createEReference(subSystemInstanceEClass, SUB_SYSTEM_INSTANCE__OBJ_COUNTER);
+
+ actorInstanceEClass = createEClass(ACTOR_INSTANCE);
+ createEReference(actorInstanceEClass, ACTOR_INSTANCE__ACTOR_CLASS);
+
+ interfaceItemInstanceEClass = createEClass(INTERFACE_ITEM_INSTANCE);
+ createEReference(interfaceItemInstanceEClass, INTERFACE_ITEM_INSTANCE__PEERS);
+
+ portInstanceEClass = createEClass(PORT_INSTANCE);
+ createEReference(portInstanceEClass, PORT_INSTANCE__PORT);
+ createEAttribute(portInstanceEClass, PORT_INSTANCE__KIND);
+ createEReference(portInstanceEClass, PORT_INSTANCE__BINDINGS);
+
+ bindingInstanceEClass = createEClass(BINDING_INSTANCE);
+ createEReference(bindingInstanceEClass, BINDING_INSTANCE__PORTS);
+
+ sapInstanceEClass = createEClass(SAP_INSTANCE);
+ createEReference(sapInstanceEClass, SAP_INSTANCE__SAP);
+
+ sppInstanceEClass = createEClass(SPP_INSTANCE);
+ createEReference(sppInstanceEClass, SPP_INSTANCE__SPP);
+ createEReference(sppInstanceEClass, SPP_INSTANCE__INCOMING);
+ createEReference(sppInstanceEClass, SPP_INSTANCE__OUTGOING);
+
+ serviceImplInstanceEClass = createEClass(SERVICE_IMPL_INSTANCE);
+ createEReference(serviceImplInstanceEClass, SERVICE_IMPL_INSTANCE__SVC_IMPL);
+
+ connectionInstanceEClass = createEClass(CONNECTION_INSTANCE);
+ createEReference(connectionInstanceEClass, CONNECTION_INSTANCE__FROM_AI);
+ createEReference(connectionInstanceEClass, CONNECTION_INSTANCE__FROM_SPP);
+ createEReference(connectionInstanceEClass, CONNECTION_INSTANCE__TO_SPP);
+ createEReference(connectionInstanceEClass, CONNECTION_INSTANCE__CONNECTION);
+
+ activeTriggerEClass = createEClass(ACTIVE_TRIGGER);
+ createEReference(activeTriggerEClass, ACTIVE_TRIGGER__MSG);
+ createEReference(activeTriggerEClass, ACTIVE_TRIGGER__IFITEM);
+ createEAttribute(activeTriggerEClass, ACTIVE_TRIGGER__TRIGGER);
+ createEReference(activeTriggerEClass, ACTIVE_TRIGGER__TRANSITIONS);
+
+ transitionChainEClass = createEClass(TRANSITION_CHAIN);
+ createEReference(transitionChainEClass, TRANSITION_CHAIN__TRANSITION);
+
+ iTransitionChainVisitorEClass = createEClass(ITRANSITION_CHAIN_VISITOR);
+
+ iDiagnosticianEClass = createEClass(IDIAGNOSTICIAN);
+
+ expandedActorClassEClass = createEClass(EXPANDED_ACTOR_CLASS);
+ createEReference(expandedActorClassEClass, EXPANDED_ACTOR_CLASS__ACTOR_CLASS);
+
+ // Create enums
+ portKindEEnum = createEEnum(PORT_KIND);
+ }
+
+ /**
+ * <!-- 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
+ RoomPackage theRoomPackage = (RoomPackage)EPackage.Registry.INSTANCE.getEPackage(RoomPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ structureInstanceEClass.getESuperTypes().add(this.getInstanceBase());
+ subSystemInstanceEClass.getESuperTypes().add(this.getStructureInstance());
+ actorInstanceEClass.getESuperTypes().add(this.getStructureInstance());
+ interfaceItemInstanceEClass.getESuperTypes().add(this.getInstanceBase());
+ portInstanceEClass.getESuperTypes().add(this.getInterfaceItemInstance());
+ sapInstanceEClass.getESuperTypes().add(this.getInterfaceItemInstance());
+ sppInstanceEClass.getESuperTypes().add(this.getInstanceBase());
+ serviceImplInstanceEClass.getESuperTypes().add(this.getInterfaceItemInstance());
+ expandedActorClassEClass.getESuperTypes().add(theRoomPackage.getActorClass());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(rootEClass, Root.class, "Root", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getRoot_SubSystems(), this.getSubSystemInstance(), null, "subSystems", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getRoot_Models(), theRoomPackage.getRoomModel(), null, "models", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getRoot_XpActorClasses(), this.getExpandedActorClass(), null, "xpActorClasses", null, 0, -1, Root.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getRoot_UsedDataClasses(), theRoomPackage.getDataClass(), null, "usedDataClasses", null, 0, -1, Root.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+ initEReference(getRoot_UsedProtocolClasses(), theRoomPackage.getProtocolClass(), null, "usedProtocolClasses", null, 0, -1, Root.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+ initEReference(getRoot_UsedActorClasses(), theRoomPackage.getActorClass(), null, "usedActorClasses", null, 0, -1, Root.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+ initEReference(getRoot_UsedRoomModels(), theRoomPackage.getRoomModel(), null, "usedRoomModels", null, 0, -1, Root.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+
+ EOperation op = addEOperation(rootEClass, theRoomPackage.getRoomModel(), "getReferencedModels", 0, -1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theRoomPackage.getRoomClass(), "cls", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(rootEClass, theRoomPackage.getProtocolClass(), "getReferencedProtocols", 0, -1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theRoomPackage.getActorClass(), "cls", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ initEClass(counterEClass, Counter.class, "Counter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getCounter_Counter(), ecorePackage.getEInt(), "counter", "0", 0, 1, Counter.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ addEOperation(counterEClass, ecorePackage.getEInt(), "getAndIncrementCount", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(counterEClass, ecorePackage.getEInt(), "getAndIncrementCount", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, ecorePackage.getEInt(), "n", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ initEClass(instanceBaseEClass, InstanceBase.class, "InstanceBase", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getInstanceBase_Name(), ecorePackage.getEString(), "name", null, 0, 1, InstanceBase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInstanceBase_Path(), ecorePackage.getEString(), "path", null, 0, 1, InstanceBase.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+ initEAttribute(getInstanceBase_ObjId(), ecorePackage.getEInt(), "objId", null, 0, 1, InstanceBase.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(structureInstanceEClass, StructureInstance.class, "StructureInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getStructureInstance_Instances(), this.getActorInstance(), null, "instances", null, 0, -1, StructureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getStructureInstance_Ports(), this.getPortInstance(), null, "ports", null, 0, -1, StructureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getStructureInstance_Saps(), this.getSAPInstance(), null, "saps", null, 0, -1, StructureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getStructureInstance_Spps(), this.getSPPInstance(), null, "spps", null, 0, -1, StructureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getStructureInstance_Services(), this.getServiceImplInstance(), null, "services", null, 0, -1, StructureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getStructureInstance_Bindings(), this.getBindingInstance(), null, "bindings", null, 0, -1, StructureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getStructureInstance_Connections(), this.getConnectionInstance(), null, "connections", null, 0, -1, StructureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getStructureInstance_AllContainedInstances(), this.getActorInstance(), null, "allContainedInstances", null, 0, -1, StructureInstance.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+ initEReference(getStructureInstance_OrderedIfItemInstances(), this.getInterfaceItemInstance(), null, "orderedIfItemInstances", null, 0, -1, StructureInstance.class, IS_TRANSIENT, !IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+
+ initEClass(subSystemInstanceEClass, SubSystemInstance.class, "SubSystemInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getSubSystemInstance_SubSystemClass(), theRoomPackage.getSubSystemClass(), null, "subSystemClass", null, 0, 1, SubSystemInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getSubSystemInstance_ObjCounter(), this.getCounter(), null, "objCounter", null, 0, 1, SubSystemInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(actorInstanceEClass, ActorInstance.class, "ActorInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getActorInstance_ActorClass(), theRoomPackage.getActorClass(), null, "actorClass", null, 0, 1, ActorInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(interfaceItemInstanceEClass, InterfaceItemInstance.class, "InterfaceItemInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getInterfaceItemInstance_Peers(), this.getInterfaceItemInstance(), null, "peers", null, 0, -1, InterfaceItemInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(portInstanceEClass, PortInstance.class, "PortInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getPortInstance_Port(), theRoomPackage.getPort(), null, "port", null, 0, 1, PortInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getPortInstance_Kind(), this.getPortKind(), "kind", null, 0, 1, PortInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPortInstance_Bindings(), this.getBindingInstance(), this.getBindingInstance_Ports(), "bindings", null, 0, -1, PortInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(bindingInstanceEClass, BindingInstance.class, "BindingInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getBindingInstance_Ports(), this.getPortInstance(), this.getPortInstance_Bindings(), "ports", null, 0, 2, BindingInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(sapInstanceEClass, SAPInstance.class, "SAPInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getSAPInstance_Sap(), theRoomPackage.getSAPRef(), null, "sap", null, 0, 1, SAPInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(sppInstanceEClass, SPPInstance.class, "SPPInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getSPPInstance_Spp(), theRoomPackage.getSPPRef(), null, "spp", null, 0, 1, SPPInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getSPPInstance_Incoming(), this.getConnectionInstance(), this.getConnectionInstance_ToSPP(), "incoming", null, 0, -1, SPPInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getSPPInstance_Outgoing(), this.getConnectionInstance(), this.getConnectionInstance_FromSPP(), "outgoing", null, 0, 1, SPPInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(serviceImplInstanceEClass, ServiceImplInstance.class, "ServiceImplInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getServiceImplInstance_SvcImpl(), theRoomPackage.getServiceImplementation(), null, "svcImpl", null, 0, 1, ServiceImplInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(connectionInstanceEClass, ConnectionInstance.class, "ConnectionInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getConnectionInstance_FromAI(), this.getActorInstance(), null, "fromAI", null, 0, 1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getConnectionInstance_FromSPP(), this.getSPPInstance(), this.getSPPInstance_Outgoing(), "fromSPP", null, 0, 1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getConnectionInstance_ToSPP(), this.getSPPInstance(), this.getSPPInstance_Incoming(), "toSPP", null, 0, 1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getConnectionInstance_Connection(), theRoomPackage.getLayerConnection(), null, "connection", null, 0, 1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(activeTriggerEClass, ActiveTrigger.class, "ActiveTrigger", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getActiveTrigger_Msg(), theRoomPackage.getMessage(), 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(), theRoomPackage.getInterfaceItem(), 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(), theRoomPackage.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(transitionChainEClass, TransitionChain.class, "TransitionChain", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getTransitionChain_Transition(), theRoomPackage.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);
+
+ addEOperation(transitionChainEClass, theRoomPackage.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);
+
+ initEClass(iTransitionChainVisitorEClass, Object.class, "ITransitionChainVisitor", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(iDiagnosticianEClass, Object.class, "IDiagnostician", IS_ABSTRACT, IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(expandedActorClassEClass, ExpandedActorClass.class, "ExpandedActorClass", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getExpandedActorClass_ActorClass(), theRoomPackage.getActorClass(), null, "actorClass", null, 0, 1, ExpandedActorClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ op = addEOperation(expandedActorClassEClass, null, "prepare", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, this.getIDiagnostician(), "validator", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ addEOperation(expandedActorClassEClass, null, "release", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(expandedActorClassEClass, null, "addOwnObject", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theRoomPackage.getStateGraphItem(), "obj", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(expandedActorClassEClass, ecorePackage.getEBoolean(), "isOwnObject", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theRoomPackage.getStateGraphItem(), "obj", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(expandedActorClassEClass, ecorePackage.getEInt(), "getInterfaceItemLocalId", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theRoomPackage.getInterfaceItem(), "ifitem", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ addEOperation(expandedActorClassEClass, ecorePackage.getEBoolean(), "hasStateMachine", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(expandedActorClassEClass, ecorePackage.getEString(), "getCode", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theRoomPackage.getDetailCode(), "code", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(expandedActorClassEClass, ecorePackage.getEString(), "getTriggerCodeName", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theRoomPackage.getMessageFromIf(), "mif", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(expandedActorClassEClass, ecorePackage.getEString(), "getTriggerCodeName", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, ecorePackage.getEString(), "mif", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(expandedActorClassEClass, theRoomPackage.getTransition(), "getOutgoingTransitions", 0, -1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theRoomPackage.getStateGraphNode(), "node", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(expandedActorClassEClass, theRoomPackage.getTransition(), "getIncomingTransitions", 0, -1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theRoomPackage.getStateGraphNode(), "node", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(expandedActorClassEClass, this.getActiveTrigger(), "getActiveTriggers", 0, -1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theRoomPackage.getState(), "state", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ addEOperation(expandedActorClassEClass, theRoomPackage.getMessageFromIf(), "getTriggers", 0, -1, IS_UNIQUE, IS_ORDERED);
+
+ addEOperation(expandedActorClassEClass, theRoomPackage.getMessageFromIf(), "getOwnTriggers", 0, -1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(expandedActorClassEClass, ecorePackage.getEString(), "getMessageID", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theRoomPackage.getMessageFromIf(), "mif", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(expandedActorClassEClass, this.getTransitionChain(), "getChain", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theRoomPackage.getTransition(), "trans", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ addEOperation(expandedActorClassEClass, this.getTransitionChain(), "getTransitionChains", 0, -1, IS_UNIQUE, IS_ORDERED);
+
+ addEOperation(expandedActorClassEClass, this.getTransitionChain(), "getOwnTransitionChains", 0, -1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(expandedActorClassEClass, theRoomPackage.getStateGraphNode(), "getNode", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theRoomPackage.getTransitionTerminal(), "tt", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(expandedActorClassEClass, ecorePackage.getEBoolean(), "isMatching", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theRoomPackage.getTrigger(), "trig", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, ecorePackage.getEString(), "trigstr", 0, 1, IS_UNIQUE, IS_ORDERED);
+
+ op = addEOperation(expandedActorClassEClass, theRoomPackage.getContinuationTransition(), "getDefaultBranch", 0, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, theRoomPackage.getTransition(), "out", 0, -1, IS_UNIQUE, IS_ORDERED);
+
+ // Initialize enums and add enum literals
+ initEEnum(portKindEEnum, PortKind.class, "PortKind");
+ addEEnumLiteral(portKindEEnum, PortKind.EXTERNAL);
+ addEEnumLiteral(portKindEEnum, PortKind.INTERNAL);
+ addEEnumLiteral(portKindEEnum, PortKind.RELAY);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //ETriceGenPackageImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ExpandedActorClassImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ExpandedActorClassImpl.java
new file mode 100644
index 000000000..d2bf63fed
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ExpandedActorClassImpl.java
@@ -0,0 +1,1191 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Notification;
+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.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.etrice.core.room.ActorClass;
+import org.eclipse.etrice.core.room.ContinuationTransition;
+import org.eclipse.etrice.core.room.DetailCode;
+import org.eclipse.etrice.core.room.InterfaceItem;
+import org.eclipse.etrice.core.room.MessageFromIf;
+import org.eclipse.etrice.core.room.State;
+import org.eclipse.etrice.core.room.StateGraphItem;
+import org.eclipse.etrice.core.room.StateGraphNode;
+import org.eclipse.etrice.core.room.Transition;
+import org.eclipse.etrice.core.room.TransitionTerminal;
+import org.eclipse.etrice.core.room.Trigger;
+import org.eclipse.etrice.core.room.impl.ActorClassImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil.Copier;
+import org.eclipse.etrice.core.naming.RoomNameProvider;
+
+import org.eclipse.etrice.core.room.BaseState;
+import org.eclipse.etrice.core.room.ChoicePoint;
+import org.eclipse.etrice.core.room.ChoicepointTerminal;
+import org.eclipse.etrice.core.room.EntryPoint;
+import org.eclipse.etrice.core.room.ExitPoint;
+import org.eclipse.etrice.core.room.ExternalPort;
+import org.eclipse.etrice.core.room.InitialTransition;
+import org.eclipse.etrice.core.room.Message;
+import org.eclipse.etrice.core.room.NonInitialTransition;
+import org.eclipse.etrice.core.room.Port;
+import org.eclipse.etrice.core.room.RefinedState;
+import org.eclipse.etrice.core.room.RoomFactory;
+import org.eclipse.etrice.core.room.RoomPackage;
+import org.eclipse.etrice.core.room.SAPRef;
+import org.eclipse.etrice.core.room.SPPRef;
+import org.eclipse.etrice.core.room.ServiceImplementation;
+import org.eclipse.etrice.core.room.StateGraph;
+import org.eclipse.etrice.core.room.StateTerminal;
+import org.eclipse.etrice.core.room.SubStateTrPointTerminal;
+import org.eclipse.etrice.core.room.TrPoint;
+import org.eclipse.etrice.core.room.TrPointTerminal;
+import org.eclipse.etrice.core.room.TransitionPoint;
+import org.eclipse.etrice.core.room.TriggeredTransition;
+import org.eclipse.etrice.core.room.TypedID;
+import org.eclipse.etrice.generator.etricegen.ActiveTrigger;
+import org.eclipse.etrice.generator.etricegen.ETriceGenFactory;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+import org.eclipse.etrice.generator.etricegen.ExpandedActorClass;
+import org.eclipse.etrice.generator.etricegen.IDiagnostician;
+import org.eclipse.etrice.generator.etricegen.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.generator.etricegen.impl.ExpandedActorClassImpl#getActorClass <em>Actor Class</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ExpandedActorClassImpl extends ActorClassImpl implements ExpandedActorClass {
+
+ private 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;
+ }
+ }
+
+ /**
+ * The cached value of the '{@link #getActorClass() <em>Actor Class</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getActorClass()
+ * @generated
+ * @ordered
+ */
+ protected ActorClass actorClass;
+
+ private static final String TRIGGER_SEP = "#";
+
+ private IDiagnostician validator;
+
+ private boolean prepared = false;
+ private HashSet<StateGraphItem> ownObjects = null;
+ private HashMap<InterfaceItem, Integer> ifitem2localId = null;
+ private HashMap<StateGraphNode, NodeData> node2data = null;
+ private HashMap<State, LinkedList<ActiveTrigger>> state2triggers = null;
+ private HashMap<String, MessageFromIf> triggerstring2mif = null;
+ private LinkedList<TransitionChain> trchains = null;
+ private HashMap<Transition, TransitionChain> trans2chain = null;
+ private HashMap<EObject, EObject> copy2orig = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ExpandedActorClassImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ETriceGenPackage.Literals.EXPANDED_ACTOR_CLASS;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ActorClass getActorClass() {
+ if (actorClass != null && actorClass.eIsProxy()) {
+ InternalEObject oldActorClass = (InternalEObject)actorClass;
+ actorClass = (ActorClass)eResolveProxy(oldActorClass);
+ if (actorClass != oldActorClass) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ETriceGenPackage.EXPANDED_ACTOR_CLASS__ACTOR_CLASS, oldActorClass, actorClass));
+ }
+ }
+ return actorClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ActorClass basicGetActorClass() {
+ return actorClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setActorClass(ActorClass newActorClass) {
+ ActorClass oldActorClass = actorClass;
+ actorClass = newActorClass;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.EXPANDED_ACTOR_CLASS__ACTOR_CLASS, oldActorClass, actorClass));
+ }
+
+ private void validationError(String msg, EObject obj) {
+ validationError(msg, obj, -1);
+ }
+
+ private void validationError(String msg, EObject obj, int feature) {
+ validator.error(msg, copy2orig.get(obj), feature);
+ }
+
+ private void buildStateGraph() {
+ // create a list of super classes, super first, sub-classes last
+ LinkedList<StateGraph> sms = new LinkedList<StateGraph>();
+ ActorClass orig = getActorClass();
+ if (orig.getStateMachine()!=null)
+ sms.addFirst(orig.getStateMachine());
+ while (orig.getBase()!=null) {
+ orig = orig.getBase();
+ if (orig.getStateMachine()!=null)
+ sms.addFirst(orig.getStateMachine());
+ }
+
+ // 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> all = copier.copyAll(sms);
+ copier.copyReferences();
+ for (EObject o : copier.keySet()) {
+ EObject c = copier.get(o);
+ copy2orig.put(c, o);
+ }
+
+ // remove self from this list
+ StateGraph self = null;
+ for (Iterator<StateGraph> it = all.iterator(); it.hasNext();) {
+ self = it.next();
+ }
+ all.remove(self);
+
+ // now we move all base class state machine contents to our state machine
+ StateGraph sm = RoomFactory.eINSTANCE.createStateGraph();
+ setStateMachine(sm);
+ for (StateGraph sml : all) {
+ sm.getChPoints().addAll(sml.getChPoints());
+ sm.getStates().addAll(sml.getStates());
+ sm.getTrPoints().addAll(sml.getTrPoints());
+ sm.getTransitions().addAll(sml.getTransitions());
+ }
+
+ // then we relocate the refined state contents to their respective base state and remove all refined states
+ relocateRefinedStateContents(sm, true);
+
+ if (getActorClass().getStateMachine()!=null) {
+ TreeIterator<EObject> it = self.eAllContents();
+ while (it.hasNext()) {
+ EObject obj = it.next();
+ if (obj instanceof StateGraphItem)
+ addOwnObject((StateGraphItem)obj);
+ }
+
+ sm.getChPoints().addAll(self.getChPoints());
+ sm.getStates().addAll(self.getStates());
+ sm.getTrPoints().addAll(self.getTrPoints());
+ sm.getTransitions().addAll(self.getTransitions());
+
+ // then we relocate the refined state contents to their respective base state while keeping all refined states
+ relocateRefinedStateContents(sm, false);
+ }
+ }
+
+ /**
+ * remove refined states and relocate their respective contents to the
+ * corresponding base state
+ * @param sg - the current context (will be called recursively)
+ * @param remove - if true the refined states are removed, if false they are moved
+ * to be siblings of their base states
+ */
+ private void relocateRefinedStateContents(StateGraph sg, boolean remove) {
+ LinkedList<RefinedState> refinedstates = new LinkedList<RefinedState>();
+ for (State s : sg.getStates()) {
+ if (s instanceof RefinedState) {
+ RefinedState rs = (RefinedState) s;
+ refinedstates.add(rs);
+ BaseState bs = rs.getBase();
+ if (!remove) {
+ StateGraph parent = (StateGraph) bs.eContainer();
+ parent.getStates().add(rs);
+ }
+
+ // relocate contents
+ StateGraph fromSG = rs.getSubgraph();
+ if (fromSG!=null) {
+ StateGraph toSG = bs.getSubgraph();
+ if (toSG==null) {
+ toSG = RoomFactory.eINSTANCE.createStateGraph();
+ bs.setSubgraph(toSG);
+ }
+ toSG.getChPoints().addAll(fromSG.getChPoints());
+ toSG.getStates().addAll(fromSG.getStates());
+ toSG.getTrPoints().addAll(fromSG.getTrPoints());
+ toSG.getTransitions().addAll(fromSG.getTransitions());
+ }
+ }
+ }
+
+ if (remove) {
+ // remove empty refined states
+ sg.getStates().removeAll(refinedstates);
+ }
+
+ // recurse down into states
+ for (State s : sg.getStates()) {
+ if (s.getSubgraph()!=null)
+ relocateRefinedStateContents(s.getSubgraph(), remove);
+ }
+ }
+
+ 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(getNode(((NonInitialTransition)t).getFrom()), t);
+ }
+ }
+ }
+
+ 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 (!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(getName()+": Having no initial transition in a nested state is valid only if there is no transition to history except of self transitions!", sg.eContainer(), RoomPackage.STATE__SUBGRAPH);
+ }
+ }
+ else {
+ validationError(getName()+": The TOP level has to have an initial transition!", sg, RoomPackage.STATE_GRAPH__TRANSITIONS);
+ }
+ }
+ else {
+ if (initCount>1)
+ validationError(getName()+": There has to be exactly one initial transition!", sg, RoomPackage.STATE_GRAPH__TRANSITIONS);
+ }
+
+ for (ChoicePoint cp : sg.getChPoints()) {
+ NodeData data = node2data.get(cp);
+ if (data==null) {
+ validationError(getName()+": ChoicePoint is not connected!", cp, -1);
+ }
+ else {
+ if (data.getInTrans().size()!=1)
+ validationError(getName()+": ChoicePoint has "+data.getInTrans().size()+" incoming transitions!", cp, -1);
+ if (data.getOutTrans().size()<2)
+ validationError(getName()+": ChoicePoint should have 2 or more branches but has "+data.getOutTrans().size(), cp, -1);
+ if (getDefaultBranch(data.getOutTrans())==null)
+ validationError(getName()+": ChoicePoint has no default branch!", cp, -1);
+ if (!data.getLoopTransitions().isEmpty())
+ validationError(getName()+": ChoicePoint is connected to itself!", cp, -1);
+ }
+ }
+
+ for (TrPoint tp : sg.getTrPoints()) {
+ NodeData data = node2data.get(tp);
+
+ if (data==null) {
+ if (!getActorClass(tp).isAbstract())
+ validationError(getName()+": TrPoint is not connected", tp, -1);
+ }
+ else {
+ if ((tp instanceof EntryPoint)||(tp instanceof ExitPoint)) {
+ // non-abstract classes must have incoming transitions for entry and exit points
+ if (!isAbstract() && data.getInTrans().isEmpty())
+ validationError(getName()+": TrPoint has no incoming transition!", tp, -1);
+
+ if (getActorClass(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(getName()+": TrPoint must have at most one outgoing transition!", tp, -1);
+ }
+ else {
+ // non-abstract or non-inherited transition points must have one outgoing transition
+ if (data.getOutTrans().size()!=1)
+ validationError(getName()+": TrPoint must have exactly one outgoing transition!", tp, -1);
+ }
+
+ if (!data.getLoopTransitions().isEmpty())
+ validationError(getName()+": TrPoint must have no self transitions!", tp, -1);
+ }
+ else if (tp instanceof TransitionPoint) {
+ if (data.getOutTrans().size()<data.getLoopTransitions().size())
+ validationError(getName()+": TrPoint must have no incoming transitions!", tp, -1);
+ }
+ }
+ }
+
+ // 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) {
+ return mifp.getFrom().getName()+TRIGGER_SEP+mifp.getMessage().getName();
+ }
+
+ 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);
+ if (at==null) {
+ // this is a new trigger (and our unique point of ActiveTrigger creation)
+ at = ETriceGenFactory.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 consistency of guards
+ TriggeredTransition lastChecked = null;
+ boolean isNotGuarded = true;
+ for (TriggeredTransition t2 : at.getTransitions()) {
+ for (Trigger trig2 : t2.getTriggers()) {
+ if (isMatching(trig2, tr)) {
+ if (trig2.getGuard()!=null)
+ if (trig2.getGuard().getGuard()!=null)
+ if (!trig2.getGuard().getGuard().getCommands().isEmpty())
+ isNotGuarded = false;
+ lastChecked = t2;
+ }
+ }
+ }
+ if (lastChecked!=null) {
+ if (!isNotGuarded) {
+ boolean guardRequired = false;
+ if (lastChecked.getFrom() instanceof TrPoint)
+ if (lastChecked.eContainer()==tt.eContainer())
+ // lastChecked and tt originate in TrPoints of the same super state
+ guardRequired = true;
+ if (tt.getFrom()==lastChecked.getFrom())
+ // lastChecked and tt originate in the same State or TrPoint
+ guardRequired = true;
+ if (guardRequired) {
+ if (trig.getGuard()==null)
+ validationError("Transitions with same trigger on same level have to be guarded!", t, RoomPackage.TRIGGERED_TRANSITION__TRIGGERS);
+ if (trig.getGuard().getGuard()==null)
+ validationError("Transitions with same trigger on same level have to be guarded!", t, RoomPackage.TRIGGERED_TRANSITION__TRIGGERS);
+ if (!trig.getGuard().getGuard().getCommands().isEmpty())
+ validationError("Transitions with same trigger on same level have to be guarded!", t, RoomPackage.TRIGGERED_TRANSITION__TRIGGERS);
+ }
+ at.getTransitions().add(tt);
+ }
+ // else this transition is inactive
+ }
+ else {
+ at.getTransitions().add(tt);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ 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, InterfaceItem> name2ifitem = new HashMap<String, InterfaceItem>();
+ HashMap<String, EList<Message>> name2msgs = new HashMap<String, EList<Message>>();
+ ActorClass ac = getActorClass();
+ while (ac!=null) {
+ for (Port ip : ac.getIntPorts()) {
+ mapPort(ip, name2ifitem, name2msgs);
+ }
+ for (ExternalPort ep : ac.getExtPorts()) {
+ mapPort(ep.getIfport(), name2ifitem, name2msgs);
+ }
+ for (SAPRef sap : ac.getStrSAPs()) {
+ mapSAP(sap, name2ifitem, name2msgs);
+ }
+ for (ServiceImplementation spp : ac.getServiceImplementations()) {
+ mapSPP(spp.getSpp(), name2ifitem, name2msgs);
+ }
+
+ ac = ac.getBase();
+ }
+
+ // 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!";
+
+ InterfaceItem 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)!";
+
+ EList<Message> 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)!";
+
+ Message msg = null;
+ for (Message m : msgs) {
+ if (m.getName().equals(parts[1]))
+ msg = m;
+ }
+
+ // this should always hold true
+ assert(msg!=null): "The message '"+parts[1]+"' did not match a message!";
+
+ MessageFromIf mif = RoomFactory.eINSTANCE.createMessageFromIf();
+ mif.setFrom(ii);
+ mif.setMessage(msg);
+ triggerstring2mif.put(trig, mif);
+ }
+ }
+
+ private void mapPort(Port p, HashMap<String, InterfaceItem> name2ifitem,
+ HashMap<String, EList<Message>> name2msgs) {
+ name2ifitem.put(p.getName(), p);
+
+ if (p.isConjugated())
+ name2msgs.put(p.getName(), p.getProtocol().getOutgoingMessages());
+ else
+ name2msgs.put(p.getName(), p.getProtocol().getIncomingMessages());
+ }
+
+ private void mapSAP(SAPRef sap, HashMap<String, InterfaceItem> name2ifitem,
+ HashMap<String, EList<Message>> name2msgs) {
+ name2ifitem.put(sap.getName(), sap);
+
+ // sap is conjugated wrt to the protocol
+ name2msgs.put(sap.getName(), sap.getProtocol().getOutgoingMessages());
+ }
+
+ private void mapSPP(SPPRef spp, HashMap<String, InterfaceItem> name2ifitem,
+ HashMap<String, EList<Message>> name2msgs) {
+ name2ifitem.put(spp.getName(), spp);
+
+ // spp is regular wrt to the protocol
+ name2msgs.put(spp.getName(), spp.getProtocol().getIncomingMessages());
+ }
+
+ private void addTransitionChain(Transition t) {
+ TransitionChain tc = ETriceGenFactory.eINSTANCE.createTransitionChain();
+ tc.setTransition(t);
+
+ if (t instanceof TriggeredTransition) {
+ List<TypedID> args = null;
+ boolean first = true;
+ for (Trigger tr : ((TriggeredTransition)t).getTriggers()) {
+ for (MessageFromIf mif : tr.getMsgFromIfPairs()) {
+ if (first) {
+ first = false;
+ args = mif.getMessage().getArguments();
+ }
+ else {
+ if (args.size()>0) {
+ if (mif.getMessage().getArguments().size()!=args.size()) {
+ validationError("If one MessageFromIf has data all have to have data for a given transition!", mif.getMessage());
+ }
+ else {
+ for (TypedID arg : args) {
+ TypedID a = mif.getMessage().getArguments().get(0);
+ if (arg.getType().getPrim()!=a.getType().getPrim())
+ validationError("The data types of all MessageFromIf have to be the same!", mif.getMessage());
+ if (arg.getType().getType()!=a.getType().getType())
+ validationError("The data types of all MessageFromIf have to be the same!", mif.getMessage());
+ }
+ }
+ }
+ else {
+ if (mif.getMessage().getArguments().size()!=0)
+ validationError("If one MessageFromIf has no data all have to have no data for a given transition!", mif.getMessage());
+ }
+ }
+ }
+ }
+
+ if (first)
+ validationError("Triggered transition has to have a message from interface!", t);
+ }
+
+ collectChainTransitions(tc, t);
+
+ trchains.add(tc);
+ }
+
+ private void collectChainTransitions(TransitionChain tc,
+ Transition t) {
+ trans2chain.put(t, tc);
+
+ // should always hold true
+// assert(t instanceof NonInitialTransition): "A transition chain must not contain initial transitions!";
+
+ StateGraphNode node = 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 (t instanceof NonInitialTransition && node==getNode(((NonInitialTransition)t).getFrom()))
+ return;
+
+ for (Transition next : getOutgoingTransitions(node)) {
+ // from the second transition in the chain on we have:
+ if (next instanceof TriggeredTransition)
+ validationError("Segments following the triggering transition can have no triggers!\n", next, -1);
+
+ collectChainTransitions(tc, next);
+ }
+ }
+
+ private void findTransitionChains(StateGraph sg) {
+ for (Transition t : sg.getTransitions()) {
+ if (t instanceof TriggeredTransition) {
+ addTransitionChain(t);
+ }
+ else if (t instanceof InitialTransition) {
+ addTransitionChain(t);
+ }
+ }
+
+ // recurse into sub graphs of states
+ for (State s : sg.getStates()) {
+ if (s.getSubgraph()!=null)
+ findTransitionChains(s.getSubgraph());
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public void prepare(IDiagnostician validator) {
+ if (prepared)
+ return;
+
+ prepared = true;
+
+ this.validator = validator;
+
+ ifitem2localId = new HashMap<InterfaceItem, Integer>();
+ ownObjects = new HashSet<StateGraphItem>();
+ node2data = new HashMap<StateGraphNode, NodeData>();
+ state2triggers = new HashMap<State, LinkedList<ActiveTrigger>>();
+ triggerstring2mif = new HashMap<String, MessageFromIf>();
+ trchains = new LinkedList<TransitionChain>();
+ trans2chain = new HashMap<Transition, TransitionChain>();
+ copy2orig = new HashMap<EObject, EObject>();
+
+ buildStateGraph();
+ computeInterfaceItemLocalIds(getActorClass(), 0);
+ findOutgoingTransitions(getStateMachine());
+
+ doChecks(getStateMachine());
+ assert(!validator.isFailed()): "Checks failed!";
+
+ findLeafStateTriggers(getStateMachine());
+ fillTriggerStringMap();
+ findTransitionChains(getStateMachine());
+ }
+
+ /**
+ * <!-- 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;
+ trchains = null;
+ trans2chain = 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);
+ }
+
+ private int computeInterfaceItemLocalIds(ActorClass ac, int offset) {
+ if (ac.getBase()!=null)
+ // first recurse into base class
+ offset = computeInterfaceItemLocalIds(ac.getBase(), offset);
+
+ for (ExternalPort ep : ac.getExtPorts()) {
+ ifitem2localId.put(ep.getIfport(), offset);
+ ++offset;
+ }
+ for (Port ip : ac.getIntPorts()) {
+ ifitem2localId.put(ip, offset);
+ ++offset;
+ }
+
+ for (SAPRef sap : ac.getStrSAPs()) {
+ ifitem2localId.put(sap, offset);
+ ++offset;
+ }
+
+ for (ServiceImplementation svc : ac.getServiceImplementations()) {
+ ifitem2localId.put(svc.getSpp(), offset);
+ ++offset;
+ }
+ return offset;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public int getInterfaceItemLocalId(InterfaceItem ifitem) {
+ Integer localId = ifitem2localId.get(ifitem);
+ if (localId!=null)
+ return localId.intValue();
+ else
+ return -1;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public boolean hasStateMachine() {
+ ActorClass ac = getActorClass();
+ while (ac!=null) {
+ if (ac.getStateMachine()!=null)
+ return true;
+ ac = ac.getBase();
+ }
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String getCode(DetailCode code) {
+ if (code.getCommands().isEmpty())
+ return "";
+
+ String result = "";
+ for (String cmd : code.getCommands()) {
+ result += cmd + "\n";
+ }
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String getTriggerCodeName(MessageFromIf mif) {
+ return "TRIG_"+mif.getFrom().getName()+"__"+mif.getMessage().getName();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String getTriggerCodeName(String trigger) {
+ String[] parts = trigger.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>();
+
+ HashSet<InterfaceItem> ownIfItems = new HashSet<InterfaceItem>();
+ ownIfItems.addAll(getActorClass().getIntPorts());
+ for (ExternalPort ep : getActorClass().getExtPorts()) {
+ ownIfItems.add(ep.getIfport());
+ }
+ ownIfItems.addAll(getActorClass().getStrSAPs());
+ for (ServiceImplementation svc : getActorClass().getServiceImplementations()) {
+ ownIfItems.add(svc.getSpp());
+ }
+
+ 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) {
+ if (mif.getFrom() instanceof Port) {
+ Port p = (Port) mif.getFrom();
+ return p.getProtocol().getName()+(p.isConjugated()?".OUT_":".IN_")+mif.getMessage().getName();
+ }
+ else if (mif.getFrom() instanceof SAPRef) {
+ SAPRef sap = (SAPRef) mif.getFrom();
+ return sap.getProtocol().getName()+".OUT_"+mif.getMessage().getName();
+ }
+ else if (mif.getFrom() instanceof SPPRef) {
+ SPPRef spp = (SPPRef) mif.getFrom();
+ return spp.getProtocol().getName()+".IN_"+mif.getMessage().getName();
+ }
+
+ return "unknown interface item";
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public TransitionChain getChain(Transition trans) {
+ return trans2chain.get(trans);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public EList<TransitionChain> getTransitionChains() {
+ return new BasicEList<TransitionChain>(trchains);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public EList<TransitionChain> getOwnTransitionChains() {
+ BasicEList<TransitionChain> result = new BasicEList<TransitionChain>();
+
+ for (TransitionChain tc : trchains) {
+ if (isOwnObject(tc.getTransition()))
+ result.add(tc);
+ }
+
+ Collections.sort(result, new Comparator<TransitionChain>() {
+
+ @Override
+ public int compare(TransitionChain o1, TransitionChain o2) {
+ return RoomNameProvider.getFullPath(o1.getTransition()).compareTo(RoomNameProvider.getFullPath(o2.getTransition()));
+ }
+
+ });
+
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public StateGraphNode getNode(TransitionTerminal tt) {
+ if (tt instanceof StateTerminal)
+ return ((StateTerminal)tt).getState();
+ else if (tt instanceof TrPointTerminal)
+ return ((TrPointTerminal)tt).getTrPoint();
+ else if (tt instanceof SubStateTrPointTerminal)
+ return ((SubStateTrPointTerminal)tt).getTrPoint();
+ else if (tt instanceof ChoicepointTerminal)
+ return ((ChoicepointTerminal)tt).getCp();
+
+ return null;
+ }
+
+ private StateGraphNode getAdjustedTargetNode(Transition t) {
+ StateGraphNode node = getNode(t.getTo());
+ if (node instanceof EntryPoint) {
+ NodeData data = node2data.get(node);
+ if (data==null || data.getOutTrans().isEmpty()) {
+ if (getActorClass(node).isAbstract()) {
+ if (node.eContainer().eContainer() instanceof State) {
+ // in this case
+ State newTarget = (State) node.eContainer().eContainer();
+ BaseState newBaseTarget = (newTarget instanceof BaseState)? (BaseState)newTarget:((RefinedState)newTarget).getBase();
+
+ StateTerminal st = RoomFactory.eINSTANCE.createStateTerminal();
+ st.setState(newBaseTarget);
+ t.setTo(st);
+
+ node = newBaseTarget;
+ }
+ }
+ }
+ }
+ return node;
+ }
+
+ private ActorClass getActorClass(EObject node) {
+ node = copy2orig.get(node);
+ while (node!=null) {
+ if (node instanceof ActorClass)
+ return (ActorClass) 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);
+ }
+ 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 ETriceGenPackage.EXPANDED_ACTOR_CLASS__ACTOR_CLASS:
+ if (resolve) return getActorClass();
+ return basicGetActorClass();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ETriceGenPackage.EXPANDED_ACTOR_CLASS__ACTOR_CLASS:
+ setActorClass((ActorClass)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.EXPANDED_ACTOR_CLASS__ACTOR_CLASS:
+ setActorClass((ActorClass)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.EXPANDED_ACTOR_CLASS__ACTOR_CLASS:
+ return actorClass != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ExpandedActorClassImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/InstanceBaseImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/InstanceBaseImpl.java
new file mode 100644
index 000000000..0533e2d34
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/InstanceBaseImpl.java
@@ -0,0 +1,254 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+import org.eclipse.etrice.generator.etricegen.InstanceBase;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Instance Base</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.InstanceBaseImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.InstanceBaseImpl#getPath <em>Path</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.InstanceBaseImpl#getObjId <em>Obj Id</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class InstanceBaseImpl extends EObjectImpl implements InstanceBase {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getPath() <em>Path</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPath()
+ * @generated
+ * @ordered
+ */
+ protected static final String PATH_EDEFAULT = null;
+
+ /**
+ * The default value of the '{@link #getObjId() <em>Obj Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getObjId()
+ * @generated
+ * @ordered
+ */
+ protected static final int OBJ_ID_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getObjId() <em>Obj Id</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getObjId()
+ * @generated
+ * @ordered
+ */
+ protected int objId = OBJ_ID_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected InstanceBaseImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ETriceGenPackage.Literals.INSTANCE_BASE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.INSTANCE_BASE__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ *
+ * TODOHRR: maybe this value should be cached (make attribute non-volatile)
+ */
+ public String getPath() {
+ String path = pathDelim+getName();
+
+ EObject parent = eContainer();
+ if (parent!=null && (parent instanceof InstanceBase)) {
+ path = ((InstanceBase)parent).getPath() + path;
+ }
+ return path;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getObjId() {
+ return objId;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setObjId(int newObjId) {
+ int oldObjId = objId;
+ objId = newObjId;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.INSTANCE_BASE__OBJ_ID, oldObjId, objId));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ETriceGenPackage.INSTANCE_BASE__NAME:
+ return getName();
+ case ETriceGenPackage.INSTANCE_BASE__PATH:
+ return getPath();
+ case ETriceGenPackage.INSTANCE_BASE__OBJ_ID:
+ return getObjId();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ETriceGenPackage.INSTANCE_BASE__NAME:
+ setName((String)newValue);
+ return;
+ case ETriceGenPackage.INSTANCE_BASE__OBJ_ID:
+ setObjId((Integer)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.INSTANCE_BASE__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case ETriceGenPackage.INSTANCE_BASE__OBJ_ID:
+ setObjId(OBJ_ID_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.INSTANCE_BASE__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case ETriceGenPackage.INSTANCE_BASE__PATH:
+ return PATH_EDEFAULT == null ? getPath() != null : !PATH_EDEFAULT.equals(getPath());
+ case ETriceGenPackage.INSTANCE_BASE__OBJ_ID:
+ return objId != OBJ_ID_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(" (name: ");
+ result.append(name);
+ result.append(", objId: ");
+ result.append(objId);
+ result.append(')');
+ return result.toString();
+ }
+
+} //InstanceBaseImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/InterfaceItemInstanceImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/InterfaceItemInstanceImpl.java
new file mode 100644
index 000000000..17e91ae65
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/InterfaceItemInstanceImpl.java
@@ -0,0 +1,135 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+import org.eclipse.etrice.generator.etricegen.InterfaceItemInstance;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Interface Item Instance</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.InterfaceItemInstanceImpl#getPeers <em>Peers</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class InterfaceItemInstanceImpl extends InstanceBaseImpl implements InterfaceItemInstance {
+ /**
+ * The cached value of the '{@link #getPeers() <em>Peers</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPeers()
+ * @generated
+ * @ordered
+ */
+ protected EList<InterfaceItemInstance> peers;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected InterfaceItemInstanceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ETriceGenPackage.Literals.INTERFACE_ITEM_INSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<InterfaceItemInstance> getPeers() {
+ if (peers == null) {
+ peers = new EObjectResolvingEList<InterfaceItemInstance>(InterfaceItemInstance.class, this, ETriceGenPackage.INTERFACE_ITEM_INSTANCE__PEERS);
+ }
+ return peers;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ETriceGenPackage.INTERFACE_ITEM_INSTANCE__PEERS:
+ return getPeers();
+ }
+ 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 ETriceGenPackage.INTERFACE_ITEM_INSTANCE__PEERS:
+ getPeers().clear();
+ getPeers().addAll((Collection<? extends InterfaceItemInstance>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.INTERFACE_ITEM_INSTANCE__PEERS:
+ getPeers().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.INTERFACE_ITEM_INSTANCE__PEERS:
+ return peers != null && !peers.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //InterfaceItemInstanceImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/PortInstanceImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/PortInstanceImpl.java
new file mode 100644
index 000000000..bd0fa5596
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/PortInstanceImpl.java
@@ -0,0 +1,294 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+
+import org.eclipse.etrice.core.room.Port;
+import org.eclipse.etrice.generator.etricegen.BindingInstance;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+import org.eclipse.etrice.generator.etricegen.PortInstance;
+import org.eclipse.etrice.generator.etricegen.PortKind;
+
+import java.util.Collection;
+import org.eclipse.emf.common.util.EList;
+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.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Port Instance</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.PortInstanceImpl#getPort <em>Port</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.PortInstanceImpl#getKind <em>Kind</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.PortInstanceImpl#getBindings <em>Bindings</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class PortInstanceImpl extends InterfaceItemInstanceImpl implements PortInstance {
+ /**
+ * The cached value of the '{@link #getPort() <em>Port</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPort()
+ * @generated
+ * @ordered
+ */
+ protected Port port;
+ /**
+ * The default value of the '{@link #getKind() <em>Kind</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getKind()
+ * @generated
+ * @ordered
+ */
+ protected static final PortKind KIND_EDEFAULT = PortKind.EXTERNAL;
+ /**
+ * The cached value of the '{@link #getKind() <em>Kind</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getKind()
+ * @generated
+ * @ordered
+ */
+ protected PortKind kind = KIND_EDEFAULT;
+ /**
+ * The cached value of the '{@link #getBindings() <em>Bindings</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getBindings()
+ * @generated
+ * @ordered
+ */
+ protected EList<BindingInstance> bindings;
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected PortInstanceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ETriceGenPackage.Literals.PORT_INSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Port getPort() {
+ if (port != null && port.eIsProxy()) {
+ InternalEObject oldPort = (InternalEObject)port;
+ port = (Port)eResolveProxy(oldPort);
+ if (port != oldPort) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ETriceGenPackage.PORT_INSTANCE__PORT, oldPort, port));
+ }
+ }
+ return port;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Port basicGetPort() {
+ return port;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPort(Port newPort) {
+ Port oldPort = port;
+ port = newPort;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.PORT_INSTANCE__PORT, oldPort, port));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public PortKind getKind() {
+ return kind;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setKind(PortKind newKind) {
+ PortKind oldKind = kind;
+ kind = newKind == null ? KIND_EDEFAULT : newKind;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.PORT_INSTANCE__KIND, oldKind, kind));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<BindingInstance> getBindings() {
+ if (bindings == null) {
+ bindings = new EObjectWithInverseResolvingEList.ManyInverse<BindingInstance>(BindingInstance.class, this, ETriceGenPackage.PORT_INSTANCE__BINDINGS, ETriceGenPackage.BINDING_INSTANCE__PORTS);
+ }
+ return bindings;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ETriceGenPackage.PORT_INSTANCE__BINDINGS:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getBindings()).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 ETriceGenPackage.PORT_INSTANCE__BINDINGS:
+ return ((InternalEList<?>)getBindings()).basicRemove(otherEnd, 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 ETriceGenPackage.PORT_INSTANCE__PORT:
+ if (resolve) return getPort();
+ return basicGetPort();
+ case ETriceGenPackage.PORT_INSTANCE__KIND:
+ return getKind();
+ case ETriceGenPackage.PORT_INSTANCE__BINDINGS:
+ return getBindings();
+ }
+ 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 ETriceGenPackage.PORT_INSTANCE__PORT:
+ setPort((Port)newValue);
+ return;
+ case ETriceGenPackage.PORT_INSTANCE__KIND:
+ setKind((PortKind)newValue);
+ return;
+ case ETriceGenPackage.PORT_INSTANCE__BINDINGS:
+ getBindings().clear();
+ getBindings().addAll((Collection<? extends BindingInstance>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.PORT_INSTANCE__PORT:
+ setPort((Port)null);
+ return;
+ case ETriceGenPackage.PORT_INSTANCE__KIND:
+ setKind(KIND_EDEFAULT);
+ return;
+ case ETriceGenPackage.PORT_INSTANCE__BINDINGS:
+ getBindings().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.PORT_INSTANCE__PORT:
+ return port != null;
+ case ETriceGenPackage.PORT_INSTANCE__KIND:
+ return kind != KIND_EDEFAULT;
+ case ETriceGenPackage.PORT_INSTANCE__BINDINGS:
+ return bindings != null && !bindings.isEmpty();
+ }
+ 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(" (kind: ");
+ result.append(kind);
+ result.append(')');
+ return result.toString();
+ }
+
+} //PortInstanceImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/RootImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/RootImpl.java
new file mode 100644
index 000000000..7178145dc
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/RootImpl.java
@@ -0,0 +1,590 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+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 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.InternalEObject;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.etrice.core.room.ActorClass;
+import org.eclipse.etrice.core.room.DataClass;
+import org.eclipse.etrice.core.room.ProtocolClass;
+import org.eclipse.etrice.core.room.RoomClass;
+import org.eclipse.etrice.core.room.RoomModel;
+
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+import org.eclipse.etrice.core.room.ActorRef;
+import org.eclipse.etrice.core.room.Attribute;
+import org.eclipse.etrice.core.room.SubSystemClass;
+import org.eclipse.etrice.core.room.FreeTypedID;
+import org.eclipse.etrice.core.room.InterfaceItem;
+import org.eclipse.etrice.core.room.Message;
+import org.eclipse.etrice.core.room.Operation;
+import org.eclipse.etrice.core.room.ServiceImplementation;
+import org.eclipse.etrice.core.room.TypedID;
+import org.eclipse.etrice.generator.etricegen.ActorInstance;
+import org.eclipse.etrice.generator.etricegen.ExpandedActorClass;
+import org.eclipse.etrice.generator.etricegen.Root;
+import org.eclipse.etrice.generator.etricegen.SubSystemInstance;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Root</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.RootImpl#getSubSystems <em>Sub Systems</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.RootImpl#getModels <em>Models</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.RootImpl#getXpActorClasses <em>Xp Actor Classes</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.RootImpl#getUsedDataClasses <em>Used Data Classes</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.RootImpl#getUsedProtocolClasses <em>Used Protocol Classes</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.RootImpl#getUsedActorClasses <em>Used Actor Classes</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.RootImpl#getUsedRoomModels <em>Used Room Models</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class RootImpl extends EObjectImpl implements Root {
+ /**
+ * The cached value of the '{@link #getSubSystems() <em>Sub Systems</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSubSystems()
+ * @generated
+ * @ordered
+ */
+ protected EList<SubSystemInstance> subSystems;
+
+ private class RoomClassComparator implements Comparator<RoomClass> {
+
+ @Override
+ public int compare(RoomClass o1, RoomClass o2) {
+ return o1.getName().compareTo(o2.getName());
+ }
+
+ }
+
+ private class RoomModelComparator implements Comparator<RoomModel> {
+
+ @Override
+ public int compare(RoomModel o1, RoomModel o2) {
+ return o1.getName().compareTo(o2.getName());
+ }
+
+ }
+
+ /**
+ * The cached value of the '{@link #getModels() <em>Models</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getModels()
+ * @generated
+ * @ordered
+ */
+ protected EList<RoomModel> models;
+
+ /**
+ * The cached value of the '{@link #getXpActorClasses() <em>Xp Actor Classes</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getXpActorClasses()
+ * @generated
+ * @ordered
+ */
+ protected EList<ExpandedActorClass> xpActorClasses;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected RootImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ETriceGenPackage.Literals.ROOT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<SubSystemInstance> getSubSystems() {
+ if (subSystems == null) {
+ subSystems = new EObjectContainmentEList<SubSystemInstance>(SubSystemInstance.class, this, ETriceGenPackage.ROOT__SUB_SYSTEMS);
+ }
+ return subSystems;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<RoomModel> getModels() {
+ if (models == null) {
+ models = new EObjectResolvingEList<RoomModel>(RoomModel.class, this, ETriceGenPackage.ROOT__MODELS);
+ }
+ return models;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ExpandedActorClass> getXpActorClasses() {
+ if (xpActorClasses == null) {
+ xpActorClasses = new EObjectContainmentEList<ExpandedActorClass>(ExpandedActorClass.class, this, ETriceGenPackage.ROOT__XP_ACTOR_CLASSES);
+ }
+ return xpActorClasses;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public EList<DataClass> getUsedDataClasses() {
+ if (usedDataClasses==null) {
+ computeUsedClasses();
+ }
+ return usedDataClasses;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public EList<ProtocolClass> getUsedProtocolClasses() {
+ if (usedProtocolClasses==null) {
+ computeUsedClasses();
+ }
+ return usedProtocolClasses;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public EList<ActorClass> getUsedActorClasses() {
+ if (usedActorClasses==null) {
+ computeUsedClasses();
+ }
+ return usedActorClasses;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public EList<RoomModel> getUsedRoomModels() {
+ if (usedRoomModels==null) {
+ computeUsedClasses();
+ }
+ return usedRoomModels;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public EList<RoomModel> getReferencedModels(RoomClass cls) {
+
+ if (cls instanceof ExpandedActorClass)
+ cls = ((ExpandedActorClass)cls).getActorClass();
+
+ HashSet<DataClass> dataClasses = new HashSet<DataClass>();
+ HashSet<ProtocolClass> protocolClasses = new HashSet<ProtocolClass>();
+ HashSet<ActorClass> actorClasses = new HashSet<ActorClass>();
+ HashSet<RoomModel> models = new HashSet<RoomModel>();
+
+ if (cls instanceof DataClass) {
+ dataClasses.add((DataClass) cls);
+ }
+ else if (cls instanceof ProtocolClass) {
+ protocolClasses.add((ProtocolClass) cls);
+ }
+ else if (cls instanceof ActorClass) {
+ actorClasses.add((ActorClass) cls);
+ }
+ else if (cls instanceof SubSystemClass) {
+ SubSystemClass cc = (SubSystemClass) cls;
+ for (ActorRef ar : cc.getActorRefs()) {
+ actorClasses.add(ar.getType());
+ }
+ }
+
+ getReferencedClassesAndModels(dataClasses, protocolClasses,
+ actorClasses, models);
+
+ // remove own model
+ models.remove(cls.eContainer());
+
+ BasicEList<RoomModel> result = new BasicEList<RoomModel>(models);
+ Comparator<RoomModel> comp = new RoomModelComparator();
+ Collections.sort(result, comp);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public EList<ProtocolClass> getReferencedProtocols(ActorClass cls) {
+
+ if (cls instanceof ExpandedActorClass)
+ cls = ((ExpandedActorClass)cls).getActorClass();
+
+ HashSet<DataClass> dataClasses = new HashSet<DataClass>();
+ HashSet<ProtocolClass> protocolClasses = new HashSet<ProtocolClass>();
+ HashSet<ActorClass> actorClasses = new HashSet<ActorClass>();
+ HashSet<RoomModel> models = new HashSet<RoomModel>();
+
+ actorClasses.add(cls);
+
+ getReferencedClassesAndModels(dataClasses, protocolClasses,
+ actorClasses, models);
+
+ BasicEList<ProtocolClass> result = new BasicEList<ProtocolClass>(protocolClasses);
+ Comparator<RoomClass> comp = new RoomClassComparator();
+ Collections.sort(result, comp);
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ETriceGenPackage.ROOT__SUB_SYSTEMS:
+ return ((InternalEList<?>)getSubSystems()).basicRemove(otherEnd, msgs);
+ case ETriceGenPackage.ROOT__XP_ACTOR_CLASSES:
+ return ((InternalEList<?>)getXpActorClasses()).basicRemove(otherEnd, 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 ETriceGenPackage.ROOT__SUB_SYSTEMS:
+ return getSubSystems();
+ case ETriceGenPackage.ROOT__MODELS:
+ return getModels();
+ case ETriceGenPackage.ROOT__XP_ACTOR_CLASSES:
+ return getXpActorClasses();
+ case ETriceGenPackage.ROOT__USED_DATA_CLASSES:
+ return getUsedDataClasses();
+ case ETriceGenPackage.ROOT__USED_PROTOCOL_CLASSES:
+ return getUsedProtocolClasses();
+ case ETriceGenPackage.ROOT__USED_ACTOR_CLASSES:
+ return getUsedActorClasses();
+ case ETriceGenPackage.ROOT__USED_ROOM_MODELS:
+ return getUsedRoomModels();
+ }
+ 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 ETriceGenPackage.ROOT__SUB_SYSTEMS:
+ getSubSystems().clear();
+ getSubSystems().addAll((Collection<? extends SubSystemInstance>)newValue);
+ return;
+ case ETriceGenPackage.ROOT__MODELS:
+ getModels().clear();
+ getModels().addAll((Collection<? extends RoomModel>)newValue);
+ return;
+ case ETriceGenPackage.ROOT__XP_ACTOR_CLASSES:
+ getXpActorClasses().clear();
+ getXpActorClasses().addAll((Collection<? extends ExpandedActorClass>)newValue);
+ return;
+ case ETriceGenPackage.ROOT__USED_DATA_CLASSES:
+ getUsedDataClasses().clear();
+ getUsedDataClasses().addAll((Collection<? extends DataClass>)newValue);
+ return;
+ case ETriceGenPackage.ROOT__USED_PROTOCOL_CLASSES:
+ getUsedProtocolClasses().clear();
+ getUsedProtocolClasses().addAll((Collection<? extends ProtocolClass>)newValue);
+ return;
+ case ETriceGenPackage.ROOT__USED_ACTOR_CLASSES:
+ getUsedActorClasses().clear();
+ getUsedActorClasses().addAll((Collection<? extends ActorClass>)newValue);
+ return;
+ case ETriceGenPackage.ROOT__USED_ROOM_MODELS:
+ getUsedRoomModels().clear();
+ getUsedRoomModels().addAll((Collection<? extends RoomModel>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.ROOT__SUB_SYSTEMS:
+ getSubSystems().clear();
+ return;
+ case ETriceGenPackage.ROOT__MODELS:
+ getModels().clear();
+ return;
+ case ETriceGenPackage.ROOT__XP_ACTOR_CLASSES:
+ getXpActorClasses().clear();
+ return;
+ case ETriceGenPackage.ROOT__USED_DATA_CLASSES:
+ getUsedDataClasses().clear();
+ return;
+ case ETriceGenPackage.ROOT__USED_PROTOCOL_CLASSES:
+ getUsedProtocolClasses().clear();
+ return;
+ case ETriceGenPackage.ROOT__USED_ACTOR_CLASSES:
+ getUsedActorClasses().clear();
+ return;
+ case ETriceGenPackage.ROOT__USED_ROOM_MODELS:
+ getUsedRoomModels().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.ROOT__SUB_SYSTEMS:
+ return subSystems != null && !subSystems.isEmpty();
+ case ETriceGenPackage.ROOT__MODELS:
+ return models != null && !models.isEmpty();
+ case ETriceGenPackage.ROOT__XP_ACTOR_CLASSES:
+ return xpActorClasses != null && !xpActorClasses.isEmpty();
+ case ETriceGenPackage.ROOT__USED_DATA_CLASSES:
+ return !getUsedDataClasses().isEmpty();
+ case ETriceGenPackage.ROOT__USED_PROTOCOL_CLASSES:
+ return !getUsedProtocolClasses().isEmpty();
+ case ETriceGenPackage.ROOT__USED_ACTOR_CLASSES:
+ return !getUsedActorClasses().isEmpty();
+ case ETriceGenPackage.ROOT__USED_ROOM_MODELS:
+ return !getUsedRoomModels().isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+ private HashMap<String, DataClass> name2dc = new HashMap<String, DataClass>();
+
+ private BasicEList<DataClass> usedDataClasses = null;
+ private BasicEList<ProtocolClass> usedProtocolClasses = null;
+ private BasicEList<ActorClass> usedActorClasses = null;
+ private BasicEList<RoomModel> usedRoomModels = null;
+
+ private void computeUsedClasses() {
+ for (RoomModel mdl : getModels()) {
+ for (DataClass dc : mdl.getDataClasses()) {
+ name2dc.put(dc.getName(), dc);
+ }
+ }
+
+ // first we collect actor classes
+ HashSet<ActorClass> actorClasses = new HashSet<ActorClass>();
+ for (SubSystemInstance ci : getSubSystems()) {
+ TreeIterator<EObject> it = ci.eAllContents();
+ while (it.hasNext()) {
+ EObject obj = it.next();
+ if (obj instanceof ActorInstance) {
+ ActorClass ac = ((ActorInstance)obj).getActorClass();
+ actorClasses.add(ac);
+ }
+ }
+ }
+
+ HashSet<DataClass> dataClasses = new HashSet<DataClass>();
+ HashSet<ProtocolClass> protocolClasses = new HashSet<ProtocolClass>();
+ HashSet<RoomModel> models = new HashSet<RoomModel>();
+
+ getReferencedClassesAndModels(dataClasses, protocolClasses,
+ actorClasses, models);
+
+ usedDataClasses = new BasicEList<DataClass>(dataClasses);
+ usedProtocolClasses = new BasicEList<ProtocolClass>(protocolClasses);
+ usedActorClasses = new BasicEList<ActorClass>(actorClasses);
+ usedRoomModels = new BasicEList<RoomModel>(models);
+ }
+
+ private void getReferencedClassesAndModels(HashSet<DataClass> dataClasses,
+ HashSet<ProtocolClass> protocolClasses,
+ HashSet<ActorClass> actorClasses, HashSet<RoomModel> models) {
+ // add actor base classes
+ LinkedList<ActorClass> tmpAc = new LinkedList<ActorClass>(actorClasses);
+ for (ActorClass ac : tmpAc) {
+ while (ac.getBase()!=null) {
+ ac = ac.getBase();
+ actorClasses.add(ac);
+ }
+ }
+
+ // determine data and protocol classes used by actor classes
+ for (ActorClass ac : actorClasses) {
+ getInterfaceItemProtocolClasses(protocolClasses, ac.getIfPorts());
+ // ExtPorts are in the interface and thus already covered
+ getInterfaceItemProtocolClasses(protocolClasses, ac.getIntPorts());
+ getInterfaceItemProtocolClasses(protocolClasses, ac.getStrSAPs());
+ for (ServiceImplementation ispp : ac.getServiceImplementations()) {
+ protocolClasses.add(ispp.getSpp().getProtocol());
+ }
+ getInterfaceItemProtocolClasses(protocolClasses, ac.getIfSPPs());
+ getAttributeDataClasses(dataClasses, ac.getAttributes());
+ getOperationDataClasses(dataClasses, ac.getOperations());
+ }
+
+ // add protocol base classes
+ LinkedList<ProtocolClass> tmpPc = new LinkedList<ProtocolClass>(protocolClasses);
+ for (ProtocolClass pc : tmpPc) {
+ while (pc.getBase()!=null) {
+ pc = pc.getBase();
+ protocolClasses.add(pc);
+ }
+ }
+
+ // add data classes used by protocols
+ for (ProtocolClass pc : protocolClasses) {
+ for (Message m : pc.getIncomingMessages()) {
+ getTypedIdDataClasses(dataClasses, m.getArguments());
+ }
+ for (Message m : pc.getOutgoingMessages()) {
+ getTypedIdDataClasses(dataClasses, m.getArguments());
+ }
+ }
+
+ // add data class base classes and data class attribute and operation classes
+ boolean repeat = true;
+ do {
+ LinkedList<DataClass> tmpDc = new LinkedList<DataClass>(dataClasses);
+ for (DataClass dc : tmpDc) {
+ getAttributeDataClasses(dataClasses, dc.getAttributes());
+ getOperationDataClasses(dataClasses, dc.getOperations());
+ while (dc.getBase()!=null) {
+ dc = dc.getBase();
+ dataClasses.add(dc);
+ }
+ }
+
+ if (tmpDc.size()==dataClasses.size())
+ // nothing changed
+ repeat = false;
+ }
+ while (repeat);
+
+ // finally compute used models
+ for (DataClass dc : dataClasses) {
+ models.add((RoomModel) dc.eContainer());
+ }
+ for (ProtocolClass pc : protocolClasses) {
+ models.add((RoomModel) pc.eContainer());
+ }
+ for (ActorClass ac : actorClasses) {
+ models.add((RoomModel) ac.eContainer());
+ }
+ }
+
+ private void getInterfaceItemProtocolClasses(
+ HashSet<ProtocolClass> protocolClasses, EList<? extends InterfaceItem> items) {
+ for (InterfaceItem ii : items) {
+ protocolClasses.add(ii.getProtocol());
+ }
+ }
+
+ private void getOperationDataClasses(HashSet<DataClass> dataClasses,
+ EList<Operation> operations) {
+ for (Operation op : operations) {
+ if (op.getReturntype()!=null) {
+ DataClass dc = name2dc.get(op.getReturntype());
+ if (dc!=null)
+ dataClasses.add(dc);
+ }
+ getFreeTypedIdDataClasses(dataClasses, op.getArguments());
+ }
+ }
+
+ private void getTypedIdDataClasses(HashSet<DataClass> dataClasses,
+ EList<TypedID> arguments) {
+ for (TypedID tid : arguments) {
+ if (tid.getType().getType()!=null)
+ dataClasses.add(tid.getType().getType());
+ }
+ }
+
+ private void getFreeTypedIdDataClasses(HashSet<DataClass> dataClasses,
+ EList<FreeTypedID> arguments) {
+ for (FreeTypedID tid : arguments) {
+ DataClass dc = name2dc.get(tid.getType());
+ if (dc!=null)
+ dataClasses.add(dc);
+ }
+ }
+
+ private void getAttributeDataClasses(HashSet<DataClass> dataClasses,
+ EList<Attribute> attributes) {
+ for (Attribute attr : attributes) {
+ if (attr.getType().getType()!=null)
+ dataClasses.add(attr.getType().getType());
+ }
+ }
+
+} //RootImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/SAPInstanceImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/SAPInstanceImpl.java
new file mode 100644
index 000000000..d50dc4065
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/SAPInstanceImpl.java
@@ -0,0 +1,158 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+import org.eclipse.etrice.core.room.SAPRef;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+import org.eclipse.etrice.generator.etricegen.SAPInstance;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>SAP Instance</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.SAPInstanceImpl#getSap <em>Sap</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SAPInstanceImpl extends InterfaceItemInstanceImpl implements SAPInstance {
+ /**
+ * The cached value of the '{@link #getSap() <em>Sap</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSap()
+ * @generated
+ * @ordered
+ */
+ protected SAPRef sap;
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SAPInstanceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ETriceGenPackage.Literals.SAP_INSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SAPRef getSap() {
+ if (sap != null && sap.eIsProxy()) {
+ InternalEObject oldSap = (InternalEObject)sap;
+ sap = (SAPRef)eResolveProxy(oldSap);
+ if (sap != oldSap) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ETriceGenPackage.SAP_INSTANCE__SAP, oldSap, sap));
+ }
+ }
+ return sap;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SAPRef basicGetSap() {
+ return sap;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSap(SAPRef newSap) {
+ SAPRef oldSap = sap;
+ sap = newSap;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.SAP_INSTANCE__SAP, oldSap, sap));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ETriceGenPackage.SAP_INSTANCE__SAP:
+ if (resolve) return getSap();
+ return basicGetSap();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ETriceGenPackage.SAP_INSTANCE__SAP:
+ setSap((SAPRef)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.SAP_INSTANCE__SAP:
+ setSap((SAPRef)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.SAP_INSTANCE__SAP:
+ return sap != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //SAPInstanceImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/SPPInstanceImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/SPPInstanceImpl.java
new file mode 100644
index 000000000..12a555393
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/SPPInstanceImpl.java
@@ -0,0 +1,318 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+
+import org.eclipse.etrice.core.room.SPPRef;
+import org.eclipse.etrice.generator.etricegen.ConnectionInstance;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+import org.eclipse.etrice.generator.etricegen.SPPInstance;
+
+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.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>SPP Instance</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.SPPInstanceImpl#getSpp <em>Spp</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.SPPInstanceImpl#getIncoming <em>Incoming</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.SPPInstanceImpl#getOutgoing <em>Outgoing</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SPPInstanceImpl extends InstanceBaseImpl implements SPPInstance {
+ /**
+ * The cached value of the '{@link #getSpp() <em>Spp</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSpp()
+ * @generated
+ * @ordered
+ */
+ protected SPPRef spp;
+
+ /**
+ * The cached value of the '{@link #getIncoming() <em>Incoming</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIncoming()
+ * @generated
+ * @ordered
+ */
+ protected EList<ConnectionInstance> incoming;
+ /**
+ * The cached value of the '{@link #getOutgoing() <em>Outgoing</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOutgoing()
+ * @generated
+ * @ordered
+ */
+ protected ConnectionInstance outgoing;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SPPInstanceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ETriceGenPackage.Literals.SPP_INSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SPPRef getSpp() {
+ if (spp != null && spp.eIsProxy()) {
+ InternalEObject oldSpp = (InternalEObject)spp;
+ spp = (SPPRef)eResolveProxy(oldSpp);
+ if (spp != oldSpp) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ETriceGenPackage.SPP_INSTANCE__SPP, oldSpp, spp));
+ }
+ }
+ return spp;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SPPRef basicGetSpp() {
+ return spp;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSpp(SPPRef newSpp) {
+ SPPRef oldSpp = spp;
+ spp = newSpp;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.SPP_INSTANCE__SPP, oldSpp, spp));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ConnectionInstance> getIncoming() {
+ if (incoming == null) {
+ incoming = new EObjectWithInverseResolvingEList<ConnectionInstance>(ConnectionInstance.class, this, ETriceGenPackage.SPP_INSTANCE__INCOMING, ETriceGenPackage.CONNECTION_INSTANCE__TO_SPP);
+ }
+ return incoming;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConnectionInstance getOutgoing() {
+ if (outgoing != null && outgoing.eIsProxy()) {
+ InternalEObject oldOutgoing = (InternalEObject)outgoing;
+ outgoing = (ConnectionInstance)eResolveProxy(oldOutgoing);
+ if (outgoing != oldOutgoing) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ETriceGenPackage.SPP_INSTANCE__OUTGOING, oldOutgoing, outgoing));
+ }
+ }
+ return outgoing;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ConnectionInstance basicGetOutgoing() {
+ return outgoing;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetOutgoing(ConnectionInstance newOutgoing, NotificationChain msgs) {
+ ConnectionInstance oldOutgoing = outgoing;
+ outgoing = newOutgoing;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ETriceGenPackage.SPP_INSTANCE__OUTGOING, oldOutgoing, newOutgoing);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setOutgoing(ConnectionInstance newOutgoing) {
+ if (newOutgoing != outgoing) {
+ NotificationChain msgs = null;
+ if (outgoing != null)
+ msgs = ((InternalEObject)outgoing).eInverseRemove(this, ETriceGenPackage.CONNECTION_INSTANCE__FROM_SPP, ConnectionInstance.class, msgs);
+ if (newOutgoing != null)
+ msgs = ((InternalEObject)newOutgoing).eInverseAdd(this, ETriceGenPackage.CONNECTION_INSTANCE__FROM_SPP, ConnectionInstance.class, msgs);
+ msgs = basicSetOutgoing(newOutgoing, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.SPP_INSTANCE__OUTGOING, newOutgoing, newOutgoing));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ETriceGenPackage.SPP_INSTANCE__INCOMING:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getIncoming()).basicAdd(otherEnd, msgs);
+ case ETriceGenPackage.SPP_INSTANCE__OUTGOING:
+ if (outgoing != null)
+ msgs = ((InternalEObject)outgoing).eInverseRemove(this, ETriceGenPackage.CONNECTION_INSTANCE__FROM_SPP, ConnectionInstance.class, msgs);
+ return basicSetOutgoing((ConnectionInstance)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 ETriceGenPackage.SPP_INSTANCE__INCOMING:
+ return ((InternalEList<?>)getIncoming()).basicRemove(otherEnd, msgs);
+ case ETriceGenPackage.SPP_INSTANCE__OUTGOING:
+ return basicSetOutgoing(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 ETriceGenPackage.SPP_INSTANCE__SPP:
+ if (resolve) return getSpp();
+ return basicGetSpp();
+ case ETriceGenPackage.SPP_INSTANCE__INCOMING:
+ return getIncoming();
+ case ETriceGenPackage.SPP_INSTANCE__OUTGOING:
+ if (resolve) return getOutgoing();
+ return basicGetOutgoing();
+ }
+ 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 ETriceGenPackage.SPP_INSTANCE__SPP:
+ setSpp((SPPRef)newValue);
+ return;
+ case ETriceGenPackage.SPP_INSTANCE__INCOMING:
+ getIncoming().clear();
+ getIncoming().addAll((Collection<? extends ConnectionInstance>)newValue);
+ return;
+ case ETriceGenPackage.SPP_INSTANCE__OUTGOING:
+ setOutgoing((ConnectionInstance)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.SPP_INSTANCE__SPP:
+ setSpp((SPPRef)null);
+ return;
+ case ETriceGenPackage.SPP_INSTANCE__INCOMING:
+ getIncoming().clear();
+ return;
+ case ETriceGenPackage.SPP_INSTANCE__OUTGOING:
+ setOutgoing((ConnectionInstance)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.SPP_INSTANCE__SPP:
+ return spp != null;
+ case ETriceGenPackage.SPP_INSTANCE__INCOMING:
+ return incoming != null && !incoming.isEmpty();
+ case ETriceGenPackage.SPP_INSTANCE__OUTGOING:
+ return outgoing != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //SPPInstanceImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ServiceImplInstanceImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ServiceImplInstanceImpl.java
new file mode 100644
index 000000000..4f28acd43
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/ServiceImplInstanceImpl.java
@@ -0,0 +1,160 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+
+import org.eclipse.etrice.core.room.ServiceImplementation;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+import org.eclipse.etrice.generator.etricegen.ServiceImplInstance;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Service Impl Instance</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.ServiceImplInstanceImpl#getSvcImpl <em>Svc Impl</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ServiceImplInstanceImpl extends InterfaceItemInstanceImpl implements ServiceImplInstance {
+ /**
+ * The cached value of the '{@link #getSvcImpl() <em>Svc Impl</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSvcImpl()
+ * @generated
+ * @ordered
+ */
+ protected ServiceImplementation svcImpl;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ServiceImplInstanceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ETriceGenPackage.Literals.SERVICE_IMPL_INSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ServiceImplementation getSvcImpl() {
+ if (svcImpl != null && svcImpl.eIsProxy()) {
+ InternalEObject oldSvcImpl = (InternalEObject)svcImpl;
+ svcImpl = (ServiceImplementation)eResolveProxy(oldSvcImpl);
+ if (svcImpl != oldSvcImpl) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ETriceGenPackage.SERVICE_IMPL_INSTANCE__SVC_IMPL, oldSvcImpl, svcImpl));
+ }
+ }
+ return svcImpl;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ServiceImplementation basicGetSvcImpl() {
+ return svcImpl;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSvcImpl(ServiceImplementation newSvcImpl) {
+ ServiceImplementation oldSvcImpl = svcImpl;
+ svcImpl = newSvcImpl;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.SERVICE_IMPL_INSTANCE__SVC_IMPL, oldSvcImpl, svcImpl));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ETriceGenPackage.SERVICE_IMPL_INSTANCE__SVC_IMPL:
+ if (resolve) return getSvcImpl();
+ return basicGetSvcImpl();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ETriceGenPackage.SERVICE_IMPL_INSTANCE__SVC_IMPL:
+ setSvcImpl((ServiceImplementation)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.SERVICE_IMPL_INSTANCE__SVC_IMPL:
+ setSvcImpl((ServiceImplementation)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.SERVICE_IMPL_INSTANCE__SVC_IMPL:
+ return svcImpl != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ServiceImplInstanceImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/StructureInstanceImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/StructureInstanceImpl.java
new file mode 100644
index 000000000..156c63386
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/StructureInstanceImpl.java
@@ -0,0 +1,473 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedList;
+
+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.InternalEObject;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.eclipse.etrice.core.room.ActorClass;
+import org.eclipse.etrice.core.room.ProtocolClass;
+import org.eclipse.etrice.generator.etricegen.ActorInstance;
+import org.eclipse.etrice.generator.etricegen.BindingInstance;
+import org.eclipse.etrice.generator.etricegen.ConnectionInstance;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+import org.eclipse.etrice.generator.etricegen.InterfaceItemInstance;
+import org.eclipse.etrice.generator.etricegen.PortInstance;
+import org.eclipse.etrice.generator.etricegen.PortKind;
+import org.eclipse.etrice.generator.etricegen.SAPInstance;
+import org.eclipse.etrice.generator.etricegen.SPPInstance;
+import org.eclipse.etrice.generator.etricegen.ServiceImplInstance;
+import org.eclipse.etrice.generator.etricegen.StructureInstance;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Structure Instance</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.StructureInstanceImpl#getInstances <em>Instances</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.StructureInstanceImpl#getPorts <em>Ports</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.StructureInstanceImpl#getSaps <em>Saps</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.StructureInstanceImpl#getSpps <em>Spps</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.StructureInstanceImpl#getServices <em>Services</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.StructureInstanceImpl#getBindings <em>Bindings</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.StructureInstanceImpl#getConnections <em>Connections</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.StructureInstanceImpl#getAllContainedInstances <em>All Contained Instances</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.StructureInstanceImpl#getOrderedIfItemInstances <em>Ordered If Item Instances</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class StructureInstanceImpl extends InstanceBaseImpl implements StructureInstance {
+ /**
+ * The cached value of the '{@link #getInstances() <em>Instances</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getInstances()
+ * @generated
+ * @ordered
+ */
+ protected EList<ActorInstance> instances;
+ /**
+ * The cached value of the '{@link #getPorts() <em>Ports</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPorts()
+ * @generated
+ * @ordered
+ */
+ protected EList<PortInstance> ports;
+ /**
+ * The cached value of the '{@link #getSaps() <em>Saps</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSaps()
+ * @generated
+ * @ordered
+ */
+ protected EList<SAPInstance> saps;
+ /**
+ * The cached value of the '{@link #getSpps() <em>Spps</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSpps()
+ * @generated
+ * @ordered
+ */
+ protected EList<SPPInstance> spps;
+ /**
+ * The cached value of the '{@link #getServices() <em>Services</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getServices()
+ * @generated
+ * @ordered
+ */
+ protected EList<ServiceImplInstance> services;
+ /**
+ * The cached value of the '{@link #getBindings() <em>Bindings</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getBindings()
+ * @generated
+ * @ordered
+ */
+ protected EList<BindingInstance> bindings;
+
+ /**
+ * The cached value of the '{@link #getConnections() <em>Connections</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getConnections()
+ * @generated
+ * @ordered
+ */
+ protected EList<ConnectionInstance> connections;
+
+ /**
+ * The cached value of the '{@link #getOrderedIfItemInstances() <em>Ordered If Item Instances</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getOrderedIfItemInstances()
+ * @generated
+ * @ordered
+ */
+ protected EList<InterfaceItemInstance> orderedIfItemInstances;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StructureInstanceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ETriceGenPackage.Literals.STRUCTURE_INSTANCE;
+ }
+
+ public HashMap<ProtocolClass, ServiceImplInstance> protocol2service = new HashMap<ProtocolClass, ServiceImplInstance>();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ActorInstance> getInstances() {
+ if (instances == null) {
+ instances = new EObjectContainmentEList<ActorInstance>(ActorInstance.class, this, ETriceGenPackage.STRUCTURE_INSTANCE__INSTANCES);
+ }
+ return instances;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<PortInstance> getPorts() {
+ if (ports == null) {
+ ports = new EObjectContainmentEList<PortInstance>(PortInstance.class, this, ETriceGenPackage.STRUCTURE_INSTANCE__PORTS);
+ }
+ return ports;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<SAPInstance> getSaps() {
+ if (saps == null) {
+ saps = new EObjectContainmentEList<SAPInstance>(SAPInstance.class, this, ETriceGenPackage.STRUCTURE_INSTANCE__SAPS);
+ }
+ return saps;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<SPPInstance> getSpps() {
+ if (spps == null) {
+ spps = new EObjectContainmentEList<SPPInstance>(SPPInstance.class, this, ETriceGenPackage.STRUCTURE_INSTANCE__SPPS);
+ }
+ return spps;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ServiceImplInstance> getServices() {
+ if (services == null) {
+ services = new EObjectContainmentEList<ServiceImplInstance>(ServiceImplInstance.class, this, ETriceGenPackage.STRUCTURE_INSTANCE__SERVICES);
+ }
+ return services;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<BindingInstance> getBindings() {
+ if (bindings == null) {
+ bindings = new EObjectContainmentEList<BindingInstance>(BindingInstance.class, this, ETriceGenPackage.STRUCTURE_INSTANCE__BINDINGS);
+ }
+ return bindings;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ConnectionInstance> getConnections() {
+ if (connections == null) {
+ connections = new EObjectContainmentEList<ConnectionInstance>(ConnectionInstance.class, this, ETriceGenPackage.STRUCTURE_INSTANCE__CONNECTIONS);
+ }
+ return connections;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public EList<ActorInstance> getAllContainedInstances() {
+ BasicEList<ActorInstance> result = new BasicEList<ActorInstance>();
+ TreeIterator<EObject> it = eAllContents();
+ while (it.hasNext()) {
+ EObject obj = it.next();
+ if (obj instanceof ActorInstance)
+ result.add((ActorInstance) obj);
+ }
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * for each base class, super classes first, (ports, saps and services) in this order
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public EList<InterfaceItemInstance> getOrderedIfItemInstances() {
+ if (orderedIfItemInstances == null) {
+ orderedIfItemInstances = new EObjectResolvingEList<InterfaceItemInstance>(InterfaceItemInstance.class, this, ETriceGenPackage.STRUCTURE_INSTANCE__ORDERED_IF_ITEM_INSTANCES);
+
+ if (this instanceof ActorInstance) {
+ ActorInstance ai = (ActorInstance) this;
+
+ // create a list of base classes, super first
+ LinkedList<ActorClass> classes = new LinkedList<ActorClass>();
+ ActorClass ac = ai.getActorClass();
+ while (ac!=null) {
+ classes.addFirst(ac);
+ ac = ac.getBase();
+ }
+
+ for (ActorClass a : classes) {
+ for (PortInstance p : ai.getPorts()) {
+ if (p.getKind()!=PortKind.RELAY && isInActorClass(p.getPort(), a))
+ orderedIfItemInstances.add(p);
+ }
+ for (SAPInstance sap : ai.getSaps()) {
+ if (isInActorClass(sap.getSap(), a))
+ orderedIfItemInstances.add(sap);
+ }
+ for (ServiceImplInstance svc : ai.getServices()) {
+ if (isInActorClass(svc.getSvcImpl(), a))
+ orderedIfItemInstances.add(svc);
+ }
+ }
+ }
+ }
+ return orderedIfItemInstances;
+ }
+
+ private boolean isInActorClass(EObject obj, ActorClass ac) {
+ while (obj!=null) {
+ obj = obj.eContainer();
+ if (obj instanceof ActorClass)
+ if (obj==ac)
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ETriceGenPackage.STRUCTURE_INSTANCE__INSTANCES:
+ return ((InternalEList<?>)getInstances()).basicRemove(otherEnd, msgs);
+ case ETriceGenPackage.STRUCTURE_INSTANCE__PORTS:
+ return ((InternalEList<?>)getPorts()).basicRemove(otherEnd, msgs);
+ case ETriceGenPackage.STRUCTURE_INSTANCE__SAPS:
+ return ((InternalEList<?>)getSaps()).basicRemove(otherEnd, msgs);
+ case ETriceGenPackage.STRUCTURE_INSTANCE__SPPS:
+ return ((InternalEList<?>)getSpps()).basicRemove(otherEnd, msgs);
+ case ETriceGenPackage.STRUCTURE_INSTANCE__SERVICES:
+ return ((InternalEList<?>)getServices()).basicRemove(otherEnd, msgs);
+ case ETriceGenPackage.STRUCTURE_INSTANCE__BINDINGS:
+ return ((InternalEList<?>)getBindings()).basicRemove(otherEnd, msgs);
+ case ETriceGenPackage.STRUCTURE_INSTANCE__CONNECTIONS:
+ return ((InternalEList<?>)getConnections()).basicRemove(otherEnd, 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 ETriceGenPackage.STRUCTURE_INSTANCE__INSTANCES:
+ return getInstances();
+ case ETriceGenPackage.STRUCTURE_INSTANCE__PORTS:
+ return getPorts();
+ case ETriceGenPackage.STRUCTURE_INSTANCE__SAPS:
+ return getSaps();
+ case ETriceGenPackage.STRUCTURE_INSTANCE__SPPS:
+ return getSpps();
+ case ETriceGenPackage.STRUCTURE_INSTANCE__SERVICES:
+ return getServices();
+ case ETriceGenPackage.STRUCTURE_INSTANCE__BINDINGS:
+ return getBindings();
+ case ETriceGenPackage.STRUCTURE_INSTANCE__CONNECTIONS:
+ return getConnections();
+ case ETriceGenPackage.STRUCTURE_INSTANCE__ALL_CONTAINED_INSTANCES:
+ return getAllContainedInstances();
+ case ETriceGenPackage.STRUCTURE_INSTANCE__ORDERED_IF_ITEM_INSTANCES:
+ return getOrderedIfItemInstances();
+ }
+ 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 ETriceGenPackage.STRUCTURE_INSTANCE__INSTANCES:
+ getInstances().clear();
+ getInstances().addAll((Collection<? extends ActorInstance>)newValue);
+ return;
+ case ETriceGenPackage.STRUCTURE_INSTANCE__PORTS:
+ getPorts().clear();
+ getPorts().addAll((Collection<? extends PortInstance>)newValue);
+ return;
+ case ETriceGenPackage.STRUCTURE_INSTANCE__SAPS:
+ getSaps().clear();
+ getSaps().addAll((Collection<? extends SAPInstance>)newValue);
+ return;
+ case ETriceGenPackage.STRUCTURE_INSTANCE__SPPS:
+ getSpps().clear();
+ getSpps().addAll((Collection<? extends SPPInstance>)newValue);
+ return;
+ case ETriceGenPackage.STRUCTURE_INSTANCE__SERVICES:
+ getServices().clear();
+ getServices().addAll((Collection<? extends ServiceImplInstance>)newValue);
+ return;
+ case ETriceGenPackage.STRUCTURE_INSTANCE__BINDINGS:
+ getBindings().clear();
+ getBindings().addAll((Collection<? extends BindingInstance>)newValue);
+ return;
+ case ETriceGenPackage.STRUCTURE_INSTANCE__CONNECTIONS:
+ getConnections().clear();
+ getConnections().addAll((Collection<? extends ConnectionInstance>)newValue);
+ return;
+ case ETriceGenPackage.STRUCTURE_INSTANCE__ALL_CONTAINED_INSTANCES:
+ getAllContainedInstances().clear();
+ getAllContainedInstances().addAll((Collection<? extends ActorInstance>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.STRUCTURE_INSTANCE__INSTANCES:
+ getInstances().clear();
+ return;
+ case ETriceGenPackage.STRUCTURE_INSTANCE__PORTS:
+ getPorts().clear();
+ return;
+ case ETriceGenPackage.STRUCTURE_INSTANCE__SAPS:
+ getSaps().clear();
+ return;
+ case ETriceGenPackage.STRUCTURE_INSTANCE__SPPS:
+ getSpps().clear();
+ return;
+ case ETriceGenPackage.STRUCTURE_INSTANCE__SERVICES:
+ getServices().clear();
+ return;
+ case ETriceGenPackage.STRUCTURE_INSTANCE__BINDINGS:
+ getBindings().clear();
+ return;
+ case ETriceGenPackage.STRUCTURE_INSTANCE__CONNECTIONS:
+ getConnections().clear();
+ return;
+ case ETriceGenPackage.STRUCTURE_INSTANCE__ALL_CONTAINED_INSTANCES:
+ getAllContainedInstances().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.STRUCTURE_INSTANCE__INSTANCES:
+ return instances != null && !instances.isEmpty();
+ case ETriceGenPackage.STRUCTURE_INSTANCE__PORTS:
+ return ports != null && !ports.isEmpty();
+ case ETriceGenPackage.STRUCTURE_INSTANCE__SAPS:
+ return saps != null && !saps.isEmpty();
+ case ETriceGenPackage.STRUCTURE_INSTANCE__SPPS:
+ return spps != null && !spps.isEmpty();
+ case ETriceGenPackage.STRUCTURE_INSTANCE__SERVICES:
+ return services != null && !services.isEmpty();
+ case ETriceGenPackage.STRUCTURE_INSTANCE__BINDINGS:
+ return bindings != null && !bindings.isEmpty();
+ case ETriceGenPackage.STRUCTURE_INSTANCE__CONNECTIONS:
+ return connections != null && !connections.isEmpty();
+ case ETriceGenPackage.STRUCTURE_INSTANCE__ALL_CONTAINED_INSTANCES:
+ return !getAllContainedInstances().isEmpty();
+ case ETriceGenPackage.STRUCTURE_INSTANCE__ORDERED_IF_ITEM_INSTANCES:
+ return orderedIfItemInstances != null && !orderedIfItemInstances.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //StructureInstanceImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/SubSystemInstanceImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/SubSystemInstanceImpl.java
new file mode 100644
index 000000000..901e0f714
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/SubSystemInstanceImpl.java
@@ -0,0 +1,241 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.impl;
+
+
+import org.eclipse.etrice.core.room.SubSystemClass;
+import org.eclipse.etrice.generator.etricegen.Counter;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+import org.eclipse.etrice.generator.etricegen.SubSystemInstance;
+
+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;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Sub LogicalSystem Instance</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.SubSystemInstanceImpl#getSubSystemClass <em>Sub System Class</em>}</li>
+ * <li>{@link org.eclipse.etrice.generator.etricegen.impl.SubSystemInstanceImpl#getObjCounter <em>Obj Counter</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class SubSystemInstanceImpl extends StructureInstanceImpl implements SubSystemInstance {
+ /**
+ * The cached value of the '{@link #getSubSystemClass() <em>Sub System Class</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSubSystemClass()
+ * @generated
+ * @ordered
+ */
+ protected SubSystemClass subSystemClass;
+
+ /**
+ * The cached value of the '{@link #getObjCounter() <em>Obj Counter</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getObjCounter()
+ * @generated
+ * @ordered
+ */
+ protected Counter objCounter;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected SubSystemInstanceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ETriceGenPackage.Literals.SUB_SYSTEM_INSTANCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SubSystemClass getSubSystemClass() {
+ if (subSystemClass != null && subSystemClass.eIsProxy()) {
+ InternalEObject oldSubSystemClass = (InternalEObject)subSystemClass;
+ subSystemClass = (SubSystemClass)eResolveProxy(oldSubSystemClass);
+ if (subSystemClass != oldSubSystemClass) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ETriceGenPackage.SUB_SYSTEM_INSTANCE__SUB_SYSTEM_CLASS, oldSubSystemClass, subSystemClass));
+ }
+ }
+ return subSystemClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public SubSystemClass basicGetSubSystemClass() {
+ return subSystemClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSubSystemClass(SubSystemClass newSubSystemClass) {
+ SubSystemClass oldSubSystemClass = subSystemClass;
+ subSystemClass = newSubSystemClass;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.SUB_SYSTEM_INSTANCE__SUB_SYSTEM_CLASS, oldSubSystemClass, subSystemClass));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Counter getObjCounter() {
+ return objCounter;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetObjCounter(Counter newObjCounter, NotificationChain msgs) {
+ Counter oldObjCounter = objCounter;
+ objCounter = newObjCounter;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ETriceGenPackage.SUB_SYSTEM_INSTANCE__OBJ_COUNTER, oldObjCounter, newObjCounter);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setObjCounter(Counter newObjCounter) {
+ if (newObjCounter != objCounter) {
+ NotificationChain msgs = null;
+ if (objCounter != null)
+ msgs = ((InternalEObject)objCounter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ETriceGenPackage.SUB_SYSTEM_INSTANCE__OBJ_COUNTER, null, msgs);
+ if (newObjCounter != null)
+ msgs = ((InternalEObject)newObjCounter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ETriceGenPackage.SUB_SYSTEM_INSTANCE__OBJ_COUNTER, null, msgs);
+ msgs = basicSetObjCounter(newObjCounter, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ETriceGenPackage.SUB_SYSTEM_INSTANCE__OBJ_COUNTER, newObjCounter, newObjCounter));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ETriceGenPackage.SUB_SYSTEM_INSTANCE__OBJ_COUNTER:
+ return basicSetObjCounter(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 ETriceGenPackage.SUB_SYSTEM_INSTANCE__SUB_SYSTEM_CLASS:
+ if (resolve) return getSubSystemClass();
+ return basicGetSubSystemClass();
+ case ETriceGenPackage.SUB_SYSTEM_INSTANCE__OBJ_COUNTER:
+ return getObjCounter();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ETriceGenPackage.SUB_SYSTEM_INSTANCE__SUB_SYSTEM_CLASS:
+ setSubSystemClass((SubSystemClass)newValue);
+ return;
+ case ETriceGenPackage.SUB_SYSTEM_INSTANCE__OBJ_COUNTER:
+ setObjCounter((Counter)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.SUB_SYSTEM_INSTANCE__SUB_SYSTEM_CLASS:
+ setSubSystemClass((SubSystemClass)null);
+ return;
+ case ETriceGenPackage.SUB_SYSTEM_INSTANCE__OBJ_COUNTER:
+ setObjCounter((Counter)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.SUB_SYSTEM_INSTANCE__SUB_SYSTEM_CLASS:
+ return subSystemClass != null;
+ case ETriceGenPackage.SUB_SYSTEM_INSTANCE__OBJ_COUNTER:
+ return objCounter != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //SubSystemInstanceImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/TransitionChainImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/TransitionChainImpl.java
new file mode 100644
index 000000000..1a74eb773
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/impl/TransitionChainImpl.java
@@ -0,0 +1,302 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.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.EObjectImpl;
+import org.eclipse.etrice.core.room.State;
+import org.eclipse.etrice.core.room.TriggeredTransition;
+import org.eclipse.etrice.generator.etricegen.ETriceGenPackage;
+import org.eclipse.etrice.core.naming.RoomNameProvider;
+
+import org.eclipse.etrice.core.room.CPBranchTransition;
+import org.eclipse.etrice.core.room.ChoicePoint;
+import org.eclipse.etrice.core.room.ContinuationTransition;
+import org.eclipse.etrice.core.room.EntryPoint;
+import org.eclipse.etrice.core.room.ExitPoint;
+import org.eclipse.etrice.core.room.NonInitialTransition;
+import org.eclipse.etrice.core.room.StateGraphNode;
+import org.eclipse.etrice.core.room.SubStateTrPointTerminal;
+import org.eclipse.etrice.core.room.TrPoint;
+import org.eclipse.etrice.core.room.TrPointTerminal;
+import org.eclipse.etrice.core.room.Transition;
+import org.eclipse.etrice.core.room.TransitionPoint;
+import org.eclipse.etrice.generator.etricegen.ExpandedActorClass;
+import org.eclipse.etrice.generator.etricegen.ITransitionChainVisitor;
+import org.eclipse.etrice.generator.etricegen.TransitionChain;
+
+/**
+ * <!-- 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.generator.etricegen.impl.TransitionChainImpl#getTransition <em>Transition</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class TransitionChainImpl extends EObjectImpl implements TransitionChain {
+ /**
+ * The cached value of the '{@link #getTransition() <em>Transition</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTransition()
+ * @generated
+ * @ordered
+ */
+ protected Transition transition;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected TransitionChainImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ETriceGenPackage.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, ETriceGenPackage.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, ETriceGenPackage.TRANSITION_CHAIN__TRANSITION, oldTransition, transition));
+ }
+
+ /**
+ * <!-- 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 TriggeredTransition))
+ return false;
+
+ TriggeredTransition trans = (TriggeredTransition)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)
+ return ((TransitionPoint)tp).isHandler();
+ }
+ return false;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public String genExecuteChain(ITransitionChainVisitor tcv) {
+ ExpandedActorClass ac = getExpandedActorClass();
+
+ StringBuilder result = new StringBuilder();
+ result.append(tcv.genTypedData());
+ genChainCode(getTransition(), ac, tcv, result);
+ return result.toString();
+ }
+
+ private void genChainCode(Transition tr,
+ ExpandedActorClass ac, ITransitionChainVisitor tcv, StringBuilder result) {
+
+ result.append(tcv.genActionOperationCall(tr));
+
+ StateGraphNode node = ac.getNode(tr.getTo());
+ EList<Transition> out = ac.getOutgoingTransitions(node);
+ if (node instanceof ChoicePoint) {
+ ContinuationTransition dflt = ac.getDefaultBranch(out);
+ assert(dflt!=null): "ChoicePoint "+RoomNameProvider.getFullPath(node)+" has no default branch!";
+
+ // generate if/else
+ for (Transition cond : out) {
+ if (cond==dflt)
+ continue;
+
+ assert(cond instanceof CPBranchTransition): "The non default ChoicePoint branch "
+ +RoomNameProvider.getFullPath(cond)+" must be of type CPBranchTransition!";
+
+ result.append(tcv.genElseIfBranch((CPBranchTransition)cond));
+
+ genChainCode(cond, ac, tcv, result);
+ }
+
+ // generate default
+ result.append(tcv.genElseBranch(dflt));
+
+ genChainCode(dflt, ac, tcv, result);
+
+ result.append(tcv.genEndIf());
+ }
+ else {
+ if (node instanceof TrPoint) {
+ assert(out.size()<=1): "TrPoint "+RoomNameProvider.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 && ac.isOwnObject(state) && state.getEntryCode()!=null && !state.getEntryCode().getCommands().isEmpty())
+ result.append(tcv.genEntryOperationCall(state));
+ }
+ else if (node instanceof ExitPoint) {
+ if (state!=null && ac.isOwnObject(state) && state.getExitCode()!=null && !state.getExitCode().getCommands().isEmpty())
+ result.append(tcv.genExitOperationCall(state));
+ }
+ else if (node instanceof TransitionPoint) {
+ if (node==ac.getNode(((NonInitialTransition)tr).getFrom())) {
+ result.append(tcv.genReturnState(getStateContext()));
+ return;
+ }
+ }
+ else {
+ assert(false): "unexpected sub type";
+ }
+ genChainCode(out.get(0), ac, 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));
+ }
+ }
+ }
+
+ private ExpandedActorClass getExpandedActorClass() {
+ EObject obj = getTransition();
+ while (obj!=null) {
+ obj = obj.eContainer();
+ if (obj instanceof ExpandedActorClass)
+ return (ExpandedActorClass) obj;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ETriceGenPackage.TRANSITION_CHAIN__TRANSITION:
+ if (resolve) return getTransition();
+ return basicGetTransition();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ETriceGenPackage.TRANSITION_CHAIN__TRANSITION:
+ setTransition((Transition)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.TRANSITION_CHAIN__TRANSITION:
+ setTransition((Transition)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ETriceGenPackage.TRANSITION_CHAIN__TRANSITION:
+ return transition != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //TransitionChainImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/util/ETriceGenAdapterFactory.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/util/ETriceGenAdapterFactory.java
new file mode 100644
index 000000000..faf325ea7
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/util/ETriceGenAdapterFactory.java
@@ -0,0 +1,507 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.etrice.core.room.ActorClass;
+import org.eclipse.etrice.core.room.ActorContainerClass;
+import org.eclipse.etrice.core.room.RoomClass;
+import org.eclipse.etrice.core.room.StructureClass;
+
+import org.eclipse.etrice.generator.etricegen.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage
+ * @generated
+ */
+public class ETriceGenAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static ETriceGenPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ETriceGenAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = ETriceGenPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ETriceGenSwitch<Adapter> modelSwitch =
+ new ETriceGenSwitch<Adapter>() {
+ @Override
+ public Adapter caseRoot(Root object) {
+ return createRootAdapter();
+ }
+ @Override
+ public Adapter caseCounter(Counter object) {
+ return createCounterAdapter();
+ }
+ @Override
+ public Adapter caseInstanceBase(InstanceBase object) {
+ return createInstanceBaseAdapter();
+ }
+ @Override
+ public Adapter caseStructureInstance(StructureInstance object) {
+ return createStructureInstanceAdapter();
+ }
+ @Override
+ public Adapter caseSubSystemInstance(SubSystemInstance object) {
+ return createSubSystemInstanceAdapter();
+ }
+ @Override
+ public Adapter caseActorInstance(ActorInstance object) {
+ return createActorInstanceAdapter();
+ }
+ @Override
+ public Adapter caseInterfaceItemInstance(InterfaceItemInstance object) {
+ return createInterfaceItemInstanceAdapter();
+ }
+ @Override
+ public Adapter casePortInstance(PortInstance object) {
+ return createPortInstanceAdapter();
+ }
+ @Override
+ public Adapter caseBindingInstance(BindingInstance object) {
+ return createBindingInstanceAdapter();
+ }
+ @Override
+ public Adapter caseSAPInstance(SAPInstance object) {
+ return createSAPInstanceAdapter();
+ }
+ @Override
+ public Adapter caseSPPInstance(SPPInstance object) {
+ return createSPPInstanceAdapter();
+ }
+ @Override
+ public Adapter caseServiceImplInstance(ServiceImplInstance object) {
+ return createServiceImplInstanceAdapter();
+ }
+ @Override
+ public Adapter caseConnectionInstance(ConnectionInstance object) {
+ return createConnectionInstanceAdapter();
+ }
+ @Override
+ public Adapter caseActiveTrigger(ActiveTrigger object) {
+ return createActiveTriggerAdapter();
+ }
+ @Override
+ public Adapter caseTransitionChain(TransitionChain object) {
+ return createTransitionChainAdapter();
+ }
+ @Override
+ public Adapter caseITransitionChainVisitor(ITransitionChainVisitor object) {
+ return createITransitionChainVisitorAdapter();
+ }
+ @Override
+ public Adapter caseIDiagnostician(IDiagnostician object) {
+ return createIDiagnosticianAdapter();
+ }
+ @Override
+ public Adapter caseExpandedActorClass(ExpandedActorClass object) {
+ return createExpandedActorClassAdapter();
+ }
+ @Override
+ public Adapter caseRoomClass(RoomClass object) {
+ return createRoomClassAdapter();
+ }
+ @Override
+ public Adapter caseStructureClass(StructureClass object) {
+ return createStructureClassAdapter();
+ }
+ @Override
+ public Adapter caseActorContainerClass(ActorContainerClass object) {
+ return createActorContainerClassAdapter();
+ }
+ @Override
+ public Adapter caseActorClass(ActorClass object) {
+ return createActorClassAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.generator.etricegen.Root <em>Root</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.generator.etricegen.Root
+ * @generated
+ */
+ public Adapter createRootAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.generator.etricegen.Counter <em>Counter</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.generator.etricegen.Counter
+ * @generated
+ */
+ public Adapter createCounterAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.generator.etricegen.InstanceBase <em>Instance Base</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.generator.etricegen.InstanceBase
+ * @generated
+ */
+ public Adapter createInstanceBaseAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.generator.etricegen.StructureInstance <em>Structure Instance</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.generator.etricegen.StructureInstance
+ * @generated
+ */
+ public Adapter createStructureInstanceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.generator.etricegen.SubSystemInstance <em>Sub System Instance</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.generator.etricegen.SubSystemInstance
+ * @generated
+ */
+ public Adapter createSubSystemInstanceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.generator.etricegen.ActorInstance <em>Actor Instance</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.generator.etricegen.ActorInstance
+ * @generated
+ */
+ public Adapter createActorInstanceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.generator.etricegen.InterfaceItemInstance <em>Interface Item Instance</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.generator.etricegen.InterfaceItemInstance
+ * @generated
+ */
+ public Adapter createInterfaceItemInstanceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.generator.etricegen.PortInstance <em>Port Instance</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.generator.etricegen.PortInstance
+ * @generated
+ */
+ public Adapter createPortInstanceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.generator.etricegen.BindingInstance <em>Binding Instance</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.generator.etricegen.BindingInstance
+ * @generated
+ */
+ public Adapter createBindingInstanceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.generator.etricegen.SAPInstance <em>SAP Instance</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.generator.etricegen.SAPInstance
+ * @generated
+ */
+ public Adapter createSAPInstanceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.generator.etricegen.SPPInstance <em>SPP Instance</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.generator.etricegen.SPPInstance
+ * @generated
+ */
+ public Adapter createSPPInstanceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.generator.etricegen.ServiceImplInstance <em>Service Impl Instance</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.generator.etricegen.ServiceImplInstance
+ * @generated
+ */
+ public Adapter createServiceImplInstanceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.generator.etricegen.ConnectionInstance <em>Connection Instance</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.generator.etricegen.ConnectionInstance
+ * @generated
+ */
+ public Adapter createConnectionInstanceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.generator.etricegen.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.generator.etricegen.ActiveTrigger
+ * @generated
+ */
+ public Adapter createActiveTriggerAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.generator.etricegen.TransitionChain <em>Transition Chain</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.generator.etricegen.TransitionChain
+ * @generated
+ */
+ public Adapter createTransitionChainAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link ITransitionChainVisitor <em>ITransition Chain Visitor</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
+ * @generated
+ */
+ public Adapter createITransitionChainVisitorAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link IDiagnostician <em>IDiagnostician</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
+ * @generated
+ */
+ public Adapter createIDiagnosticianAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.generator.etricegen.ExpandedActorClass <em>Expanded Actor Class</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.generator.etricegen.ExpandedActorClass
+ * @generated
+ */
+ public Adapter createExpandedActorClassAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.room.RoomClass <em>Class</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.room.RoomClass
+ * @generated
+ */
+ public Adapter createRoomClassAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.room.StructureClass <em>Structure Class</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.room.StructureClass
+ * @generated
+ */
+ public Adapter createStructureClassAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.room.ActorContainerClass <em>Actor Container Class</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.room.ActorContainerClass
+ * @generated
+ */
+ public Adapter createActorContainerClassAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.etrice.core.room.ActorClass <em>Actor Class</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.room.ActorClass
+ * @generated
+ */
+ public Adapter createActorClassAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //ETriceGenAdapterFactory
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/util/ETriceGenResourceFactoryImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/util/ETriceGenResourceFactoryImpl.java
new file mode 100644
index 000000000..b3e36f4e6
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/util/ETriceGenResourceFactoryImpl.java
@@ -0,0 +1,45 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.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.generator.etricegen.util.ETriceGenResourceImpl
+ * @generated
+ */
+public class ETriceGenResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ETriceGenResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ Resource result = new ETriceGenResourceImpl(uri);
+ return result;
+ }
+
+} //ETriceGenResourceFactoryImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/util/ETriceGenResourceImpl.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/util/ETriceGenResourceImpl.java
new file mode 100644
index 000000000..e0cc86087
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/util/ETriceGenResourceImpl.java
@@ -0,0 +1,32 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.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.generator.etricegen.util.ETriceGenResourceFactoryImpl
+ * @generated
+ */
+public class ETriceGenResourceImpl extends XMIResourceImpl {
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public ETriceGenResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} //ETriceGenResourceImpl
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/util/ETriceGenSwitch.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/util/ETriceGenSwitch.java
new file mode 100644
index 000000000..8040b4bb1
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/util/ETriceGenSwitch.java
@@ -0,0 +1,557 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.etrice.core.room.ActorClass;
+import org.eclipse.etrice.core.room.ActorContainerClass;
+import org.eclipse.etrice.core.room.RoomClass;
+import org.eclipse.etrice.core.room.StructureClass;
+
+import org.eclipse.etrice.generator.etricegen.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.etrice.generator.etricegen.ETriceGenPackage
+ * @generated
+ */
+public class ETriceGenSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static ETriceGenPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ETriceGenSwitch() {
+ if (modelPackage == null) {
+ modelPackage = ETriceGenPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case ETriceGenPackage.ROOT: {
+ Root root = (Root)theEObject;
+ T result = caseRoot(root);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ETriceGenPackage.COUNTER: {
+ Counter counter = (Counter)theEObject;
+ T result = caseCounter(counter);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ETriceGenPackage.INSTANCE_BASE: {
+ InstanceBase instanceBase = (InstanceBase)theEObject;
+ T result = caseInstanceBase(instanceBase);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ETriceGenPackage.STRUCTURE_INSTANCE: {
+ StructureInstance structureInstance = (StructureInstance)theEObject;
+ T result = caseStructureInstance(structureInstance);
+ if (result == null) result = caseInstanceBase(structureInstance);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ETriceGenPackage.SUB_SYSTEM_INSTANCE: {
+ SubSystemInstance subSystemInstance = (SubSystemInstance)theEObject;
+ T result = caseSubSystemInstance(subSystemInstance);
+ if (result == null) result = caseStructureInstance(subSystemInstance);
+ if (result == null) result = caseInstanceBase(subSystemInstance);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ETriceGenPackage.ACTOR_INSTANCE: {
+ ActorInstance actorInstance = (ActorInstance)theEObject;
+ T result = caseActorInstance(actorInstance);
+ if (result == null) result = caseStructureInstance(actorInstance);
+ if (result == null) result = caseInstanceBase(actorInstance);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ETriceGenPackage.INTERFACE_ITEM_INSTANCE: {
+ InterfaceItemInstance interfaceItemInstance = (InterfaceItemInstance)theEObject;
+ T result = caseInterfaceItemInstance(interfaceItemInstance);
+ if (result == null) result = caseInstanceBase(interfaceItemInstance);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ETriceGenPackage.PORT_INSTANCE: {
+ PortInstance portInstance = (PortInstance)theEObject;
+ T result = casePortInstance(portInstance);
+ if (result == null) result = caseInterfaceItemInstance(portInstance);
+ if (result == null) result = caseInstanceBase(portInstance);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ETriceGenPackage.BINDING_INSTANCE: {
+ BindingInstance bindingInstance = (BindingInstance)theEObject;
+ T result = caseBindingInstance(bindingInstance);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ETriceGenPackage.SAP_INSTANCE: {
+ SAPInstance sapInstance = (SAPInstance)theEObject;
+ T result = caseSAPInstance(sapInstance);
+ if (result == null) result = caseInterfaceItemInstance(sapInstance);
+ if (result == null) result = caseInstanceBase(sapInstance);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ETriceGenPackage.SPP_INSTANCE: {
+ SPPInstance sppInstance = (SPPInstance)theEObject;
+ T result = caseSPPInstance(sppInstance);
+ if (result == null) result = caseInstanceBase(sppInstance);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ETriceGenPackage.SERVICE_IMPL_INSTANCE: {
+ ServiceImplInstance serviceImplInstance = (ServiceImplInstance)theEObject;
+ T result = caseServiceImplInstance(serviceImplInstance);
+ if (result == null) result = caseInterfaceItemInstance(serviceImplInstance);
+ if (result == null) result = caseInstanceBase(serviceImplInstance);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ETriceGenPackage.CONNECTION_INSTANCE: {
+ ConnectionInstance connectionInstance = (ConnectionInstance)theEObject;
+ T result = caseConnectionInstance(connectionInstance);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ETriceGenPackage.ACTIVE_TRIGGER: {
+ ActiveTrigger activeTrigger = (ActiveTrigger)theEObject;
+ T result = caseActiveTrigger(activeTrigger);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ETriceGenPackage.TRANSITION_CHAIN: {
+ TransitionChain transitionChain = (TransitionChain)theEObject;
+ T result = caseTransitionChain(transitionChain);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ETriceGenPackage.EXPANDED_ACTOR_CLASS: {
+ ExpandedActorClass expandedActorClass = (ExpandedActorClass)theEObject;
+ T result = caseExpandedActorClass(expandedActorClass);
+ if (result == null) result = caseActorClass(expandedActorClass);
+ if (result == null) result = caseActorContainerClass(expandedActorClass);
+ if (result == null) result = caseStructureClass(expandedActorClass);
+ if (result == null) result = caseRoomClass(expandedActorClass);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Root</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>Root</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRoot(Root object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Counter</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>Counter</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseCounter(Counter object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Instance Base</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>Instance Base</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseInstanceBase(InstanceBase object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Structure Instance</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>Structure Instance</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseStructureInstance(StructureInstance object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Sub System Instance</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>Sub System Instance</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSubSystemInstance(SubSystemInstance object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Actor Instance</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>Actor Instance</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseActorInstance(ActorInstance object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Interface Item Instance</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>Interface Item Instance</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseInterfaceItemInstance(InterfaceItemInstance object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Port Instance</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>Port Instance</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T casePortInstance(PortInstance object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Binding Instance</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>Binding Instance</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBindingInstance(BindingInstance object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>SAP Instance</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>SAP Instance</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSAPInstance(SAPInstance object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>SPP Instance</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>SPP Instance</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseSPPInstance(SPPInstance object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Service Impl Instance</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>Service Impl Instance</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseServiceImplInstance(ServiceImplInstance object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Connection Instance</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>Connection Instance</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseConnectionInstance(ConnectionInstance object) {
+ return null;
+ }
+
+ /**
+ * 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>Transition Chain</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>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseTransitionChain(TransitionChain object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>ITransition Chain Visitor</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>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseITransitionChainVisitor(ITransitionChainVisitor object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>IDiagnostician</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>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseIDiagnostician(IDiagnostician object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Expanded Actor Class</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 Actor Class</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseExpandedActorClass(ExpandedActorClass object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Class</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>Class</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseRoomClass(RoomClass object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Structure Class</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>Structure Class</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseStructureClass(StructureClass object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Actor Container Class</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>Actor Container Class</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseActorContainerClass(ActorContainerClass object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Actor Class</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>Actor Class</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseActorClass(ActorClass object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //ETriceGenSwitch
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ActiveTriggerValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ActiveTriggerValidator.java
new file mode 100644
index 000000000..d2968748c
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ActiveTriggerValidator.java
@@ -0,0 +1,28 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+import org.eclipse.etrice.core.room.InterfaceItem;
+import org.eclipse.etrice.core.room.Message;
+import org.eclipse.etrice.core.room.TriggeredTransition;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * A sample validator interface for {@link org.eclipse.etrice.generator.etricegen.ActiveTrigger}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface ActiveTriggerValidator {
+ boolean validate();
+
+ boolean validateMsg(Message value);
+ boolean validateIfitem(InterfaceItem value);
+ boolean validateTrigger(String value);
+ boolean validateTransitions(EList<TriggeredTransition> value);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ActorInstanceValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ActorInstanceValidator.java
new file mode 100644
index 000000000..ad41c5aeb
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ActorInstanceValidator.java
@@ -0,0 +1,21 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+import org.eclipse.etrice.core.room.ActorClass;
+
+/**
+ * A sample validator interface for {@link org.eclipse.etrice.generator.etricegen.ActorInstance}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface ActorInstanceValidator {
+ boolean validate();
+
+ boolean validateActorClass(ActorClass value);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/BindingInstanceValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/BindingInstanceValidator.java
new file mode 100644
index 000000000..2149d9a86
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/BindingInstanceValidator.java
@@ -0,0 +1,23 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.etrice.generator.etricegen.PortInstance;
+
+/**
+ * A sample validator interface for {@link org.eclipse.etrice.generator.etricegen.BindingInstance}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface BindingInstanceValidator {
+ boolean validate();
+
+ boolean validatePorts(EList<PortInstance> value);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ConnectionInstanceValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ConnectionInstanceValidator.java
new file mode 100644
index 000000000..9708ba934
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ConnectionInstanceValidator.java
@@ -0,0 +1,26 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+import org.eclipse.etrice.core.room.LayerConnection;
+import org.eclipse.etrice.generator.etricegen.ActorInstance;
+import org.eclipse.etrice.generator.etricegen.SPPInstance;
+
+/**
+ * A sample validator interface for {@link org.eclipse.etrice.generator.etricegen.ConnectionInstance}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface ConnectionInstanceValidator {
+ boolean validate();
+
+ boolean validateFromAI(ActorInstance value);
+ boolean validateFromSPP(SPPInstance value);
+ boolean validateToSPP(SPPInstance value);
+ boolean validateConnection(LayerConnection value);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/CounterValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/CounterValidator.java
new file mode 100644
index 000000000..8b3346e75
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/CounterValidator.java
@@ -0,0 +1,20 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+
+/**
+ * A sample validator interface for {@link org.eclipse.etrice.generator.etricegen.Counter}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface CounterValidator {
+ boolean validate();
+
+ boolean validateCounter(int value);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ExpandedActorClassValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ExpandedActorClassValidator.java
new file mode 100644
index 000000000..93e0916de
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ExpandedActorClassValidator.java
@@ -0,0 +1,21 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+import org.eclipse.etrice.core.room.ActorClass;
+
+/**
+ * A sample validator interface for {@link org.eclipse.etrice.generator.etricegen.ExpandedActorClass}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface ExpandedActorClassValidator {
+ boolean validate();
+
+ boolean validateActorClass(ActorClass value);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/IDiagnosticianValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/IDiagnosticianValidator.java
new file mode 100644
index 000000000..ef81d4840
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/IDiagnosticianValidator.java
@@ -0,0 +1,19 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+
+/**
+ * A sample validator interface for {@link IDiagnostician}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface IDiagnosticianValidator {
+ boolean validate();
+
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ITransitionChainVisitorValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ITransitionChainVisitorValidator.java
new file mode 100644
index 000000000..d8395694d
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ITransitionChainVisitorValidator.java
@@ -0,0 +1,19 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+
+/**
+ * A sample validator interface for {@link ITransitionChainVisitor}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface ITransitionChainVisitorValidator {
+ boolean validate();
+
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/InstanceBaseValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/InstanceBaseValidator.java
new file mode 100644
index 000000000..566d7df0c
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/InstanceBaseValidator.java
@@ -0,0 +1,22 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+
+/**
+ * A sample validator interface for {@link org.eclipse.etrice.generator.etricegen.InstanceBase}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface InstanceBaseValidator {
+ boolean validate();
+
+ boolean validateName(String value);
+ boolean validatePath(String value);
+ boolean validateObjId(int value);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/InterfaceItemInstanceValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/InterfaceItemInstanceValidator.java
new file mode 100644
index 000000000..9fd44a9bb
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/InterfaceItemInstanceValidator.java
@@ -0,0 +1,23 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.etrice.generator.etricegen.InterfaceItemInstance;
+
+/**
+ * A sample validator interface for {@link org.eclipse.etrice.generator.etricegen.InterfaceItemInstance}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface InterfaceItemInstanceValidator {
+ boolean validate();
+
+ boolean validatePeers(EList<InterfaceItemInstance> value);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/PortInstanceValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/PortInstanceValidator.java
new file mode 100644
index 000000000..32d3248ae
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/PortInstanceValidator.java
@@ -0,0 +1,28 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+
+import org.eclipse.etrice.core.room.Port;
+import org.eclipse.etrice.generator.etricegen.BindingInstance;
+import org.eclipse.etrice.generator.etricegen.PortKind;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * A sample validator interface for {@link org.eclipse.etrice.generator.etricegen.PortInstance}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface PortInstanceValidator {
+ boolean validate();
+
+ boolean validatePort(Port value);
+ boolean validateKind(PortKind value);
+ boolean validateBindings(EList<BindingInstance> value);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/RootValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/RootValidator.java
new file mode 100644
index 000000000..9e8e83888
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/RootValidator.java
@@ -0,0 +1,37 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+
+import org.eclipse.etrice.core.room.ActorClass;
+import org.eclipse.etrice.core.room.DataClass;
+import org.eclipse.etrice.core.room.ProtocolClass;
+import org.eclipse.etrice.core.room.RoomModel;
+import org.eclipse.etrice.generator.etricegen.ExpandedActorClass;
+import org.eclipse.etrice.generator.etricegen.SubSystemInstance;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * A sample validator interface for {@link org.eclipse.etrice.generator.etricegen.Root}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface RootValidator {
+ boolean validate();
+
+ boolean validateSubSystems(EList<SubSystemInstance> value);
+
+ boolean validateComponents(EList<SubSystemInstance> value);
+ boolean validateModels(EList<RoomModel> value);
+ boolean validateXpActorClasses(EList<ExpandedActorClass> value);
+ boolean validateUsedDataClasses(EList<DataClass> value);
+ boolean validateUsedProtocolClasses(EList<ProtocolClass> value);
+ boolean validateUsedActorClasses(EList<ActorClass> value);
+ boolean validateUsedRoomModels(EList<RoomModel> value);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/SAPInstanceValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/SAPInstanceValidator.java
new file mode 100644
index 000000000..f726a31fb
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/SAPInstanceValidator.java
@@ -0,0 +1,21 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+import org.eclipse.etrice.core.room.SAPRef;
+
+/**
+ * A sample validator interface for {@link org.eclipse.etrice.generator.etricegen.SAPInstance}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface SAPInstanceValidator {
+ boolean validate();
+
+ boolean validateSap(SAPRef value);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/SPPInstanceValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/SPPInstanceValidator.java
new file mode 100644
index 000000000..ca73aeca0
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/SPPInstanceValidator.java
@@ -0,0 +1,27 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+
+import org.eclipse.etrice.core.room.SPPRef;
+import org.eclipse.etrice.generator.etricegen.ConnectionInstance;
+
+import org.eclipse.emf.common.util.EList;
+
+/**
+ * A sample validator interface for {@link org.eclipse.etrice.generator.etricegen.SPPInstance}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface SPPInstanceValidator {
+ boolean validate();
+
+ boolean validateSpp(SPPRef value);
+ boolean validateIncoming(EList<ConnectionInstance> value);
+ boolean validateOutgoing(ConnectionInstance value);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ServiceImplInstanceValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ServiceImplInstanceValidator.java
new file mode 100644
index 000000000..baeed4d7b
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/ServiceImplInstanceValidator.java
@@ -0,0 +1,21 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+import org.eclipse.etrice.core.room.ServiceImplementation;
+
+/**
+ * A sample validator interface for {@link org.eclipse.etrice.generator.etricegen.ServiceImplInstance}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface ServiceImplInstanceValidator {
+ boolean validate();
+
+ boolean validateSvcImpl(ServiceImplementation value);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/StructureInstanceValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/StructureInstanceValidator.java
new file mode 100644
index 000000000..ca81b4ebb
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/StructureInstanceValidator.java
@@ -0,0 +1,38 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.etrice.generator.etricegen.ActorInstance;
+import org.eclipse.etrice.generator.etricegen.BindingInstance;
+import org.eclipse.etrice.generator.etricegen.ConnectionInstance;
+import org.eclipse.etrice.generator.etricegen.InterfaceItemInstance;
+import org.eclipse.etrice.generator.etricegen.PortInstance;
+import org.eclipse.etrice.generator.etricegen.SAPInstance;
+import org.eclipse.etrice.generator.etricegen.SPPInstance;
+import org.eclipse.etrice.generator.etricegen.ServiceImplInstance;
+
+/**
+ * A sample validator interface for {@link org.eclipse.etrice.generator.etricegen.StructureInstance}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface StructureInstanceValidator {
+ boolean validate();
+
+ boolean validateInstances(EList<ActorInstance> value);
+ boolean validatePorts(EList<PortInstance> value);
+ boolean validateSaps(EList<SAPInstance> value);
+ boolean validateSpps(EList<SPPInstance> value);
+ boolean validateServices(EList<ServiceImplInstance> value);
+ boolean validateBindings(EList<BindingInstance> value);
+ boolean validateConnections(EList<ConnectionInstance> value);
+ boolean validateAllContainedInstances(EList<ActorInstance> value);
+ boolean validateOrderedIfItemInstances(EList<InterfaceItemInstance> value);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/SubSystemInstanceValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/SubSystemInstanceValidator.java
new file mode 100644
index 000000000..59799e6e0
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/SubSystemInstanceValidator.java
@@ -0,0 +1,23 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+import org.eclipse.etrice.core.room.SubSystemClass;
+import org.eclipse.etrice.generator.etricegen.Counter;
+
+/**
+ * A sample validator interface for {@link org.eclipse.etrice.generator.etricegen.SubSystemInstance}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface SubSystemInstanceValidator {
+ boolean validate();
+
+ boolean validateSubSystemClass(SubSystemClass value);
+ boolean validateObjCounter(Counter value);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/TransitionChainValidator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/TransitionChainValidator.java
new file mode 100644
index 000000000..20b35e916
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/etricegen/validation/TransitionChainValidator.java
@@ -0,0 +1,24 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.etrice.generator.etricegen.validation;
+
+import org.eclipse.etrice.core.room.Transition;
+import org.eclipse.etrice.core.room.TriggeredTransition;
+
+/**
+ * A sample validator interface for {@link org.eclipse.etrice.generator.etricegen.TransitionChain}.
+ * This doesn't really do anything, and it's not a real EMF artifact.
+ * It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended.
+ * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+ */
+public interface TransitionChainValidator {
+ boolean validate();
+
+ boolean validateTransition(Transition value);
+
+ boolean validateTransition(TriggeredTransition value);
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/workflow/InstanceModelCreator.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/workflow/InstanceModelCreator.java
new file mode 100644
index 000000000..834505cab
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/workflow/InstanceModelCreator.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * 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.generator.workflow;
+
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.mwe2.runtime.workflow.IWorkflowContext;
+
+import org.eclipse.etrice.core.room.RoomModel;
+import org.eclipse.etrice.generator.builder.InstanceModelBuilder;
+import org.eclipse.etrice.generator.builder.ValidationException;
+import org.eclipse.etrice.generator.etricegen.Root;
+import org.eclipse.etrice.generator.etricegen.util.ETriceGenResourceImpl;
+
+public class InstanceModelCreator extends WorkflowComponentWithTwoSlots {
+
+ private XtendStdlibLogger logger;
+ private InstanceModelBuilder builder;
+ private boolean debug = false;
+ private boolean save = false;
+ private String uri = "tmp.rim";
+ private WorkflowDiagnostician diagnostician;
+
+ public boolean isSave() {
+ return save;
+ }
+
+ public void setSave(boolean save) {
+ this.save = save;
+ }
+
+ public String getUri() {
+ return uri;
+ }
+
+ public void setUri(String uri) {
+ this.uri = uri;
+ }
+
+ public boolean isDebug() {
+ return debug;
+ }
+
+ public void setDebug(boolean debug) {
+ this.debug = debug;
+ }
+
+ @Override
+ public void invoke(IWorkflowContext ctx) {
+ logger = new XtendStdlibLogger();
+ diagnostician = new WorkflowDiagnostician(logger);
+ if (debug)
+ logger.setVerbose(true);
+ builder = new InstanceModelBuilder(logger, diagnostician);
+
+ List<RoomModel> models = getRoomModels(ctx);
+
+ if (models.size()>0) {
+ Root root = builder.createInstanceModel(models);
+
+ List<Root> result = new LinkedList<Root>();
+ result.add(root);
+ ctx.put(getOutSlot(), result);
+
+ if (save)
+ saveResult(root);
+ }
+ else {
+ logger.logError("InstanceModelCreator: Could not find a RoomModel in input slot "+getInSlot()+".", null);
+ }
+
+ if (logger.getErrorCount()>0)
+ throw new ValidationException("Erros detected.");
+ }
+
+ private List<RoomModel> getRoomModels(IWorkflowContext ctx) {
+ Object object = ctx.get(getInSlot());
+ @SuppressWarnings("unchecked")
+ List<RoomModel> models = (List<RoomModel>) object;
+ return models;
+ }
+
+ private void saveResult(Root root) {
+ URI uri = URI.createFileURI(this.uri);
+ Resource resource = new ETriceGenResourceImpl(uri);
+ resource.getContents().add(root);
+ try {
+ resource.save(null);
+ } catch (IOException e) {
+ throw new WrappedException(e);
+ }
+ }
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/workflow/WorkflowComponentWithTwoSlots.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/workflow/WorkflowComponentWithTwoSlots.java
new file mode 100644
index 000000000..97ab4ac83
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/workflow/WorkflowComponentWithTwoSlots.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * 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.generator.workflow;
+
+import org.eclipse.emf.mwe2.runtime.workflow.IWorkflowComponent;
+
+public abstract class WorkflowComponentWithTwoSlots implements IWorkflowComponent {
+
+ private String inSlot = "model";
+ private String outSlot = "outmodel";
+
+ public void setInSlot(String slot) {
+ this.inSlot = slot;
+ }
+
+ public String getInSlot() {
+ return inSlot;
+ }
+
+ public String getOutSlot() {
+ return outSlot;
+ }
+
+ public void setOutSlot(String outSlot) {
+ this.outSlot = outSlot;
+ }
+
+ public void postInvoke() {
+ }
+
+ public void preInvoke() {
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/workflow/WorkflowDiagnostician.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/workflow/WorkflowDiagnostician.java
new file mode 100644
index 000000000..8f885c2e9
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/workflow/WorkflowDiagnostician.java
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * 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.generator.workflow;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.etrice.core.naming.RoomNameProvider;
+import org.eclipse.etrice.generator.builder.ILogger;
+import org.eclipse.etrice.generator.etricegen.IDiagnostician;
+
+
+public class WorkflowDiagnostician implements IDiagnostician {
+
+ private ILogger logger;
+ private boolean failed = false;
+
+ public WorkflowDiagnostician(ILogger logger) {
+ this.logger = logger;
+ }
+
+ @Override
+ public void warning(String msg, EObject source) {
+ warning(msg, source, -1);
+ }
+
+ @Override
+ public void warning(String msg, EObject source, int feature) {
+ String location = RoomNameProvider.getLocation(source);
+ if (location==null || location.isEmpty())
+ logger.logInfo(msg);
+ else
+ logger.logInfo(msg+" @ "+location);
+ }
+
+ @Override
+ public void error(String msg, EObject source) {
+ error(msg, source, -1);
+ }
+
+ @Override
+ public void error(String msg, EObject source, int feature) {
+ failed = true;
+ String location = RoomNameProvider.getLocation(source);
+ if (location==null || location.isEmpty())
+ logger.logError(msg, source);
+ else
+ logger.logError(msg+" @ "+location, source);
+ }
+
+ @Override
+ public boolean isFailed() {
+ return failed;
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/workflow/XtendStdlibLogger.java b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/workflow/XtendStdlibLogger.java
new file mode 100644
index 000000000..2908a2306
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/src/org/eclipse/etrice/generator/workflow/XtendStdlibLogger.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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.generator.workflow;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.etrice.generator.builder.ILogger;
+import org.eclipse.xtend.util.stdlib.IOExtensions;
+
+
+public class XtendStdlibLogger implements ILogger {
+
+ private boolean verbose = false;
+ private int errorCount = 0;
+
+ public boolean isVerbose() {
+ return verbose;
+ }
+
+ public void setVerbose(boolean verbose) {
+ this.verbose = verbose;
+ }
+
+ @Override
+ public void logInfo(String text) {
+ if (isVerbose())
+ IOExtensions.info(text);
+ }
+
+ @Override
+ public void logError(String text, EObject obj) {
+ errorCount++;
+ IOExtensions.error(text);
+ }
+
+ public int getErrorCount() {
+ return errorCount;
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.generator/text/description.txt b/plugins/org.eclipse.etrice.generator/text/description.txt
new file mode 100644
index 000000000..1cc5c05c4
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator/text/description.txt
@@ -0,0 +1,120 @@
+Model eTriceGen
+
+This model description is not a real EMF artifact. It was generated by the
+org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's
+code generator can be extended.
+This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false.
+
+Package etricegen <http://www.eclipse.org/etrice/generator>
+
+ Class Root
+ Reference subSystems : SubSystemInstance<<0..*>>
+ Reference models : RoomModel<<0..*>>
+ Reference xpActorClasses : ExpandedActorClass<<0..*>>
+ Reference /usedDataClasses : DataClass<<0..*>>
+ Reference /usedProtocolClasses : ProtocolClass<<0..*>>
+ Reference /usedActorClasses : ActorClass<<0..*>>
+ Reference /usedRoomModels : RoomModel<<0..*>>
+ Operation getReferencedModels(RoomClass) : RoomModel<<0..*>>
+ Operation getReferencedProtocols(ActorClass) : ProtocolClass<<0..*>>
+
+ Class Counter
+ Attribute counter : EInt
+ Operation getAndIncrementCount() : EInt
+ Operation getAndIncrementCount(EInt) : EInt
+
+ Class InstanceBase
+ Attribute name : EString
+ Attribute /path : EString
+ Attribute objId : EInt
+
+ Class StructureInstance -> InstanceBase
+ Reference instances : ActorInstance<<0..*>>
+ Reference ports : PortInstance<<0..*>>
+ Reference saps : SAPInstance<<0..*>>
+ Reference spps : SPPInstance<<0..*>>
+ Reference services : ServiceImplInstance<<0..*>>
+ Reference bindings : BindingInstance<<0..*>>
+ Reference connections : ConnectionInstance<<0..*>>
+ Reference /allContainedInstances : ActorInstance<<0..*>>
+ Reference /orderedIfItemInstances : InterfaceItemInstance<<0..*>>
+
+ Class SubSystemInstance -> StructureInstance
+ Reference subSystemClass : SubSystemClass
+ Reference objCounter : Counter
+
+ Class ActorInstance -> StructureInstance
+ Reference actorClass : ActorClass
+
+ Class InterfaceItemInstance -> InstanceBase
+ Reference peers : InterfaceItemInstance<<0..*>>
+
+ Class PortInstance -> InterfaceItemInstance
+ Reference port : Port
+ Attribute kind : PortKind
+ Reference bindings : BindingInstance<<0..*>>
+
+ Class BindingInstance
+ Reference ports : PortInstance<<0..2>>
+
+ Class SAPInstance -> InterfaceItemInstance
+ Reference sap : SAPRef
+
+ Class SPPInstance -> InstanceBase
+ Reference spp : SPPRef
+ Reference incoming : ConnectionInstance<<0..*>>
+ Reference outgoing : ConnectionInstance
+
+ Class ServiceImplInstance -> InterfaceItemInstance
+ Reference svcImpl : ServiceImplementation
+
+ Class ConnectionInstance
+ Reference fromAI : ActorInstance
+ Reference fromSPP : SPPInstance
+ Reference toSPP : SPPInstance
+ Reference connection : LayerConnection
+
+ Class ActiveTrigger
+ Reference msg : Message
+ Reference ifitem : InterfaceItem
+ Attribute trigger : EString
+ Reference transitions : TriggeredTransition<<0..*>>
+
+ Class TransitionChain
+ Reference transition : Transition
+ Operation getStateContext() : State
+ Operation isHandler() : EBoolean
+ Operation genExecuteChain(ITransitionChainVisitor) : EString
+
+ Class ITransitionChainVisitor
+
+ Class IDiagnostician
+
+ Class ExpandedActorClass -> ActorClass
+ Reference actorClass : ActorClass
+ Operation prepare(IDiagnostician) : void
+ Operation release() : void
+ Operation addOwnObject(StateGraphItem) : void
+ Operation isOwnObject(StateGraphItem) : EBoolean
+ Operation getInterfaceItemLocalId(InterfaceItem) : EInt
+ Operation hasStateMachine() : EBoolean
+ Operation getCode(DetailCode) : EString
+ Operation getTriggerCodeName(MessageFromIf) : EString
+ Operation getTriggerCodeName(EString) : EString
+ Operation getOutgoingTransitions(StateGraphNode) : Transition<<0..*>>
+ Operation getIncomingTransitions(StateGraphNode) : Transition<<0..*>>
+ Operation getActiveTriggers(State) : ActiveTrigger<<0..*>>
+ Operation getTriggers() : MessageFromIf<<0..*>>
+ Operation getOwnTriggers() : MessageFromIf<<0..*>>
+ Operation getMessageID(MessageFromIf) : EString
+ Operation getChain(Transition) : TransitionChain
+ Operation getTransitionChains() : TransitionChain<<0..*>>
+ Operation getOwnTransitionChains() : TransitionChain<<0..*>>
+ Operation getNode(TransitionTerminal) : StateGraphNode
+ Operation isMatching(Trigger, EString) : EBoolean
+ Operation getDefaultBranch(Transition<<0..*>>) : ContinuationTransition
+
+ Enum PortKind
+ Literal external = 0
+ Literal internal = 1
+ Literal relay = 2

Back to the top