Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Hilden2019-07-01 04:18:20 -0400
committerChristian Hilden2019-07-01 04:18:20 -0400
commit9bd8a8bd2e2662045909ad774ee2d857a47e24a5 (patch)
tree733f0cf142b77b38c8b3b63c5b068247b438e2e7
parenta877df88488833e5f057ad56fafaef78171c0c5a (diff)
downloadorg.eclipse.etrice-9bd8a8bd2e2662045909ad774ee2d857a47e24a5.tar.gz
org.eclipse.etrice-9bd8a8bd2e2662045909ad774ee2d857a47e24a5.tar.xz
org.eclipse.etrice-9bd8a8bd2e2662045909ad774ee2d857a47e24a5.zip
Bug 548621 - integrated first version of interface contracts
-rw-r--r--features/org.eclipse.etrice.feature/feature.xml14
-rw-r--r--gradle/etGenerator.gradle11
-rw-r--r--plugins/org.eclipse.etrice.core.common/src/org/eclipse/etrice/core/common/base/util/BaseHelpers.java4
-rw-r--r--plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/ConfigRuntimeModule.java4
-rw-r--r--plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/RoomRuntimeModule.java4
-rw-r--r--plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/InterfaceContractHelpers.xtend67
-rw-r--r--plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/scoping/RoomModelPathFileExtensionFilter.java24
-rw-r--r--plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/validation/RoomJavaValidator.java17
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/.classpath8
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/.gitignore3
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/.project34
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/.settings/org.eclipse.jdt.core.prefs11
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/META-INF/MANIFEST.MF17
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/build.gradle25
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/build.properties5
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/Main.java50
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/gen/DetailCodeGen.xtend48
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/gen/MainGen.xtend70
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/gen/MonitorActorGen.xtend254
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/setup/GeneratorModule.java86
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/setup/GeneratorSettings.xtend28
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/setup/MonitorGeneratorOptions.java40
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/util/ContractModelValidator.xtend53
-rw-r--r--plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/util/ContractMonitorGeneratorHelpers.xtend91
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.contractmonitor/.classpath7
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.contractmonitor/.gitignore2
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.contractmonitor/.project28
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.contractmonitor/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.contractmonitor/META-INF/MANIFEST.MF21
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.contractmonitor/build.properties5
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.contractmonitor/plugin.xml22
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/Activator.java65
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/ContractMonitorGeneratorConfigTab.java91
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/ContractMonitorGeneratorLaunchConfigurationDelegate.java39
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/ContractMonitorGeneratorLaunchConfigurationTabGroup.java36
-rw-r--r--plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/ContractMonitorGeneratorMainTab.java31
-rw-r--r--pom.xml2
-rw-r--r--releng/org.eclipse.etrice.parent/pom.xml2
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/model/etrice/api/contracts/definitions.room19
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/model/etrice/api/contracts/monitors.room54
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/model/etrice/api/contracts/definitions.room19
-rw-r--r--runtime/org.eclipse.etrice.modellib.java/model/etrice/api/contracts/monitors.room54
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.c7
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.h10
-rw-r--r--settings.gradle1
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/build.gradle23
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/model-gen/ContractMonitor_monitors.room282
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/modelpath1
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/ContractMonitor.room81
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/ContractMonitorTest.room145
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Appl.behavior88
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Appl.structure456
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.AxisController.structure37
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Client.behavior344
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Client.structure37
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.ContractMonitor_Top.structure770
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Controller_ex1.structure53
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Provider.structure37
59 files changed, 3836 insertions, 10 deletions
diff --git a/features/org.eclipse.etrice.feature/feature.xml b/features/org.eclipse.etrice.feature/feature.xml
index 33e0c4dee..96fb6fa79 100644
--- a/features/org.eclipse.etrice.feature/feature.xml
+++ b/features/org.eclipse.etrice.feature/feature.xml
@@ -358,4 +358,18 @@ http://www.eclipse.org/legal/epl-v20.html
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.etrice.generator.contractmonitor"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.etrice.generator.launch.contractmonitor"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
</feature>
diff --git a/gradle/etGenerator.gradle b/gradle/etGenerator.gradle
index e448c7502..423528b99 100644
--- a/gradle/etGenerator.gradle
+++ b/gradle/etGenerator.gradle
@@ -12,6 +12,10 @@ dependencies {
etrice_c project(':plugins:org.eclipse.etrice.generator.c')
etrice_cpp project(':plugins:org.eclipse.etrice.generator.cpp')
etrice_java project(':plugins:org.eclipse.etrice.generator.java')
+
+ etrice_c project(':plugins:org.eclipse.etrice.generator.contractmonitor')
+ etrice_cpp project(':plugins:org.eclipse.etrice.generator.contractmonitor')
+ etrice_java project(':plugins:org.eclipse.etrice.generator.contractmonitor')
}
/**
@@ -24,12 +28,15 @@ dependencies {
*/
ext.createGeneratorTask = { name, lang, models, genDir = 'src-gen', options = [] ->
return tasks.create(name: name, type: JavaExec) {
+ // accessible for later use
+ ext.lang = lang
+ ext.modelpath = configurations."modelpath_$lang"
+
main = "org.eclipse.etrice.generator.${lang}.Main"
classpath = configurations."etrice_$lang"
args '-clean', '-msc_instr'
args '-genDir', genDir
- args options
- def modelpath = configurations."modelpath_$lang"
+ args options
if(!modelpath.isEmpty()) {
args '-modelpath', modelpath.asPath
}
diff --git a/plugins/org.eclipse.etrice.core.common/src/org/eclipse/etrice/core/common/base/util/BaseHelpers.java b/plugins/org.eclipse.etrice.core.common/src/org/eclipse/etrice/core/common/base/util/BaseHelpers.java
index ea6f0e904..4a54cb09c 100644
--- a/plugins/org.eclipse.etrice.core.common/src/org/eclipse/etrice/core/common/base/util/BaseHelpers.java
+++ b/plugins/org.eclipse.etrice.core.common/src/org/eclipse/etrice/core/common/base/util/BaseHelpers.java
@@ -41,7 +41,7 @@ public class BaseHelpers {
*/
public boolean isAnnotationPresent(List<Annotation> annotations, String name) {
for (Annotation annotation : annotations) {
- if (annotation.getType().getName().equals(name))
+ if (annotation.getType() != null && name.equals(annotation.getType().getName()))
return true;
}
return false;
@@ -95,7 +95,7 @@ public class BaseHelpers {
public String getAttribute(List<Annotation> annotations, String name, String key) {
List<KeyValue> attributes = getAttributes(annotations, name);
for (KeyValue attrib : attributes) {
- if (attrib.getKey().equals(key))
+ if (key.equals(attrib.getKey()))
return literalToString(attrib.getValue());
}
return "";
diff --git a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/ConfigRuntimeModule.java b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/ConfigRuntimeModule.java
index b2e9e3a80..4c8648b1b 100644
--- a/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/ConfigRuntimeModule.java
+++ b/plugins/org.eclipse.etrice.core.config/src/org/eclipse/etrice/core/ConfigRuntimeModule.java
@@ -16,9 +16,9 @@ package org.eclipse.etrice.core;
import org.eclipse.etrice.core.common.scoping.CompoundGlobalScopeProvider;
import org.eclipse.etrice.core.common.scoping.ModelLocatorUriResolver;
-import org.eclipse.etrice.core.common.scoping.ModelPathFileExtensionFilter;
import org.eclipse.etrice.core.common.scoping.ModelPathGlobalScopeProvider.IModelPathFileFilter;
import org.eclipse.etrice.core.converter.ConfigValueConverterService;
+import org.eclipse.etrice.core.scoping.RoomModelPathFileExtensionFilter;
import org.eclipse.xtext.conversion.IValueConverterService;
import org.eclipse.xtext.scoping.IGlobalScopeProvider;
import org.eclipse.xtext.scoping.impl.ImportUriResolver;
@@ -36,7 +36,7 @@ public class ConfigRuntimeModule extends
}
public IModelPathFileFilter bindIModelPathFileFilter() {
- return new ModelPathFileExtensionFilter("room");
+ return new RoomModelPathFileExtensionFilter();
}
// HOWTO: use URI imports - need special URI resolver
diff --git a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/RoomRuntimeModule.java b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/RoomRuntimeModule.java
index 5cd4d0400..6325e7666 100644
--- a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/RoomRuntimeModule.java
+++ b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/RoomRuntimeModule.java
@@ -16,7 +16,6 @@ package org.eclipse.etrice.core;
import org.eclipse.etrice.core.common.scoping.CompoundGlobalScopeProvider;
import org.eclipse.etrice.core.common.scoping.ModelLocatorUriResolver;
-import org.eclipse.etrice.core.common.scoping.ModelPathFileExtensionFilter;
import org.eclipse.etrice.core.common.scoping.ModelPathGlobalScopeProvider.IModelPathFileFilter;
import org.eclipse.etrice.core.common.validation.CustomValidatorManager.StandaloneValidatorExtension;
import org.eclipse.etrice.core.converter.RoomValueConverterService;
@@ -25,6 +24,7 @@ import org.eclipse.etrice.core.linking.RoomConvertingLazyLinker;
import org.eclipse.etrice.core.naming.RoomFragmentProvider;
import org.eclipse.etrice.core.naming.RoomQualifiedNameProvider;
import org.eclipse.etrice.core.room.util.CommonDataCalculator;
+import org.eclipse.etrice.core.scoping.RoomModelPathFileExtensionFilter;
import org.eclipse.etrice.core.validation.FQNAreUniqueValidationHelper;
import org.eclipse.etrice.core.validation.ValidatorExtensionManager;
import org.eclipse.xtext.conversion.IValueConverterService;
@@ -88,7 +88,7 @@ public class RoomRuntimeModule extends org.eclipse.etrice.core.AbstractRoomRunti
}
public IModelPathFileFilter bindIModelPathFileFilter() {
- return new ModelPathFileExtensionFilter("room", "cage", "actortest");
+ return new RoomModelPathFileExtensionFilter();
}
// HOWTO: add a value converter
diff --git a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/InterfaceContractHelpers.xtend b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/InterfaceContractHelpers.xtend
new file mode 100644
index 000000000..0ad488b50
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/room/util/InterfaceContractHelpers.xtend
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * 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 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * CONTRIBUTORS:
+ * Juergen Haug (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.core.room.util
+
+import com.google.inject.Inject
+import org.eclipse.etrice.core.room.ActorClass
+import org.eclipse.etrice.core.room.ProtocolClass
+import org.eclipse.etrice.core.room.RoomModel
+import org.eclipse.xtext.naming.IQualifiedNameConverter
+import org.eclipse.xtext.naming.IQualifiedNameProvider
+import org.eclipse.xtext.scoping.IGlobalScopeProvider
+
+import static org.eclipse.etrice.core.room.RoomPackage.Literals.ACTOR_REF__TYPE
+import org.eclipse.etrice.core.room.GeneralProtocolClass
+
+/**
+ * See room annotation 'InterfaceContract'
+ */
+class InterfaceContractHelpers {
+
+ public static val InterfaceContract_ANNOTATION = "InterfaceContract"
+ public static val MonitorClass_KEY = "definingActorClassName"
+
+ @Inject RoomHelpers roomHelpers
+ @Inject IGlobalScopeProvider scopeProvicer
+ @Inject IQualifiedNameConverter fqnConverter
+ @Inject IQualifiedNameProvider fqnProvider
+
+ def boolean hasContract(GeneralProtocolClass pc) {
+ roomHelpers.isAnnotationPresent(pc.annotations, InterfaceContract_ANNOTATION)
+ }
+
+ def ActorClass getInterfaceContractActorClass(ProtocolClass pc) {
+ if (pc.hasContract) {
+ val actorClassNameString = roomHelpers.getAttribute(pc.annotations, InterfaceContract_ANNOTATION, MonitorClass_KEY)
+ if(actorClassNameString !== null) {
+ return findActorClassForName(actorClassNameString, pc.eContainer as RoomModel)
+ }
+ }
+ }
+
+ def private ActorClass findActorClassForName(String name, RoomModel currentModel) {
+ val fqn = fqnConverter.toQualifiedName(name)
+ val modelFQN = fqnProvider.getFullyQualifiedName(currentModel)
+
+ if(fqn.segmentCount == 1 || fqn.startsWith(modelFQN)) {
+ // search locally
+ currentModel.actorClasses.findFirst[it.name == fqn.lastSegment]
+ }
+ else if (currentModel.eResource !== null) {
+ // search globally
+ scopeProvicer.getScope(currentModel.eResource, ACTOR_REF__TYPE, [true]).getSingleElement(fqn)?.EObjectOrProxy as ActorClass
+ }
+ }
+}
diff --git a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/scoping/RoomModelPathFileExtensionFilter.java b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/scoping/RoomModelPathFileExtensionFilter.java
new file mode 100644
index 000000000..88c8e4833
--- /dev/null
+++ b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/scoping/RoomModelPathFileExtensionFilter.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * 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 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * CONTRIBUTORS:
+ * Juergen Haug (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.core.scoping;
+
+import org.eclipse.etrice.core.common.scoping.ModelPathFileExtensionFilter;
+
+public class RoomModelPathFileExtensionFilter extends ModelPathFileExtensionFilter {
+
+ public RoomModelPathFileExtensionFilter() {
+ super("room", "cage", "actortest");
+ }
+}
diff --git a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/validation/RoomJavaValidator.java b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/validation/RoomJavaValidator.java
index 5c1908651..3542a62b1 100644
--- a/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/validation/RoomJavaValidator.java
+++ b/plugins/org.eclipse.etrice.core.room/src/org/eclipse/etrice/core/validation/RoomJavaValidator.java
@@ -34,6 +34,7 @@ import org.eclipse.etrice.core.common.base.Annotation;
import org.eclipse.etrice.core.common.base.BasePackage;
import org.eclipse.etrice.core.common.base.BooleanLiteral;
import org.eclipse.etrice.core.common.base.Import;
+import org.eclipse.etrice.core.common.base.KeyValue;
import org.eclipse.etrice.core.common.base.LiteralType;
import org.eclipse.etrice.core.common.base.util.ImportHelpers;
import org.eclipse.etrice.core.common.validation.ValidationHelpers;
@@ -77,6 +78,7 @@ import org.eclipse.etrice.core.room.ServiceImplementation;
import org.eclipse.etrice.core.room.StandardOperation;
import org.eclipse.etrice.core.room.StructureClass;
import org.eclipse.etrice.core.room.SubSystemClass;
+import org.eclipse.etrice.core.room.util.InterfaceContractHelpers;
import org.eclipse.etrice.core.room.util.RoomHelpers;
import org.eclipse.etrice.generator.base.io.IModelPath;
import org.eclipse.etrice.generator.base.io.IModelPathProvider;
@@ -110,6 +112,8 @@ public class RoomJavaValidator extends AbstractRoomJavaValidator {
@Inject ImportUriResolver importUriResolver;
@Inject private IModelPathProvider modelPathProvider;
+
+ @Inject InterfaceContractHelpers contractMonitorHelpers;
/* message strings */
public static final String OPTIONAL_REFS_HAVE_TO_HAVE_MULTIPLICITY_ANY = "optional refs have to have multiplicity any [*]";
@@ -903,4 +907,17 @@ public class RoomJavaValidator extends AbstractRoomJavaValidator {
}
});
}
+
+ @Check
+ public void checkProtocolContract(ProtocolClass pc) {
+ if(contractMonitorHelpers.hasContract(pc)) {
+ ActorClass monitor = contractMonitorHelpers.getInterfaceContractActorClass(pc);
+ if(monitor == null || monitor.eIsProxy()) {
+ Optional<KeyValue> monitorAttr = pc.getAnnotations().stream().map((anno) -> anno.getAttributes()).flatMap(Collection::stream).filter((anno) -> InterfaceContractHelpers.MonitorClass_KEY.equals(anno.getKey())).findFirst();
+ if(monitorAttr.isPresent()) {
+ error("Couldn't resolve ActorClass - try with fully qualified name", monitorAttr.get(), null);
+ }
+ }
+ }
+ }
}
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/.classpath b/plugins/org.eclipse.etrice.generator.contractmonitor/.classpath
new file mode 100644
index 000000000..87addf11f
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="xtend-gen"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/.gitignore b/plugins/org.eclipse.etrice.generator.contractmonitor/.gitignore
new file mode 100644
index 000000000..ae5eb3b66
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/.gitignore
@@ -0,0 +1,3 @@
+target
+bin
+xtend-gen
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/.project b/plugins/org.eclipse.etrice.generator.contractmonitor/.project
new file mode 100644
index 000000000..e3e3594a6
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.etrice.generator.contractmonitor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.etrice.generator.contractmonitor/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..99f26c020
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.etrice.generator.contractmonitor/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..3a2153707
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.generator.contractmonitor/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..7d3a96534
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/META-INF/MANIFEST.MF
@@ -0,0 +1,17 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: eTrice Contract Monitor Generator
+Bundle-SymbolicName: org.eclipse.etrice.generator.contractmonitor;singleton:=true
+Bundle-Version: 2.0.0.qualifier
+Export-Package: org.eclipse.etrice.generator.contractmonitor,
+ org.eclipse.etrice.generator.contractmonitor.setup
+Bundle-Vendor: Eclipse eTrice
+Require-Bundle: org.eclipse.etrice.core.genmodel,
+ org.eclipse.etrice.generator.base,
+ org.eclipse.etrice.generator.fsm,
+ org.eclipse.etrice.generator,
+ com.google.guava,
+ org.eclipse.xtext.xbase.lib,
+ org.eclipse.xtend.lib,
+ org.eclipse.xtend.lib.macro,
+ org.eclipse.xtext
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/build.gradle b/plugins/org.eclipse.etrice.generator.contractmonitor/build.gradle
new file mode 100644
index 000000000..0624dd1f6
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/build.gradle
@@ -0,0 +1,25 @@
+apply plugin: 'application'
+
+configurations {
+ archive
+}
+
+dependencies {
+ compile project(':plugins:org.eclipse.etrice.core.room')
+ compile project(':plugins:org.eclipse.etrice.core.fsm')
+ compile project(':plugins:org.eclipse.etrice.core.genmodel')
+ compile project(':plugins:org.eclipse.etrice.generator')
+ compile project(':plugins:org.eclipse.etrice.generator.fsm')
+
+ compile "org.eclipse.xtend:org.eclipse.xtend.lib:$versions.xtext"
+ compile "org.eclipse.xtext:org.eclipse.xtext:$versions.xtext"
+}
+
+artifacts {
+ archive distZip
+}
+
+compileJava.options.encoding = 'UTF-8'
+mainClassName = 'org.eclipse.etrice.generator.contractmonitor.Main'
+
+distTar.enabled = false \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/build.properties b/plugins/org.eclipse.etrice.generator.contractmonitor/build.properties
new file mode 100644
index 000000000..d8e2f0e92
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/build.properties
@@ -0,0 +1,5 @@
+source.. = src/,\
+ xtend-gen/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/Main.java b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/Main.java
new file mode 100644
index 000000000..32f64e31e
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/Main.java
@@ -0,0 +1,50 @@
+/*******************************************************************************
+
+ * Copyright (c) 2011 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * CONTRIBUTORS:
+ * Christian Hilden (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.generator.contractmonitor;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.etrice.generator.base.AbstractGenerator;
+import org.eclipse.etrice.generator.base.args.Arguments;
+import org.eclipse.etrice.generator.base.io.IGeneratorFileIO;
+import org.eclipse.etrice.generator.base.logging.ILogger;
+import org.eclipse.etrice.generator.contractmonitor.gen.MainGen;
+import org.eclipse.etrice.generator.contractmonitor.setup.GeneratorModule;
+
+import com.google.inject.Inject;
+
+public class Main extends AbstractGenerator {
+
+ public static int run(String[] args) {
+ return createAndRunGenerator(new GeneratorModule(), args);
+ }
+
+ public static void main(String[] args) {
+ int ret = run(args);
+ System.exit(ret);
+ }
+
+ @Inject MainGen mainGen;
+
+ @Override
+ protected int runGenerator(List<Resource> resources, Arguments arguments, IGeneratorFileIO fileIO, ILogger logger) {
+
+ resources.forEach(res -> {
+ mainGen.doGenerate(res, arguments, fileIO, logger);
+ });
+
+ return GENERATOR_OK;
+ }
+}
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/gen/DetailCodeGen.xtend b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/gen/DetailCodeGen.xtend
new file mode 100644
index 000000000..b0e5be5d1
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/gen/DetailCodeGen.xtend
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * 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 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * CONTRIBUTORS:
+ * Juergen Haug (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.generator.contractmonitor.gen
+
+class DetailCodeGen {
+
+ // TODO proper mechanism for generator options
+ var String language
+
+ def void setTargetLanguage(String language) {
+ this.language = language.toLowerCase
+ }
+
+ def String mscComment(String comment, boolean addLocation) {
+ switch language.toLowerCase {
+ case "c": mscCommentC(comment, addLocation)
+ case "java": mscCommentJava(comment, addLocation)
+ default: throw new IllegalArgumentException('Unsupported target language: ' + language)
+ }
+ }
+
+ protected def String mscCommentJava(String comment, boolean addLocation) {
+ val getLocationCode = {
+ if (addLocation)
+ '''" location: " + this.getInstancePath() + " : " + ifitem.toString()'''
+ else ''
+ }
+ '''
+ DebuggingService.getInstance().addVisibleComment("«comment»" + «getLocationCode»);
+ '''
+ }
+
+ protected def String mscCommentC(String comment, boolean addLocation) '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("«comment»");
+ '''
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/gen/MainGen.xtend b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/gen/MainGen.xtend
new file mode 100644
index 000000000..24d959167
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/gen/MainGen.xtend
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * 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 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * CONTRIBUTORS:
+ * Juergen Haug (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.generator.contractmonitor.gen
+
+import com.google.inject.Inject
+import java.io.ByteArrayOutputStream
+import java.io.IOException
+import org.eclipse.emf.common.util.URI
+import org.eclipse.emf.ecore.resource.Resource
+import org.eclipse.emf.ecore.resource.ResourceSet
+import org.eclipse.etrice.core.room.RoomModel
+import org.eclipse.etrice.generator.base.io.IGeneratorFileIO
+import org.eclipse.etrice.generator.base.logging.ILogger
+import org.eclipse.etrice.generator.base.args.Arguments
+
+import static org.eclipse.etrice.generator.contractmonitor.setup.MonitorGeneratorOptions.TARGET_LANG
+
+class MainGen {
+
+ @Inject MonitorActorGen monitorGen
+
+ def void doGenerate(Resource resource, Arguments arguments, IGeneratorFileIO fileIO, ILogger logger) {
+ // TODO proper mechanism for generator options
+ monitorGen.detailCodeGen.targetLanguage = arguments.get(TARGET_LANG)
+
+ val model = resource.contents.head
+ if(model instanceof RoomModel) {
+ val contractModel = monitorGen.generateMonitors(model)
+ if(!contractModel.actorClasses.empty) {
+ val path = contractModel.name.replace('.', '/') + '.room'
+ val contents = contractModel.serializeModel(resource.resourceSet, logger)
+ fileIO.generateFile("Saving generated contracts", path, contents)
+ }
+ }
+ }
+
+ protected def serializeModel(RoomModel model, ResourceSet rs, ILogger logger) {
+ val oos = new ByteArrayOutputStream();
+
+ val res = rs.createResource(URI.createURI("tmp:/monitor.room"));
+ res.contents.add(model);
+ try {
+ res.save(oos, null);
+ } catch (IOException e) {
+ logger.logError(e.getMessage());
+ e.printStackTrace
+ } finally {
+ rs.resources.remove(res)
+ }
+
+ '''
+ /** generated */
+
+ «oos»
+ '''
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/gen/MonitorActorGen.xtend b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/gen/MonitorActorGen.xtend
new file mode 100644
index 000000000..29e55f743
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/gen/MonitorActorGen.xtend
@@ -0,0 +1,254 @@
+/*******************************************************************************
+ * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * CONTRIBUTORS:
+ * Christian Hilden (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.generator.contractmonitor.gen
+
+import com.google.inject.Inject
+import java.util.ArrayList
+import java.util.HashMap
+import java.util.LinkedList
+import java.util.List
+import java.util.Map
+import org.eclipse.emf.ecore.util.EcoreUtil
+import org.eclipse.etrice.core.common.base.BaseFactory
+import org.eclipse.etrice.core.fsm.fSM.FSMFactory
+import org.eclipse.etrice.core.fsm.fSM.MessageFromIf
+import org.eclipse.etrice.core.fsm.fSM.State
+import org.eclipse.etrice.core.fsm.fSM.TriggeredTransition
+import org.eclipse.etrice.core.genmodel.fsm.ExtendedFsmGenBuilderFactory
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.CommonTrigger
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.GraphContainer
+import org.eclipse.etrice.core.genmodel.fsm.fsmgen.Node
+import org.eclipse.etrice.core.room.ActorClass
+import org.eclipse.etrice.core.room.Message
+import org.eclipse.etrice.core.room.Port
+import org.eclipse.etrice.core.room.ProtocolClass
+import org.eclipse.etrice.core.room.RoomFactory
+import org.eclipse.etrice.core.room.RoomModel
+import org.eclipse.etrice.generator.contractmonitor.setup.GeneratorSettings
+import org.eclipse.etrice.generator.contractmonitor.util.ContractMonitorGeneratorHelpers
+import org.eclipse.xtext.util.Strings
+import org.eclipse.etrice.core.room.util.InterfaceContractHelpers
+
+class MonitorActorGen {
+
+ @Inject BaseFactory baseFactory
+ @Inject RoomFactory roomFactory
+ @Inject FSMFactory fsmFactory
+ @Inject ExtendedFsmGenBuilderFactory fsmGenBuilderFactory
+
+ @Inject InterfaceContractHelpers helpers
+ @Inject ContractMonitorGeneratorHelpers genHelpers
+ @Inject GeneratorSettings generatorSettings
+
+ // requires target language options
+ public val detailCodeGen = new DetailCodeGen
+
+ def RoomModel generateMonitors(RoomModel model) {
+ val pc2Contract = model.protocolClasses.filter(ProtocolClass).toMap([it], [helpers.getInterfaceContractActorClass(it)])
+ roomFactory.createRoomModel => [
+ name = model.name + '_monitors'
+ imports += model.imports.map[EcoreUtil.copy(it)]
+ imports += baseFactory.createImport => [
+ importedNamespace = model.name + '.*'
+ ]
+ actorClasses += pc2Contract.values.filterNull.map[generateMonitor]
+ ]
+ }
+
+ protected def ActorClass generateMonitor(ActorClass contract) {
+ val monitor = EcoreUtil.copy(contract) => [
+ name = name + '_GeneratedMonitor'
+ ]
+ monitor.generateMessageForwardingCodeToMonitorActorClass
+
+ val fsmGenBuilder = fsmGenBuilderFactory.create
+ val graphContainer = fsmGenBuilder.createTransformedModel(monitor) => [ gc |
+ fsmGenBuilder.withCommonData(gc)
+ fsmGenBuilder.withTriggersInStates(gc)
+ ]
+ generateCatchAllTranstionsToActorClass(graphContainer, monitor)
+
+ return monitor
+ }
+
+ protected def generateMessageForwardingCodeToMonitorActorClass(ActorClass monitorActorClass)
+ {
+ for (transition : monitorActorClass.stateMachine.transitions.filter[it instanceof TriggeredTransition])
+ {
+ generateMessageForwardingCodeToTransition(transition as TriggeredTransition)
+ }
+ }
+
+ protected def generateMessageForwardingCodeToTransition(TriggeredTransition transition)
+ {
+ var sendMessageDetailCodeLines = new LinkedList<String>
+ for (trigger : transition.triggers)
+ {
+ for (msgFromInterface : trigger.msgFromIfPairs)
+ {
+ var sendMessageStatement = buildMessageForwardStatement(msgFromInterface)
+ if (sendMessageStatement !== null)
+ {
+ sendMessageDetailCodeLines.add(sendMessageStatement)
+ }
+ }
+ }
+
+ if(generatorSettings.forwardInvalidMessages) {
+ addActionCodeToTriggeredTransition(transition, sendMessageDetailCodeLines.join(Strings.newLine))
+ }
+ }
+
+
+
+ protected def buildMessageForwardStatement(MessageFromIf msgFromInterface)
+ {
+
+ if (msgFromInterface.from instanceof Port && msgFromInterface.message instanceof Message)
+ {
+ var forwardPortName = generatorSettings.toConjugatedPortName
+ if (msgFromInterface.from.name == generatorSettings.toConjugatedPortName)
+ {
+ forwardPortName = generatorSettings.toUnconjugatedPortName
+ }
+ var originalMessage = msgFromInterface.message as Message
+ var messageName = originalMessage.name
+ var parameterName = ""
+ if (originalMessage.data !== null)
+ {
+ parameterName = "transitionData"
+ }
+
+ return forwardPortName + "." + messageName + "(" + parameterName + ");"
+ }
+ return null
+ }
+
+ protected def generateCatchAllTranstionsToActorClass(GraphContainer gc, ActorClass ac)
+ {
+ for (state : gc.graph.nodes)
+ {
+ state.generateCatchAllTransitionToState(gc, ac)
+ }
+ }
+
+ protected def generateCatchAllTransitionToState(Node state, GraphContainer gc, ActorClass ac)
+ {
+ var messageToTriggerMap = state.outgoingTriggersByMessage
+ var inPort = genHelpers.getMonitorInPort(ac)
+ var outPort = genHelpers.getMonitorOutPort(ac)
+
+ for (message : (inPort.protocol as ProtocolClass).incomingMessages)
+ {
+ message.generateCatchTransitionForMessageToState(outPort, state, messageToTriggerMap)
+ }
+
+ for (message : (inPort.protocol as ProtocolClass).outgoingMessages)
+ {
+ message.generateCatchTransitionForMessageToState(inPort, state, messageToTriggerMap)
+ }
+ }
+
+ protected def generateCatchTransitionForMessageToState(Message message, Port port, Node state, Map<Message, List<CommonTrigger>> messageToTriggerMap)
+ {
+ var triggers = messageToTriggerMap.getOrDefault(message, new ArrayList(0))
+ var noOfUnguardedTriggers = triggers.filter[!it.hasGuard].size
+ if (noOfUnguardedTriggers == 0)
+ {
+ var inOutStr = "from_" + generatorSettings.toConjugatedPortName
+ if (port.conjugated)
+ {
+ inOutStr = "from_" + generatorSettings.toUnconjugatedPortName
+ }
+ var transitionName = state.stateGraphNode.name + "_catch_" + inOutStr + "_" + message.name
+ var catchTransition = createTriggeredTransition(message, port, state, state, transitionName)
+
+ // TODO status and control protocol
+// addActionCodeToTriggeredTransition(catchTransition, "_violations++;")
+ addMSCCommentToTriggeredTransition(catchTransition, buildProtocolErrorString(port, message, state), true)
+
+ generateMessageForwardingCodeToTransition(catchTransition)
+
+ state.graph.stateGraph.transitions.add(catchTransition)
+ }
+ }
+
+ protected def buildProtocolErrorString(Port fromPort, Message message, Node fromState)
+ {
+ var protocolName = fromPort.protocol.name
+ return "[Protocol ERROR] In protocol " + protocolName + " message " + message.name + " from port " + fromPort.name
+ + " is not allowed in state " + fromState.stateGraphNode.name }
+
+ protected def createTriggeredTransition(Message message, Port port, Node from, Node to, String transitionName)
+ {
+ var fromTerminal = fsmFactory.createStateTerminal
+ fromTerminal.state = from.stateGraphNode as State
+
+ var toTerminal = fsmFactory.createStateTerminal
+ toTerminal.state = to.stateGraphNode as State
+
+ var messageFromIf = fsmFactory.createMessageFromIf
+ messageFromIf.from = port
+ messageFromIf.message = message
+ var trigger = fsmFactory.createTrigger
+ trigger.msgFromIfPairs.add(messageFromIf)
+ var triggeredTransition = fsmFactory.createTriggeredTransition
+ triggeredTransition.triggers.add(trigger)
+ triggeredTransition.from = fromTerminal
+ triggeredTransition.to = toTerminal
+ triggeredTransition.name = transitionName
+
+ return triggeredTransition
+ }
+
+ protected def addMSCCommentToTriggeredTransition(TriggeredTransition transition, String mscComment, boolean addLocation)
+ {
+ var mscActionCode = detailCodeGen.mscComment(mscComment, addLocation)
+ addActionCodeToTriggeredTransition(transition, mscActionCode)
+ }
+
+ protected def addActionCodeToTriggeredTransition(TriggeredTransition transition, String actionCode)
+ {
+ if (transition.action === null)
+ {
+ transition.action = fsmFactory.createDetailCode
+ }
+ if (transition.action.lines.size > 0)
+ {
+ transition.action.lines.set(0, '''
+ «transition.action.lines.get(0)»
+ «actionCode»
+ ''')
+ } else
+ {
+ transition.action.lines.add(actionCode)
+ }
+ }
+
+ protected def getOutgoingTriggersByMessage(Node state)
+ {
+ var map = new HashMap<Message, List<CommonTrigger>>
+ for (trigger : state.caughtTriggers)
+ {
+ if (!map.containsKey(trigger.msg))
+ {
+ map.put(trigger.msg as Message, new LinkedList)
+ }
+ map.get(trigger.msg as Message).add(trigger)
+ }
+ return map
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/setup/GeneratorModule.java b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/setup/GeneratorModule.java
new file mode 100644
index 000000000..0491dcf13
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/setup/GeneratorModule.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * CONTRIBUTORS:
+ * Christian Hilden (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.generator.contractmonitor.setup;
+
+import org.eclipse.emf.ecore.EValidator;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.etrice.core.common.base.BaseFactory;
+import org.eclipse.etrice.core.common.scoping.ModelPathGlobalScopeProvider;
+import org.eclipse.etrice.core.common.scoping.ModelPathGlobalScopeProvider.IModelPathFileFilter;
+import org.eclipse.etrice.core.fsm.fSM.FSMFactory;
+import org.eclipse.etrice.core.genmodel.fsm.ICommonDataCalculator;
+import org.eclipse.etrice.core.genmodel.fsm.IDiagnostician;
+import org.eclipse.etrice.core.naming.RoomQualifiedNameProvider;
+import org.eclipse.etrice.core.room.RoomFactory;
+import org.eclipse.etrice.core.room.util.CommonDataCalculator;
+import org.eclipse.etrice.core.scoping.RoomModelPathFileExtensionFilter;
+import org.eclipse.etrice.generator.base.DefaultTranslationProvider;
+import org.eclipse.etrice.generator.base.EMFSetup;
+import org.eclipse.etrice.generator.base.GenerationEMFDiagnostician;
+import org.eclipse.etrice.generator.base.IGenerator;
+import org.eclipse.etrice.generator.base.ITranslationProvider;
+import org.eclipse.etrice.generator.base.ModelLoader;
+import org.eclipse.etrice.generator.base.io.IGeneratorEMFSetup;
+import org.eclipse.etrice.generator.base.io.IGeneratorResourceLoader;
+import org.eclipse.etrice.generator.base.setup.GeneratorName;
+import org.eclipse.etrice.generator.base.setup.GeneratorOptions;
+import org.eclipse.etrice.generator.base.validation.IGeneratorResourceValidator;
+import org.eclipse.etrice.generator.contractmonitor.Main;
+import org.eclipse.etrice.generator.contractmonitor.util.ContractModelValidator;
+import org.eclipse.etrice.generator.fsm.base.Diagnostician;
+import org.eclipse.xtext.naming.IQualifiedNameProvider;
+import org.eclipse.xtext.resource.XtextResourceSet;
+import org.eclipse.xtext.scoping.IGlobalScopeProvider;
+
+import com.google.inject.Binder;
+import com.google.inject.Module;
+import com.google.inject.Singleton;
+
+public class GeneratorModule implements Module {
+
+ public static final String GENERATOR_NAME = "Contract Monitor Generator";
+
+ @Override
+ public void configure(Binder binder) {
+
+ // TODO this should be a common module in etrice
+ binder.bind(IGeneratorEMFSetup.class).to(EMFSetup.class);
+ binder.bind(IGeneratorResourceLoader.class).to(ModelLoader.class);
+// binder.bind(IGeneratorResourceValidator.class).to(ModelValidator.class);
+ binder.bind(IGenerator.class).to(Main.class);
+ binder.bind(ResourceSet.class).to(XtextResourceSet.class);
+ binder.bind(IDiagnostician.class).to(Diagnostician.class);
+ binder.bind(Diagnostician.class).in(Singleton.class);
+ binder.bind(ITranslationProvider.class).to(DefaultTranslationProvider.class);
+ binder.bind(ICommonDataCalculator.class).to(CommonDataCalculator.class);
+ binder.bind(EValidator.Registry.class).toInstance(EValidator.Registry.INSTANCE);
+ binder.bind(org.eclipse.emf.ecore.util.Diagnostician.class).to(GenerationEMFDiagnostician.class).asEagerSingleton();
+
+ // contract monitor generator specific
+ binder.bind(IGeneratorResourceValidator.class).to(ContractModelValidator.class);
+ binder.bind(String.class).annotatedWith(GeneratorName.class).toInstance(GENERATOR_NAME);
+ binder.bind(GeneratorOptions.class).to(MonitorGeneratorOptions.class);
+ binder.bind(BaseFactory.class).toInstance(BaseFactory.eINSTANCE);
+ binder.bind(RoomFactory.class).toInstance(RoomFactory.eINSTANCE);
+ binder.bind(FSMFactory.class).toInstance(FSMFactory.eINSTANCE);
+ binder.bind(FSMFactory.class).toInstance(FSMFactory.eINSTANCE);
+
+ binder.bind(IQualifiedNameProvider.class).to(RoomQualifiedNameProvider.class);
+ binder.bind(IGlobalScopeProvider.class).to(ModelPathGlobalScopeProvider.class);
+ binder.bind(IModelPathFileFilter.class).to(RoomModelPathFileExtensionFilter.class);
+ }
+
+
+}
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/setup/GeneratorSettings.xtend b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/setup/GeneratorSettings.xtend
new file mode 100644
index 000000000..27c3272e0
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/setup/GeneratorSettings.xtend
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * CONTRIBUTORS:
+ * Christian Hilden (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.generator.contractmonitor.setup
+
+import org.eclipse.xtend.lib.annotations.Accessors
+
+@Accessors
+class GeneratorSettings {
+
+ // TODO set at runtime
+ boolean forwardInvalidMessages = true
+
+ String toConjugatedPortName = "toConjugated"
+ String toUnconjugatedPortName = "toUnconjugated"
+
+}
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/setup/MonitorGeneratorOptions.java b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/setup/MonitorGeneratorOptions.java
new file mode 100644
index 000000000..d4d0ae4b3
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/setup/MonitorGeneratorOptions.java
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * CONTRIBUTORS:
+ * Christian Hilden (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.generator.contractmonitor.setup;
+
+import java.util.List;
+
+import org.eclipse.etrice.generator.base.AbstractGeneratorOptions;
+import org.eclipse.etrice.generator.base.args.Option;
+import org.eclipse.etrice.generator.base.args.StringOption;
+
+public class MonitorGeneratorOptions extends AbstractGeneratorOptions {
+
+ public static final String GROUP_CONTRACT_MONITOR = "eTrice Contract Monitior";
+
+ public static final StringOption TARGET_LANG = new StringOption(
+ GROUP_CONTRACT_MONITOR,
+ "targetLang",
+ "targetLang",
+ "specifies the target language to be used for contract monitors [java, c, cpp]",
+ "c");
+
+ @Override
+ public void configure(List<Option<?>> options) {
+ super.configure(options);
+
+ options.add(TARGET_LANG);
+ }
+}
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/util/ContractModelValidator.xtend b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/util/ContractModelValidator.xtend
new file mode 100644
index 000000000..4d381c083
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/util/ContractModelValidator.xtend
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * 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 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * CONTRIBUTORS:
+ * Juergen Haug (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.generator.contractmonitor.util
+
+import com.google.inject.Inject
+import java.util.List
+import org.eclipse.emf.ecore.resource.Resource
+import org.eclipse.etrice.core.room.ProtocolClass
+import org.eclipse.etrice.core.room.RoomModel
+import org.eclipse.etrice.generator.base.ModelValidator
+import org.eclipse.etrice.generator.base.args.Arguments
+import org.eclipse.etrice.generator.base.logging.ILogger
+import org.eclipse.xtext.validation.IResourceValidator
+import org.eclipse.emf.ecore.util.EcoreUtil
+import org.eclipse.etrice.core.room.util.InterfaceContractHelpers
+
+class ContractModelValidator extends ModelValidator {
+
+ @Inject InterfaceContractHelpers helpers
+
+ @Inject
+ new(IResourceValidator validator) {
+ super(validator)
+ }
+
+ override validate(List<Resource> resources, Arguments arguments, ILogger logger) {
+ super.validate(resources.relevantResources, arguments, logger)
+ }
+
+ def private List<Resource> getRelevantResources(Iterable<Resource> resources) {
+ val contractProtocols = resources.map[contents].flatten.filter(RoomModel).map[model |
+ model.protocolClasses.filter(ProtocolClass).filter[!annotations.empty].filter[ pc |
+ // validate protocols with (unresolved) contract
+ helpers.hasContract(pc) || !EcoreUtil.UnresolvedProxyCrossReferencer.find(pc.annotations).empty
+ ]
+ ].flatten.toList
+ val contractMonitors = contractProtocols.map[protocol | helpers.getInterfaceContractActorClass(protocol)].filterNull.toList
+
+ return (contractProtocols + contractMonitors).map[eResource].toSet.toList
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/util/ContractMonitorGeneratorHelpers.xtend b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/util/ContractMonitorGeneratorHelpers.xtend
new file mode 100644
index 000000000..325ba21bb
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.contractmonitor/src/org/eclipse/etrice/generator/contractmonitor/util/ContractMonitorGeneratorHelpers.xtend
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * CONTRIBUTORS:
+ * Christian Hilden (initial contribution)
+ *
+ *******************************************************************************/
+
+package org.eclipse.etrice.generator.contractmonitor.util
+
+import com.google.inject.Inject
+import org.eclipse.etrice.core.genmodel.etricegen.ExpandedActorClass
+import org.eclipse.etrice.core.room.ActorClass
+import org.eclipse.etrice.core.room.ActorRef
+import org.eclipse.etrice.core.room.Port
+import org.eclipse.etrice.generator.base.logging.ILineOutputLogger
+import org.eclipse.etrice.generator.contractmonitor.setup.GeneratorSettings
+
+class ContractMonitorGeneratorHelpers {
+
+ @Inject ILineOutputLogger logger;
+ @Inject GeneratorSettings generatorSettings;
+
+ def Port getPortByName(ExpandedActorClass expandedActorClass, String name)
+ {
+ return getPortByName(expandedActorClass.actorClass, name)
+ }
+
+ def Port getPortByName(ActorRef actorRef, String name)
+ {
+ return getPortByName(actorRef.type, name)
+ }
+
+ def Port getPortByName(ActorClass actorClass, String name)
+ {
+ var matchingPorts = actorClass.interfacePorts.filter[it.name == name]
+ if (matchingPorts.size > 0)
+ {
+ return matchingPorts.get(0)
+ }
+ logger.logError("No " + name + " port found for: " + actorClass.name)
+ return null
+ }
+
+ def getMonitorInPort(ExpandedActorClass monitor)
+ {
+ return getMonitorInPort(monitor.actorClass)
+ }
+
+ def getMonitorInPort(ActorRef monitor)
+ {
+ return getMonitorInPort(monitor.type)
+ }
+
+ def getMonitorInPort(ActorClass monitor)
+ {
+ var inPort = monitor.getPortByName(generatorSettings.toUnconjugatedPortName)
+ if (!inPort.conjugated)
+ {
+ logger.logError("Port" + inPort.name + " in " + monitor.name + " port must be conjugated!")
+ }
+ return inPort
+ }
+
+ def getMonitorOutPort(ActorRef monitor)
+ {
+ return getMonitorOutPort(monitor.type)
+ }
+
+ def getMonitorOutPort(ExpandedActorClass monitor)
+ {
+ return getMonitorOutPort(monitor.actorClass)
+ }
+
+ def getMonitorOutPort(ActorClass monitor)
+ {
+ var outPort = monitor.getPortByName(generatorSettings.toConjugatedPortName)
+ if (outPort.conjugated)
+ {
+ logger.logError("Port" + outPort.name + " in " + monitor.name + " must be UNconjugated!")
+ }
+ return outPort
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.generator.launch.contractmonitor/.classpath b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/.classpath
new file mode 100644
index 000000000..eca7bdba8
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/org.eclipse.etrice.generator.launch.contractmonitor/.gitignore b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/.gitignore
new file mode 100644
index 000000000..d567ba01e
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/.gitignore
@@ -0,0 +1,2 @@
+bin
+target
diff --git a/plugins/org.eclipse.etrice.generator.launch.contractmonitor/.project b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/.project
new file mode 100644
index 000000000..e6ef910fc
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.etrice.generator.launch.contractmonitor</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/org.eclipse.etrice.generator.launch.contractmonitor/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..0c68a61dc
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/plugins/org.eclipse.etrice.generator.launch.contractmonitor/META-INF/MANIFEST.MF b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..26a70fa89
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: eTrice Contract Monitor Generator Launcher
+Bundle-SymbolicName: org.eclipse.etrice.generator.launch.contractmonitor;singleton:=true
+Bundle-Version: 2.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Bundle-Vendor: Eclipse eTrice
+Require-Bundle: org.eclipse.etrice.generator.contractmonitor,
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.debug.core,
+ org.eclipse.debug.ui,
+ org.eclipse.etrice.generator,
+ org.eclipse.etrice.generator.fsm,
+ org.eclipse.etrice.generator.launch,
+ org.eclipse.etrice.generator.ui,
+ org.eclipse.etrice.generator.base
+Import-Package: org.eclipse.jdt.launching,
+ org.eclipse.ui.dialogs
+Export-Package: org.eclipse.etrice.generator.launch.contractmonitor
diff --git a/plugins/org.eclipse.etrice.generator.launch.contractmonitor/build.properties b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/build.properties
new file mode 100644
index 000000000..e9863e281
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/build.properties
@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml
diff --git a/plugins/org.eclipse.etrice.generator.launch.contractmonitor/plugin.xml b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/plugin.xml
new file mode 100644
index 000000000..699692e75
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/plugin.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.debug.core.launchConfigurationTypes">
+ <launchConfigurationType
+ delegate="org.eclipse.etrice.generator.launch.contractmonitor.ContractMonitorGeneratorLaunchConfigurationDelegate"
+ id="org.eclipse.etrice.generator.launch.contractmonitor.launchConfigurationType"
+ modes="run,debug"
+ name="eTrice Contract Monitor Generator">
+ </launchConfigurationType>
+ </extension>
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTabGroups">
+ <launchConfigurationTabGroup
+ class="org.eclipse.etrice.generator.launch.contractmonitor.ContractMonitorGeneratorLaunchConfigurationTabGroup"
+ id="org.eclipse.etrice.generator.launch.contractmonitor.launchConfigurationTabGroup1"
+ type="org.eclipse.etrice.generator.launch.contractmonitor.launchConfigurationType">
+ </launchConfigurationTabGroup>
+ </extension>
+
+</plugin>
diff --git a/plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/Activator.java b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/Activator.java
new file mode 100644
index 000000000..a86803d0f
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/Activator.java
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * CONTRIBUTORS:
+ * Christian Hilden (initial contribution)
+ *
+ *******************************************************************************/package org.eclipse.etrice.generator.launch.contractmonitor;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "de.protos.etrice.contract.monitorgenerator.launch"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ public void log(Exception e) {
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/ContractMonitorGeneratorConfigTab.java b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/ContractMonitorGeneratorConfigTab.java
new file mode 100644
index 000000000..f9c439b65
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/ContractMonitorGeneratorConfigTab.java
@@ -0,0 +1,91 @@
+/*******************************************************************************
+ * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * CONTRIBUTORS:
+ * Christian Hilden (initial contribution)
+ *
+ *******************************************************************************/package org.eclipse.etrice.generator.launch.contractmonitor;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.etrice.generator.launch.GeneratorConfigTab;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+
+
+public class ContractMonitorGeneratorConfigTab extends GeneratorConfigTab {
+
+ public static final String TARGET_LANG = "TargetLanguage";
+
+ private Text targetLang;
+
+ @Override
+ public String getName() {
+ return "Contract Monitor Generator";
+ }
+
+ @Override
+ protected void addFurtherControls(Composite mainComposite) {
+
+ createSeparator(mainComposite, 2);
+
+ Label label = new Label(mainComposite, SWT.NONE);
+ label.setText("Target language:");
+ targetLang = new Text(mainComposite, SWT.SINGLE | SWT.BORDER);
+ targetLang.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ targetLang.addModifyListener(new ModifyListener() {
+ @Override
+ public void modifyText(ModifyEvent e) {
+ validate();
+ setDirty(true);
+ updateLaunchConfigurationDialog();
+ }
+ });
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ @Override
+ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
+ configuration.setAttribute(OVERRIDE_DIRECTORIES, true);
+ configuration.setAttribute(SRCGEN_PATH, "model-gen");
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
+ */
+ @Override
+ public void initializeFrom(ILaunchConfiguration configuration) {
+ super.initializeFrom(configuration);
+ try {
+ targetLang.setText(configuration.getAttribute(TARGET_LANG, "c"));
+ }
+ catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
+ */
+ @Override
+ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
+ super.performApply(configuration);
+
+ configuration.setAttribute(TARGET_LANG, targetLang.getText());
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/ContractMonitorGeneratorLaunchConfigurationDelegate.java b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/ContractMonitorGeneratorLaunchConfigurationDelegate.java
new file mode 100644
index 000000000..e560a6890
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/ContractMonitorGeneratorLaunchConfigurationDelegate.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * CONTRIBUTORS:
+ * Christian Hilden (initial contribution)
+ *
+ *******************************************************************************/package org.eclipse.etrice.generator.launch.contractmonitor;
+
+import org.eclipse.etrice.generator.base.io.ILineOutput;
+import org.eclipse.etrice.generator.contractmonitor.Main;
+import org.eclipse.etrice.generator.launch.GeneratorLaunchConfigurationDelegate;
+
+
+public class ContractMonitorGeneratorLaunchConfigurationDelegate extends GeneratorLaunchConfigurationDelegate {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.etrice.generator.launch.GeneratorLaunchConfigurationDelegate#runGenerator(java.lang.String[], org.eclipse.etrice.generator.launch.ILineOutput)
+ */
+ @Override
+ protected void runGenerator(String[] args, ILineOutput out) {
+ Main.setOutput(out);
+ Main.run(args);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.etrice.generator.launch.GeneratorLaunchConfigurationDelegate#getConsoleName()
+ */
+ @Override
+ protected String getConsoleName() {
+ return "Contract Monitor Generator Console";
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/ContractMonitorGeneratorLaunchConfigurationTabGroup.java b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/ContractMonitorGeneratorLaunchConfigurationTabGroup.java
new file mode 100644
index 000000000..561e87107
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/ContractMonitorGeneratorLaunchConfigurationTabGroup.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * CONTRIBUTORS:
+ * Christian Hilden (initial contribution)
+ *
+ *******************************************************************************/package org.eclipse.etrice.generator.launch.contractmonitor;
+
+import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
+import org.eclipse.debug.ui.CommonTab;
+import org.eclipse.debug.ui.EnvironmentTab;
+import org.eclipse.debug.ui.ILaunchConfigurationDialog;
+import org.eclipse.debug.ui.ILaunchConfigurationTab;
+import org.eclipse.etrice.generator.launch.GeneratorRefreshTab;
+
+public class ContractMonitorGeneratorLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
+
+ @Override
+ public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
+ ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
+ new ContractMonitorGeneratorMainTab(),
+ new ContractMonitorGeneratorConfigTab(),
+ new GeneratorRefreshTab(),
+ new EnvironmentTab(),
+ new CommonTab()
+ };
+ setTabs(tabs);
+ }
+
+}
diff --git a/plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/ContractMonitorGeneratorMainTab.java b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/ContractMonitorGeneratorMainTab.java
new file mode 100644
index 000000000..0b2c9b802
--- /dev/null
+++ b/plugins/org.eclipse.etrice.generator.launch.contractmonitor/src/org/eclipse/etrice/generator/launch/contractmonitor/ContractMonitorGeneratorMainTab.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2013 protos software gmbh (http://www.protos.de).
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * CONTRIBUTORS:
+ * Christian Hilden (initial contribution)
+ *
+ *******************************************************************************/package org.eclipse.etrice.generator.launch.contractmonitor;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.etrice.generator.launch.GeneratorMainTab;
+
+public class ContractMonitorGeneratorMainTab extends GeneratorMainTab {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.etrice.generator.launch.GeneratorMainTab#isValidModelFile(org.eclipse.core.resources.IResource)
+ */
+ @Override
+ protected boolean isValidModelFile(IResource resource) {
+ return resource.getName().endsWith(".room")
+ || resource.getName().endsWith(".config")
+ || resource.getName().endsWith(".etphys")
+ || resource.getName().endsWith(".etmap");
+ }
+
+}
diff --git a/pom.xml b/pom.xml
index 8a2d76f12..6c88d8b47 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,11 +54,13 @@
<module>plugins/org.eclipse.etrice.generator.fsmtest.ui</module>
<module>plugins/org.eclipse.etrice.generator.gnuplot</module>
<module>plugins/org.eclipse.etrice.generator.java</module>
+ <module>plugins/org.eclipse.etrice.generator.contractmonitor</module>
<module>plugins/org.eclipse.etrice.generator.launch</module>
<module>plugins/org.eclipse.etrice.generator.launch.c</module>
<module>plugins/org.eclipse.etrice.generator.launch.cpp</module>
<module>plugins/org.eclipse.etrice.generator.launch.java</module>
<module>plugins/org.eclipse.etrice.generator.launch.doc</module>
+ <module>plugins/org.eclipse.etrice.generator.launch.contractmonitor</module>
<module>plugins/org.eclipse.etrice.generator.ui</module>
<module>plugins/org.eclipse.etrice.generator.ui.cdt</module>
<module>plugins/org.eclipse.etrice.logging</module>
diff --git a/releng/org.eclipse.etrice.parent/pom.xml b/releng/org.eclipse.etrice.parent/pom.xml
index b71def508..642fcc93f 100644
--- a/releng/org.eclipse.etrice.parent/pom.xml
+++ b/releng/org.eclipse.etrice.parent/pom.xml
@@ -21,7 +21,7 @@
<packaging>pom</packaging>
<properties>
- <project.build.sourceEncoding>Cp1252</project.build.sourceEncoding>
+
<xtext.version>2.15.0</xtext.version>
<tycho.version>1.4.0</tycho.version>
<cbi.version>1.1.4</cbi.version>
diff --git a/runtime/org.eclipse.etrice.modellib.c/model/etrice/api/contracts/definitions.room b/runtime/org.eclipse.etrice.modellib.c/model/etrice/api/contracts/definitions.room
new file mode 100644
index 000000000..b9957746f
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/model/etrice/api/contracts/definitions.room
@@ -0,0 +1,19 @@
+RoomModel etrice.api.contracts.definitions {
+
+ AnnotationType InterfaceContract {
+ target = ProtocolClass
+ mandatory attribute definingActorClassName: ptCharacter
+ }
+
+ AnnotationType ValueRangeContract {
+ target = {
+ Transition, Message
+ }
+ mandatory attribute range: ptCharacter
+ }
+
+ AnnotationType TimingContract {
+ target = State
+ mandatory attribute durationInMS: ptInteger
+ }
+} \ No newline at end of file
diff --git a/runtime/org.eclipse.etrice.modellib.c/model/etrice/api/contracts/monitors.room b/runtime/org.eclipse.etrice.modellib.c/model/etrice/api/contracts/monitors.room
new file mode 100644
index 000000000..a37821977
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.c/model/etrice/api/contracts/monitors.room
@@ -0,0 +1,54 @@
+/** work in progress */
+RoomModel etrice.api.contracts.monitors {
+
+ import room.basic.types.*
+
+ ProtocolClass MonitorControl {
+ incoming {
+ Message requestAndResetStatus()
+ Message setForwardInvalidMessages(boolean)
+ }
+ outgoing {
+ Message violationStatus(boolean)
+ Message violationOccured()
+ }
+ }
+
+ // not working due Bug 541775
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=541775
+ abstract ActorClass ContractMonitorBase {
+ Interface {
+ Port monitor_ctrl: MonitorControl
+ }
+ Structure {
+ external Port monitor_ctrl
+ Attribute _violation: boolean
+ Attribute _forwardInvalidMessages: boolean
+ }
+ Behavior {
+ Operation _onViolation(comment: string) '''
+ _violation = value;
+ ET_MSC_LOGGER_VISIBLE_COMMENT(comment);
+ monitor_ctrl.onViolation();
+ '''
+ StateMachine {
+ handler TransitionPoint _trBase
+ Transition _trStatus: my _trBase -> my _trBase {
+ triggers {
+ <requestAndResetStatus: monitor_ctrl>
+ }
+ action '''
+ monitor_ctrl.violationStatus(_violation);
+ _violation = false;
+ '''
+ }
+ Transition _trForward: my _trBase -> my _trBase {
+ triggers {
+ <setForwardInvalidMessages: monitor_ctrl>
+ }
+ action '''_forwardInvalidMessages = transitionData;'''
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/runtime/org.eclipse.etrice.modellib.java/model/etrice/api/contracts/definitions.room b/runtime/org.eclipse.etrice.modellib.java/model/etrice/api/contracts/definitions.room
new file mode 100644
index 000000000..b9957746f
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.java/model/etrice/api/contracts/definitions.room
@@ -0,0 +1,19 @@
+RoomModel etrice.api.contracts.definitions {
+
+ AnnotationType InterfaceContract {
+ target = ProtocolClass
+ mandatory attribute definingActorClassName: ptCharacter
+ }
+
+ AnnotationType ValueRangeContract {
+ target = {
+ Transition, Message
+ }
+ mandatory attribute range: ptCharacter
+ }
+
+ AnnotationType TimingContract {
+ target = State
+ mandatory attribute durationInMS: ptInteger
+ }
+} \ No newline at end of file
diff --git a/runtime/org.eclipse.etrice.modellib.java/model/etrice/api/contracts/monitors.room b/runtime/org.eclipse.etrice.modellib.java/model/etrice/api/contracts/monitors.room
new file mode 100644
index 000000000..0834215c9
--- /dev/null
+++ b/runtime/org.eclipse.etrice.modellib.java/model/etrice/api/contracts/monitors.room
@@ -0,0 +1,54 @@
+/** work in progress */
+RoomModel etrice.api.contracts.monitors {
+
+ import room.basic.types.*
+
+ ProtocolClass MonitorControl {
+ incoming {
+ Message requestAndResetStatus()
+ Message setForwardInvalidMessages(boolean)
+ }
+ outgoing {
+ Message violationStatus(boolean)
+ Message violationOccured()
+ }
+ }
+
+ // not working due Bug 541775
+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=541775
+ abstract ActorClass ContractMonitorBase {
+ Interface {
+ Port monitor_ctrl: MonitorControl
+ }
+ Structure {
+ external Port monitor_ctrl
+ Attribute _violation: boolean
+ Attribute _forwardInvalidMessages: boolean
+ }
+ Behavior {
+ Operation _onViolation(comment: string) '''
+ _violation = value;
+ DebuggingService.getInstance().addVisibleComment(comment + " location: " + this.getInstancePath() + " : " + ifitem.toString());
+ monitor_ctrl.onViolation();
+ '''
+ StateMachine {
+ handler TransitionPoint _trBase
+ Transition _trStatus: my _trBase -> my _trBase {
+ triggers {
+ <requestAndResetStatus: monitor_ctrl>
+ }
+ action '''
+ monitor_ctrl.violationStatus(_violation);
+ _violation = false;
+ '''
+ }
+ Transition _trForward: my _trBase -> my _trBase {
+ triggers {
+ <setForwardInvalidMessages: monitor_ctrl>
+ }
+ action '''_forwardInvalidMessages = transitionData;'''
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.c b/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.c
index 7b824af5f..9ede3aee1 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.c
@@ -76,3 +76,10 @@ void etMSCLogger_setState(const char* objectName, const char* stateName){
fflush(etMSCLogger_fileHandle);
}
}
+
+void etMSCLogger_addVisibleComment(const char* comment){
+ if (etMSCLogger_fileHandle != NULL) {
+ etLogger_fprintf(etMSCLogger_fileHandle, "# %s\n", comment);
+ fflush(etMSCLogger_fileHandle);
+ }
+}
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.h b/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.h
index b4b98913c..aa9d486bc 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.h
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.h
@@ -95,6 +95,13 @@ void etMSCLogger_asyncIn(const char* sourceName, const char* messageName, const
*/
void etMSCLogger_setState(const char* objectName, const char* stateName);
+/**
+ * logs a comment
+ *
+ * \param comment
+ */
+void etMSCLogger_addVisibleComment(const char* comment);
+
#ifdef ET_MSC_LOGGER_ACTIVATE
#define ET_MSC_LOGGER_OPEN(object) \
etMSCLogger_open("log", "msc"); \
@@ -105,6 +112,9 @@ void etMSCLogger_setState(const char* objectName, const char* stateName);
#define ET_MSC_LOGGER_CHANGE_STATE(objectName, stateName) \
etMSCLogger_setState(objectName, stateName);
+ #define ET_MSC_LOGGER_VISIBLE_COMMENT(comment) \
+ etMSCLogger_addVisibleComment(comment);
+
#ifdef ET_SYNC_MSC_LOGGER_ACTIVATE
#define ET_MSC_LOGGER_SYNC_ENTRY(object, message) \
const char* sourceName = etMSCLogger_getObjectName(); \
diff --git a/settings.gradle b/settings.gradle
index ea23dae88..668d060dc 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -15,6 +15,7 @@ include 'plugins:org.eclipse.etrice.core.common',
'plugins:org.eclipse.etrice.generator.c',
'plugins:org.eclipse.etrice.generator.cpp',
'plugins:org.eclipse.etrice.generator.java',
+ 'plugins:org.eclipse.etrice.generator.contractmonitor',
'plugins:org.eclipse.etrice.abstractexec.behavior',
'plugins:org.eclipse.etrice.etunit.converter',
diff --git a/tests/org.eclipse.etrice.generator.common.tests/build.gradle b/tests/org.eclipse.etrice.generator.common.tests/build.gradle
index ebbcfc814..8996edebe 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/build.gradle
+++ b/tests/org.eclipse.etrice.generator.common.tests/build.gradle
@@ -11,6 +11,9 @@ dependencies {
modelpath_c files('models')
modelpath_cpp files('models')
modelpath_java files('models')
+ modelpath_c files('model-gen')
+ modelpath_cpp files('model-gen')
+ modelpath_java files('model-gen')
}
def genericPhysical = 'models/GenericPhysical.etphys'
@@ -26,7 +29,7 @@ def tests = [
handlerTest: ['models/HandlerTest.room', genericPhysical],
operationInheritanceTest: ['models/OperationInheritanceTest.room', genericPhysical],
pingPongThreadTest: ['models/PingPongThreadTest.etmap', 'models/PingPongThreadTest.room'],
- pingPongThreadReplPortTest: ['models/PingPongThreadReplPortTest.etmap', 'models/PingPongThreadReplPortTest.room']
+ pingPongThreadReplPortTest: ['models/PingPongThreadReplPortTest.etmap', 'models/PingPongThreadReplPortTest.room'],
]
tests.each { name, models ->
@@ -49,3 +52,21 @@ createTest('java', 'varargsTest', [genericPhysical, 'models/VarargsTest.room'])
// SubSystemUserCodeTest
createTest('c', 'subSystemUserCodeTest', ['models/SubSystemUserCodeTest.room', genericPhysical])
+
+// Contract Monitor Generation
+createTest('c', 'contractMonitorTest', ['models/ContractMonitorTest.room', 'models/ContractMonitor.room', 'model-gen/ContractMonitor_monitors.room', genericPhysical])
+createTest('java', 'contractMonitorTest', ['models/ContractMonitorTest.room', 'models/ContractMonitor.room', 'model-gen/ContractMonitor_monitors.room', genericPhysical])
+
+[generateContractMonitorTestC, generateContractMonitorTestJava].forEach{ genTask ->
+ def monitorGen = genTask.name + 'Monitor'
+ tasks.register(monitorGen, JavaExec) {
+ main = 'org.eclipse.etrice.generator.contractmonitor.Main'
+ classpath = genTask.classpath
+ args '-modelpath', genTask.modelpath.asPath
+ args '-targetLang', genTask.lang
+ args '-genDir', file('model-gen')
+ args file('models/ContractMonitor.room')
+ }
+ genTask.dependsOn monitorGen
+}
+
diff --git a/tests/org.eclipse.etrice.generator.common.tests/model-gen/ContractMonitor_monitors.room b/tests/org.eclipse.etrice.generator.common.tests/model-gen/ContractMonitor_monitors.room
new file mode 100644
index 000000000..9af1db2f9
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.common.tests/model-gen/ContractMonitor_monitors.room
@@ -0,0 +1,282 @@
+/** generated */
+
+RoomModel ContractMonitor_monitors {
+
+ import room.basic.types.*
+ import etrice.api.contracts.definitions.*
+ import ContractMonitor.*
+
+ ActorClass LoginProtocolContract_GeneratedMonitor {
+ Interface {
+ conjugated Port toUnconjugated: LoginProtocol
+ Port toConjugated: LoginProtocol
+ }
+ Structure {
+ Attribute attempts: int16
+ external Port toUnconjugated
+ external Port toConjugated
+ }
+ Behavior {
+ StateMachine {
+ State idle {
+ entry '''attempts = 0;'''
+ }
+ State connecting
+ State connected
+ State checking {
+ entry '''attempts += 1;'''
+ }
+ Transition init0: initial -> idle
+ Transition tr0: idle -> connecting {
+ triggers {
+ <hello: toConjugated>
+ }
+ action '''toUnconjugated.hello();'''
+ }
+ Transition tr1: connecting -> connected {
+ triggers {
+ <hello: toUnconjugated>
+ }
+ action '''toConjugated.hello();'''
+ }
+ Transition tr2: connected -> idle {
+ triggers {
+ <cancel: toConjugated>
+ }
+ action '''toUnconjugated.cancel();'''
+ }
+ Transition tr3: connected -> checking {
+ triggers {
+ <login: toConjugated>
+ }
+ action '''toUnconjugated.login(transitionData);'''
+ }
+ Transition tr4: checking -> idle {
+ triggers {
+ <ok: toUnconjugated>
+ }
+ action '''toConjugated.ok();'''
+ }
+ Transition tr5: checking -> connected {
+ triggers {
+ <wrong: toUnconjugated guard '''attempts <= 3'''>
+ }
+ action '''toConjugated.wrong();'''
+ }
+ Transition tr6: checking -> idle {
+ triggers {
+ <attemptsLimitReached: toUnconjugated guard '''attempts > 3'''>
+ }
+ action '''toConjugated.attemptsLimitReached();'''
+ }
+ Transition idle_catch_from_toConjugated_login: idle -> idle {
+ triggers {
+ <login: toConjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message login from port toConjugated is not allowed in state idle");
+ toUnconjugated.login(transitionData);
+ '''
+ }
+ Transition idle_catch_from_toConjugated_cancel: idle -> idle {
+ triggers {
+ <cancel: toConjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message cancel from port toConjugated is not allowed in state idle");
+ toUnconjugated.cancel();
+ '''
+ }
+ Transition idle_catch_from_toUnconjugated_hello: idle -> idle {
+ triggers {
+ <hello: toUnconjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message hello from port toUnconjugated is not allowed in state idle");
+ toConjugated.hello();
+ '''
+ }
+ Transition idle_catch_from_toUnconjugated_wrong: idle -> idle {
+ triggers {
+ <wrong: toUnconjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message wrong from port toUnconjugated is not allowed in state idle");
+ toConjugated.wrong();
+ '''
+ }
+ Transition idle_catch_from_toUnconjugated_attemptsLimitReached: idle -> idle {
+ triggers {
+ <attemptsLimitReached: toUnconjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message attemptsLimitReached from port toUnconjugated is not allowed in state idle");
+ toConjugated.attemptsLimitReached();
+ '''
+ }
+ Transition idle_catch_from_toUnconjugated_ok: idle -> idle {
+ triggers {
+ <ok: toUnconjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message ok from port toUnconjugated is not allowed in state idle");
+ toConjugated.ok();
+ '''
+ }
+ Transition connecting_catch_from_toConjugated_hello: connecting -> connecting {
+ triggers {
+ <hello: toConjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message hello from port toConjugated is not allowed in state connecting");
+ toUnconjugated.hello();
+ '''
+ }
+ Transition connecting_catch_from_toConjugated_login: connecting -> connecting {
+ triggers {
+ <login: toConjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message login from port toConjugated is not allowed in state connecting");
+ toUnconjugated.login(transitionData);
+ '''
+ }
+ Transition connecting_catch_from_toConjugated_cancel: connecting -> connecting {
+ triggers {
+ <cancel: toConjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message cancel from port toConjugated is not allowed in state connecting");
+ toUnconjugated.cancel();
+ '''
+ }
+ Transition connecting_catch_from_toUnconjugated_wrong: connecting -> connecting {
+ triggers {
+ <wrong: toUnconjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message wrong from port toUnconjugated is not allowed in state connecting");
+ toConjugated.wrong();
+ '''
+ }
+ Transition connecting_catch_from_toUnconjugated_attemptsLimitReached: connecting -> connecting {
+ triggers {
+ <attemptsLimitReached: toUnconjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message attemptsLimitReached from port toUnconjugated is not allowed in state connecting");
+ toConjugated.attemptsLimitReached();
+ '''
+ }
+ Transition connecting_catch_from_toUnconjugated_ok: connecting -> connecting {
+ triggers {
+ <ok: toUnconjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message ok from port toUnconjugated is not allowed in state connecting");
+ toConjugated.ok();
+ '''
+ }
+ Transition connected_catch_from_toConjugated_hello: connected -> connected {
+ triggers {
+ <hello: toConjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message hello from port toConjugated is not allowed in state connected");
+ toUnconjugated.hello();
+ '''
+ }
+ Transition connected_catch_from_toUnconjugated_hello: connected -> connected {
+ triggers {
+ <hello: toUnconjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message hello from port toUnconjugated is not allowed in state connected");
+ toConjugated.hello();
+ '''
+ }
+ Transition connected_catch_from_toUnconjugated_wrong: connected -> connected {
+ triggers {
+ <wrong: toUnconjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message wrong from port toUnconjugated is not allowed in state connected");
+ toConjugated.wrong();
+ '''
+ }
+ Transition connected_catch_from_toUnconjugated_attemptsLimitReached: connected -> connected {
+ triggers {
+ <attemptsLimitReached: toUnconjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message attemptsLimitReached from port toUnconjugated is not allowed in state connected");
+ toConjugated.attemptsLimitReached();
+ '''
+ }
+ Transition connected_catch_from_toUnconjugated_ok: connected -> connected {
+ triggers {
+ <ok: toUnconjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message ok from port toUnconjugated is not allowed in state connected");
+ toConjugated.ok();
+ '''
+ }
+ Transition checking_catch_from_toConjugated_hello: checking -> checking {
+ triggers {
+ <hello: toConjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message hello from port toConjugated is not allowed in state checking");
+ toUnconjugated.hello();
+ '''
+ }
+ Transition checking_catch_from_toConjugated_login: checking -> checking {
+ triggers {
+ <login: toConjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message login from port toConjugated is not allowed in state checking");
+ toUnconjugated.login(transitionData);
+ '''
+ }
+ Transition checking_catch_from_toConjugated_cancel: checking -> checking {
+ triggers {
+ <cancel: toConjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message cancel from port toConjugated is not allowed in state checking");
+ toUnconjugated.cancel();
+ '''
+ }
+ Transition checking_catch_from_toUnconjugated_hello: checking -> checking {
+ triggers {
+ <hello: toUnconjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message hello from port toUnconjugated is not allowed in state checking");
+ toConjugated.hello();
+ '''
+ }
+ Transition checking_catch_from_toUnconjugated_wrong: checking -> checking {
+ triggers {
+ <wrong: toUnconjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message wrong from port toUnconjugated is not allowed in state checking");
+ toConjugated.wrong();
+ '''
+ }
+ Transition checking_catch_from_toUnconjugated_attemptsLimitReached: checking -> checking {
+ triggers {
+ <attemptsLimitReached: toUnconjugated>
+ }
+ action '''
+ ET_MSC_LOGGER_VISIBLE_COMMENT("[Protocol ERROR] In protocol LoginProtocol message attemptsLimitReached from port toUnconjugated is not allowed in state checking");
+ toConjugated.attemptsLimitReached();
+ '''
+ }
+ }
+ }
+ }
+}
diff --git a/tests/org.eclipse.etrice.generator.common.tests/modelpath b/tests/org.eclipse.etrice.generator.common.tests/modelpath
index 6b24a696f..9acb3a0e6 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/modelpath
+++ b/tests/org.eclipse.etrice.generator.common.tests/modelpath
@@ -1,2 +1,3 @@
srcDir models
+srcDir model-gen
project org.eclipse.etrice.modellib.c \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/ContractMonitor.room b/tests/org.eclipse.etrice.generator.common.tests/models/ContractMonitor.room
new file mode 100644
index 000000000..4f12ca9d1
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/ContractMonitor.room
@@ -0,0 +1,81 @@
+RoomModel ContractMonitor {
+
+ import room.basic.types.*
+ import etrice.api.contracts.definitions.*
+
+ ProtocolClass LoginProtocol {
+ @InterfaceContract(definingActorClassName = "LoginProtocolContract")
+ incoming {
+ Message hello()
+ Message login(int16) @ValueRangeContract(range = "[0,9999]")
+ Message cancel()
+ }
+ outgoing {
+ Message hello()
+ Message wrong()
+ Message attemptsLimitReached()
+ Message ok()
+ }
+ }
+
+ ActorClass LoginProtocolContract {
+
+ Interface {
+ conjugated Port toUnconjugated: LoginProtocol
+ Port toConjugated: LoginProtocol
+ }
+ Structure {
+ external Port toUnconjugated
+ external Port toConjugated
+ Attribute attempts: int16
+ }
+ Behavior {
+ StateMachine {
+ State idle {
+ entry '''attempts = 0;'''
+ }
+ State connecting
+ State connected
+ State checking {
+ entry '''attempts += 1;'''
+ }
+ Transition init0: initial -> idle
+ Transition tr0: idle -> connecting {
+ triggers {
+ <hello: toConjugated>
+ }
+ }
+ Transition tr1: connecting -> connected {
+ triggers {
+ <hello: toUnconjugated>
+ }
+ }
+ Transition tr2: connected -> idle {
+ triggers {
+ <cancel: toConjugated>
+ }
+ }
+ Transition tr3: connected -> checking {
+ triggers {
+ <login: toConjugated>
+ }
+ }
+ Transition tr4: checking -> idle {
+ triggers {
+ <ok: toUnconjugated>
+ }
+ }
+ Transition tr5: checking -> connected {
+ triggers {
+ <wrong: toUnconjugated guard '''attempts <= 3'''>
+ }
+ }
+ Transition tr6: checking -> idle {
+ triggers {
+ <attemptsLimitReached: toUnconjugated guard '''attempts > 3'''>
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/ContractMonitorTest.room b/tests/org.eclipse.etrice.generator.common.tests/models/ContractMonitorTest.room
new file mode 100644
index 000000000..63cc15003
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/ContractMonitorTest.room
@@ -0,0 +1,145 @@
+RoomModel ContractMonitorTest {
+
+ import room.basic.service.timing.PTimer
+ import room.basic.types.*
+ import room.basic.test.TestInstance
+ import ContractMonitor.*
+ import room.basic.service.timing.ATimingService
+
+ ActorClass ContractMonitor_Top {
+ @TestInstance
+ Structure {
+ ActorRef appl: Appl
+ ActorRef timing: ATimingService
+ LayerConnection ref appl satisfied_by timing.timer
+ }
+ }
+
+ ActorClass Appl {
+ Structure {
+ ActorRef client: Client
+ ActorRef provider: Provider
+ ActorRef monitor: ContractMonitor_monitors.LoginProtocolContract_GeneratedMonitor
+
+ Binding provider.fct and monitor.toUnconjugated
+ Binding monitor.toConjugated and client.loginPort
+ }
+ Behavior {
+ ctor '''
+ etUnit_open("log", "ContractMonitorTest");
+ etUnit_openTestSuite("org.eclipse.etrice.generator.common.tests.ContractMonitorTest");
+ '''
+ dtor '''
+ etUnit_closeTestSuite();
+ etUnit_close();
+ '''
+ }
+ }
+
+ ActorClass Client {
+
+ Interface {
+ conjugated Port loginPort: LoginProtocol
+ }
+ Structure {
+ external Port loginPort
+ SAP toTimer: PTimer
+ Attribute counter: int32 = "0"
+ }
+ Behavior {
+ StateMachine {
+ State connecting {
+ entry '''counter += 1;'''
+ }
+ Transition init0: initial -> connecting {
+ action '''
+ loginPort.hello();
+ '''
+ }
+ State request1Sent
+ State request2Sent
+ State testDone {
+ entry '''etUnit_testFinished(0);'''
+ }
+ Transition tr0: connecting -> request1Sent {
+ triggers {
+ <hello: loginPort>
+ }
+ action '''loginPort.login((short)0);'''
+ }
+ Transition tr1: request1Sent -> request2Sent {
+ triggers {
+ <wrong: loginPort>
+ }
+ action '''loginPort.login((short)1);'''
+ }
+ Transition tr2: request4Sent -> connecting {
+ triggers {
+ <ok: loginPort guard '''counter < 1'''>
+ }
+ action '''loginPort.hello();'''
+ }
+ Transition tr3: request4Sent -> testDone {
+ triggers {
+ <wrong: loginPort guard '''counter >= 1'''>
+ }
+ }
+ State request3Sent
+ State request4Sent
+ Transition tr4: request2Sent -> request3Sent {
+ triggers {
+ <wrong: loginPort>
+ }
+ action '''loginPort.login((short)5);'''
+ }
+ Transition tr5: request3Sent -> request4Sent {
+ triggers {
+ <wrong: loginPort>
+ }
+ action '''loginPort.login((short)7);'''
+ }
+ }
+ }
+ }
+
+ ActorClass Provider {
+
+ Interface {
+ Port fct: LoginProtocol
+ }
+ Structure {
+ external Port fct
+ SAP toTimer: PTimer
+ }
+ Behavior {
+ StateMachine {
+ State idle
+ State connected
+ Transition init0: initial -> idle
+ Transition tr0: idle -> connected {
+ triggers {
+ <hello: fct>
+ }
+ action '''fct.hello();'''
+ }
+ Transition tr1: connected -> idle {
+ triggers {
+ <login: fct guard '''transitionData == 1234'''>
+ }
+ action '''fct.ok();'''
+ }
+ Transition tr2: connected -> connected {
+ triggers {
+ <login: fct guard '''transitionData != 1234'''>
+ }
+ action '''fct.wrong();'''
+ }
+ Transition tr3: connected -> idle {
+ triggers {
+ <cancel: fct>
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Appl.behavior b/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Appl.behavior
new file mode 100644
index 000000000..67c78a390
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Appl.behavior
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="ASCII"?>
+<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.behavior" name="Behavior of Appl" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@connections.0/@link" verticalGridUnit="10" version="0.16.0">
+ <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorClass:Appl"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="sg"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#StateGraph:Appl$sg"/>
+ </link>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="ini"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="40" height="40" x="102" y="90">
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="10" y="10"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#StateGraph:Appl$sg"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.3" lineWidth="1" filled="false" transparency="0.0" width="40" height="20" y="10" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="I"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="state"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="120" height="90" x="191" y="169">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.4" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="60" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="35" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <points x="-3" y="-3"/>
+ <points x="-3" y="3"/>
+ <points x="-11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <points x="3" y="-3"/>
+ <points x="3" y="3"/>
+ <points x="11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="30" y="24">
+ <points x="-2" y="-3"/>
+ <points x="-2" y="3"/>
+ <points x="2" y="3"/>
+ <points x="2" y="-3"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#SimpleState:Appl$state0"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="state0"/>
+ </children>
+ </children>
+ </children>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@anchors.0" end="//@children.0/@children.2/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#InitialTransition:Appl$initial"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="init"/>
+ </connectionDecorators>
+ </connections>
+ <colors red="227" green="238" blue="249"/>
+ <colors red="255" green="255" blue="255"/>
+ <colors/>
+ <colors red="100" green="100" blue="100"/>
+ <colors red="200" green="200" blue="200"/>
+ <fonts name="Arial" size="8"/>
+ <fonts name="Arial" size="9" bold="true"/>
+</pi:Diagram>
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Appl.structure b/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Appl.structure
new file mode 100644
index 000000000..5a999bbcd
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Appl.structure
@@ -0,0 +1,456 @@
+<?xml version="1.0" encoding="ASCII"?>
+<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.structure" name="Structure of Appl" pictogramLinks="//@link //@children.0/@link //@children.0/@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.0/@children.2/@link //@children.0/@children.1/@children.2/@link //@children.0/@children.1/@children.3/@link //@children.0/@children.2/@children.2/@link //@connections.0/@link //@connections.1/@link" verticalGridUnit="10" version="0.16.0">
+ <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorClass:Appl"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="cls"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" lineVisible="false" transparency="0.5" width="800" height="500" x="40" y="40"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorClass:Appl"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="ref"/>
+ <properties key="actorref_version" value="2"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="75" y="160">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="180" height="80" x="33" y="27">
+ <properties key="actorref_graphic_element" value="replborder"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
+ <properties key="actorref_graphic_element" value="mainborder"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50">
+ <properties key="actorref_graphic_element" value="substructure"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65">
+ <properties key="actorref_graphic_element" value="substructure"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="15"/>
+ <points x="15"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="30"/>
+ <points x="30"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="45"/>
+ <points x="45"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="60"/>
+ <points x="60"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="75"/>
+ <points x="75"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="10" y="80"/>
+ <points x="90"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="25" y="80"/>
+ <points x="105"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="40" y="80"/>
+ <points x="120"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="55" y="80"/>
+ <points x="135"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="70" y="80"/>
+ <points x="150"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="85" y="80"/>
+ <points x="165"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="100" y="80"/>
+ <points x="180"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="115" y="80"/>
+ <points x="180" y="15"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="130" y="80"/>
+ <points x="180" y="30"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="145" y="80"/>
+ <points x="180" y="45"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="160" y="80"/>
+ <points x="180" y="60"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="175" y="80"/>
+ <points x="180" y="75"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="25" height="25" x="185" y="30">
+ <properties key="actorref_graphic_element" value="sizeframe"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorRef:Appl$client"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.1">
+ <properties key="actorref_graphic_element" value="layerconn_anchor"/>
+ </anchors>
+ <children visible="true">
+ <properties key="actorref_graphic_element" value="name_shape"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="client&#xA;(Client)"/>
+ </children>
+ <children>
+ <properties key="actorref_graphic_element" value="size_shape"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="25" height="25" x="185" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="1"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value="C"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="90">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Port:Client$loginPort"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" value="loginPort"/>
+ </children>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="ref"/>
+ <properties key="actorref_version" value="2"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="268" y="345">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="180" height="80" x="33" y="27">
+ <properties key="actorref_graphic_element" value="replborder"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
+ <properties key="actorref_graphic_element" value="mainborder"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50">
+ <properties key="actorref_graphic_element" value="substructure"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65">
+ <properties key="actorref_graphic_element" value="substructure"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="15"/>
+ <points x="15"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="30"/>
+ <points x="30"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="45"/>
+ <points x="45"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="60"/>
+ <points x="60"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="75"/>
+ <points x="75"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="10" y="80"/>
+ <points x="90"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="25" y="80"/>
+ <points x="105"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="40" y="80"/>
+ <points x="120"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="55" y="80"/>
+ <points x="135"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="70" y="80"/>
+ <points x="150"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="85" y="80"/>
+ <points x="165"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="100" y="80"/>
+ <points x="180"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="115" y="80"/>
+ <points x="180" y="15"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="130" y="80"/>
+ <points x="180" y="30"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="145" y="80"/>
+ <points x="180" y="45"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="160" y="80"/>
+ <points x="180" y="60"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="175" y="80"/>
+ <points x="180" y="75"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="25" height="25" x="185" y="30">
+ <properties key="actorref_graphic_element" value="sizeframe"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorRef:Appl$monitor"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.1">
+ <properties key="actorref_graphic_element" value="layerconn_anchor"/>
+ </anchors>
+ <children visible="true">
+ <properties key="actorref_graphic_element" value="name_shape"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="monitor&#xA;(LoginProtocolContract_GeneratedMonitor)"/>
+ </children>
+ <children>
+ <properties key="actorref_graphic_element" value="size_shape"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="25" height="25" x="185" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="1"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value=""/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="119">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../../model-gen/ContractMonitor_monitors.room#Port:LoginProtocolContract_GeneratedMonitor$toConjugated"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.1/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" value="toConjugated"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value="C"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="59">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../../model-gen/ContractMonitor_monitors.room#Port:LoginProtocolContract_GeneratedMonitor$toUnconjugated"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" value="toUnconjugated"/>
+ </children>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="ref"/>
+ <properties key="actorref_version" value="2"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="320" y="160">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="180" height="80" x="33" y="27">
+ <properties key="actorref_graphic_element" value="replborder"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
+ <properties key="actorref_graphic_element" value="mainborder"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50">
+ <properties key="actorref_graphic_element" value="substructure"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65">
+ <properties key="actorref_graphic_element" value="substructure"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="15"/>
+ <points x="15"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="30"/>
+ <points x="30"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="45"/>
+ <points x="45"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="60"/>
+ <points x="60"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="75"/>
+ <points x="75"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="10" y="80"/>
+ <points x="90"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="25" y="80"/>
+ <points x="105"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="40" y="80"/>
+ <points x="120"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="55" y="80"/>
+ <points x="135"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="70" y="80"/>
+ <points x="150"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="85" y="80"/>
+ <points x="165"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="100" y="80"/>
+ <points x="180"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="115" y="80"/>
+ <points x="180" y="15"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="130" y="80"/>
+ <points x="180" y="30"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="145" y="80"/>
+ <points x="180" y="45"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="160" y="80"/>
+ <points x="180" y="60"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="175" y="80"/>
+ <points x="180" y="75"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="25" height="25" x="185" y="30">
+ <properties key="actorref_graphic_element" value="sizeframe"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorRef:Appl$provider"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.1">
+ <properties key="actorref_graphic_element" value="layerconn_anchor"/>
+ </anchors>
+ <children visible="true">
+ <properties key="actorref_graphic_element" value="name_shape"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="provider&#xA;(Provider)"/>
+ </children>
+ <children>
+ <properties key="actorref_graphic_element" value="size_shape"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="25" height="25" x="185" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="1"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value=""/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="90">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Port:Provider$fct"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.2/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" value="fct"/>
+ </children>
+ </children>
+ </children>
+ </children>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@children.2/@anchors.0" end="//@children.0/@children.1/@children.3/@anchors.0">
+ <properties key="obj-type" value="bind"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Binding:Appl$fct!provider-toUnconjugated!monitor"/>
+ </link>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@children.2/@anchors.0" end="//@children.0/@children.0/@children.2/@anchors.0">
+ <properties key="obj-type" value="bind"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Binding:Appl$toConjugated!monitor-loginPort!client"/>
+ </link>
+ </connections>
+ <colors red="227" green="238" blue="249"/>
+ <colors red="255" green="255" blue="255"/>
+ <colors/>
+ <colors red="200" green="200" blue="200"/>
+ <fonts name="Arial" size="8"/>
+</pi:Diagram>
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.AxisController.structure b/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.AxisController.structure
new file mode 100644
index 000000000..0a07f5b26
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.AxisController.structure
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ASCII"?>
+<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.structure" name="Structure of AxisController" pictogramLinks="//@link //@children.0/@link //@children.0/@children.0/@link" verticalGridUnit="10" version="0.16.0">
+ <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorClass:AxisController"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="cls"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" lineVisible="false" transparency="0.5" width="800" height="500" x="40" y="40"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorClass:AxisController"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value=""/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="400">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="40" height="40" x="20" y="20"/>
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.1" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Port:AxisController$fct"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="80" height="20" font="//@fonts.0" value="fct"/>
+ </children>
+ </children>
+ </children>
+ <colors red="227" green="238" blue="249"/>
+ <colors red="255" green="255" blue="255"/>
+ <colors/>
+ <fonts name="Arial" size="8"/>
+</pi:Diagram>
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Client.behavior b/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Client.behavior
new file mode 100644
index 000000000..fde1baff5
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Client.behavior
@@ -0,0 +1,344 @@
+<?xml version="1.0" encoding="ASCII"?>
+<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.behavior" name="Behavior of Client" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.3/@link //@children.0/@children.4/@link //@children.0/@children.5/@link //@children.0/@children.6/@link //@children.0/@children.7/@link //@connections.0/@link //@connections.1/@link //@connections.2/@link //@connections.3/@link //@connections.4/@link //@connections.5/@link //@connections.6/@link" verticalGridUnit="10" version="0.16.0">
+ <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorClass:Client"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="sg"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#StateGraph:Client$sg"/>
+ </link>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="ini"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="40" height="40" x="100" y="100">
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="10" y="10"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#StateGraph:Client$sg"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="40" height="20" y="10" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="I"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="state"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="136" height="90" x="57" y="120">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="76" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="51" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="38" y="24">
+ <points x="-3" y="-3"/>
+ <points x="-3" y="3"/>
+ <points x="-11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="38" y="24">
+ <points x="3" y="-3"/>
+ <points x="3" y="3"/>
+ <points x="11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="38" y="24">
+ <points x="-2" y="-3"/>
+ <points x="-2" y="3"/>
+ <points x="2" y="3"/>
+ <points x="2" y="-3"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#SimpleState:Client$connecting"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1" incomingConnections="//@connections.0 //@connections.3" referencedGraphicsAlgorithm="//@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="76" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="connecting"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="state"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="151" height="90" x="156" y="249">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="91" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="66" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="45" y="24">
+ <points x="-3" y="-3"/>
+ <points x="-3" y="3"/>
+ <points x="-11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="45" y="24">
+ <points x="3" y="-3"/>
+ <points x="3" y="3"/>
+ <points x="11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="45" y="24">
+ <points x="-2" y="-3"/>
+ <points x="-2" y="3"/>
+ <points x="2" y="3"/>
+ <points x="2" y="-3"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#SimpleState:Client$request1Sent"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.2" incomingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="91" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="request1Sent"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="state"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="151" height="90" x="246" y="301">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="91" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="66" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="45" y="24">
+ <points x="-3" y="-3"/>
+ <points x="-3" y="3"/>
+ <points x="-11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="45" y="24">
+ <points x="3" y="-3"/>
+ <points x="3" y="3"/>
+ <points x="11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="45" y="24">
+ <points x="-2" y="-3"/>
+ <points x="-2" y="3"/>
+ <points x="2" y="3"/>
+ <points x="2" y="-3"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#SimpleState:Client$request2Sent"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.5" incomingConnections="//@connections.2" referencedGraphicsAlgorithm="//@children.0/@children.4/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="91" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="request2Sent"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="state"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="125" height="90" x="609" y="368">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="65" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="40" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="32" y="24">
+ <points x="-3" y="-3"/>
+ <points x="-3" y="3"/>
+ <points x="-11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="32" y="24">
+ <points x="3" y="-3"/>
+ <points x="3" y="3"/>
+ <points x="11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="32" y="24">
+ <points x="-2" y="-3"/>
+ <points x="-2" y="3"/>
+ <points x="2" y="3"/>
+ <points x="2" y="-3"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#SimpleState:Client$testDone"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.4"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="65" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="testDone"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="state"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="151" height="90" x="397" y="381">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="91" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="66" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="45" y="24">
+ <points x="-3" y="-3"/>
+ <points x="-3" y="3"/>
+ <points x="-11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="45" y="24">
+ <points x="3" y="-3"/>
+ <points x="3" y="3"/>
+ <points x="11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="45" y="24">
+ <points x="-2" y="-3"/>
+ <points x="-2" y="3"/>
+ <points x="2" y="3"/>
+ <points x="2" y="-3"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#SimpleState:Client$request3Sent"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.6" incomingConnections="//@connections.5" referencedGraphicsAlgorithm="//@children.0/@children.6/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="91" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="request3Sent"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="state"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="151" height="90" x="637" y="159">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="91" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
+ <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="66" y="3" cornerHeight="5" cornerWidth="5"/>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="45" y="24">
+ <points x="-3" y="-3"/>
+ <points x="-3" y="3"/>
+ <points x="-11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="45" y="24">
+ <points x="3" y="-3"/>
+ <points x="3" y="3"/>
+ <points x="11" y="3"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="45" y="24">
+ <points x="-2" y="-3"/>
+ <points x="-2" y="3"/>
+ <points x="2" y="3"/>
+ <points x="2" y="-3"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#SimpleState:Client$request4Sent"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.3 //@connections.4" incomingConnections="//@connections.6" referencedGraphicsAlgorithm="//@children.0/@children.7/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="91" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="request4Sent"/>
+ </children>
+ </children>
+ </children>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@anchors.0" end="//@children.0/@children.2/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#InitialTransition:Client$initial"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="init"/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.3/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#TriggeredTransition:Client$tr0"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr0: &lt;hello:loginPort>"/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.3/@anchors.0" end="//@children.0/@children.4/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#TriggeredTransition:Client$tr1"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr1: &lt;wrong:loginPort>"/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.7/@anchors.0" end="//@children.0/@children.2/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#TriggeredTransition:Client$tr2"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="-39" y="5" font="//@fonts.0" value="tr2: &lt;ok:loginPort guard {coun..."/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.7/@anchors.0" end="//@children.0/@children.5/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#TriggeredTransition:Client$tr3"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.1" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr3: &lt;wrong:loginPort guard {c..."/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.4/@anchors.0" end="//@children.0/@children.6/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#TriggeredTransition:Client$tr4"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr4: &lt;wrong:loginPort>"/>
+ </connectionDecorators>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.6/@anchors.0" end="//@children.0/@children.7/@anchors.0">
+ <properties key="obj-type" value="trans"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#TriggeredTransition:Client$tr5"/>
+ </link>
+ <connectionDecorators visible="true" locationRelative="true" location="1.0">
+ <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
+ <points x="-15" y="5"/>
+ <points/>
+ <points x="-15" y="-5"/>
+ </graphicsAlgorithm>
+ </connectionDecorators>
+ <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr5: &lt;wrong:loginPort>"/>
+ </connectionDecorators>
+ </connections>
+ <colors red="227" green="238" blue="249"/>
+ <colors red="255" green="255" blue="255"/>
+ <colors/>
+ <colors red="200" green="200" blue="200"/>
+ <fonts name="Arial" size="8"/>
+ <fonts name="Arial" size="9" bold="true"/>
+</pi:Diagram>
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Client.structure b/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Client.structure
new file mode 100644
index 000000000..9055fadec
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Client.structure
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ASCII"?>
+<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.structure" name="Structure of Client" pictogramLinks="//@link //@children.0/@link //@children.0/@children.0/@link" verticalGridUnit="10" version="0.16.0">
+ <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorClass:Client"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="cls"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" lineVisible="false" transparency="0.5" width="800" height="500" x="40" y="40"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorClass:Client"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value="C"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="400">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="40" height="40" x="20" y="20"/>
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.2" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Port:Client$loginPort"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="80" height="20" font="//@fonts.0" value="loginPort"/>
+ </children>
+ </children>
+ </children>
+ <colors red="227" green="238" blue="249"/>
+ <colors red="255" green="255" blue="255"/>
+ <colors/>
+ <fonts name="Arial" size="8"/>
+</pi:Diagram>
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.ContractMonitor_Top.structure b/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.ContractMonitor_Top.structure
new file mode 100644
index 000000000..ace42c3d0
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.ContractMonitor_Top.structure
@@ -0,0 +1,770 @@
+<?xml version="1.0" encoding="ASCII"?>
+<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.structure" name="Structure of ContractMonitor_Top" pictogramLinks="//@link //@children.0/@link //@children.0/@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@children.0/@children.3/@link //@children.0/@children.0/@children.2/@link //@children.0/@children.0/@children.3/@link //@children.0/@children.1/@children.2/@link //@children.0/@children.1/@children.3/@link //@children.0/@children.2/@children.2/@link //@children.0/@children.2/@children.3/@link //@children.0/@children.3/@children.2/@link //@connections.0/@link //@connections.1/@link //@connections.2/@link //@children.0/@children.4/@link //@children.0/@children.4/@children.2/@link //@connections.3/@link" verticalGridUnit="10" version="0.16.0">
+ <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorClass:ContractMonitor_Top"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="cls"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" lineVisible="false" transparency="0.5" width="800" height="500" x="40" y="40"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorClass:ContractMonitor_Top"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="ref"/>
+ <properties key="actorref_version" value="2"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="295" y="388">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="180" height="80" x="33" y="27">
+ <properties key="actorref_graphic_element" value="replborder"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
+ <properties key="actorref_graphic_element" value="mainborder"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50">
+ <properties key="actorref_graphic_element" value="substructure"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65">
+ <properties key="actorref_graphic_element" value="substructure"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="15"/>
+ <points x="15"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="30"/>
+ <points x="30"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="45"/>
+ <points x="45"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="60"/>
+ <points x="60"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="75"/>
+ <points x="75"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="10" y="80"/>
+ <points x="90"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="25" y="80"/>
+ <points x="105"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="40" y="80"/>
+ <points x="120"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="55" y="80"/>
+ <points x="135"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="70" y="80"/>
+ <points x="150"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="85" y="80"/>
+ <points x="165"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="100" y="80"/>
+ <points x="180"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="115" y="80"/>
+ <points x="180" y="15"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="130" y="80"/>
+ <points x="180" y="30"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="145" y="80"/>
+ <points x="180" y="45"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="160" y="80"/>
+ <points x="180" y="60"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="175" y="80"/>
+ <points x="180" y="75"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="25" height="25" x="185" y="30">
+ <properties key="actorref_graphic_element" value="sizeframe"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorRef:ContractMonitor_Top$controller_ex1"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.1">
+ <properties key="actorref_graphic_element" value="layerconn_anchor"/>
+ </anchors>
+ <children visible="true">
+ <properties key="actorref_graphic_element" value="name_shape"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="controller_ex1&#xA;(Controller_ex1)"/>
+ </children>
+ <children>
+ <properties key="actorref_graphic_element" value="size_shape"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="25" height="25" x="185" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="1"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value="C"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="59">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Port:Controller_ex1$toAxis1"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" value="toAxis1"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value="C"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="119">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Port:Controller_ex1$toAxis2"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.2" referencedGraphicsAlgorithm="//@children.0/@children.0/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" value="toAxis2"/>
+ </children>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="ref"/>
+ <properties key="actorref_version" value="2"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="447" y="264">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="180" height="80" x="33" y="27">
+ <properties key="actorref_graphic_element" value="replborder"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
+ <properties key="actorref_graphic_element" value="mainborder"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50">
+ <properties key="actorref_graphic_element" value="substructure"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65">
+ <properties key="actorref_graphic_element" value="substructure"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="15"/>
+ <points x="15"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="30"/>
+ <points x="30"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="45"/>
+ <points x="45"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="60"/>
+ <points x="60"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="75"/>
+ <points x="75"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="10" y="80"/>
+ <points x="90"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="25" y="80"/>
+ <points x="105"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="40" y="80"/>
+ <points x="120"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="55" y="80"/>
+ <points x="135"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="70" y="80"/>
+ <points x="150"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="85" y="80"/>
+ <points x="165"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="100" y="80"/>
+ <points x="180"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="115" y="80"/>
+ <points x="180" y="15"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="130" y="80"/>
+ <points x="180" y="30"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="145" y="80"/>
+ <points x="180" y="45"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="160" y="80"/>
+ <points x="180" y="60"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="175" y="80"/>
+ <points x="180" y="75"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="25" height="25" x="185" y="30">
+ <properties key="actorref_graphic_element" value="sizeframe"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorRef:ContractMonitor_Top$PAxisControlMonitor1"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.1">
+ <properties key="actorref_graphic_element" value="layerconn_anchor"/>
+ </anchors>
+ <children visible="true">
+ <properties key="actorref_graphic_element" value="name_shape"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="PAxisControlMonitor1&#xA;(PAxisControlContract_GeneratedMonitor)"/>
+ </children>
+ <children>
+ <properties key="actorref_graphic_element" value="size_shape"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="25" height="25" x="185" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="1"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value="C"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="59">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../../model-gen/ContractMonitor_monitors.room#Port:PAxisControlContract_GeneratedMonitor$toUnconjugated"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.3" referencedGraphicsAlgorithm="//@children.0/@children.1/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" value="toUnconjugated"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value=""/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="119">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../../model-gen/ContractMonitor_monitors.room#Port:PAxisControlContract_GeneratedMonitor$toConjugated"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.2" referencedGraphicsAlgorithm="//@children.0/@children.1/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" value="toConjugated"/>
+ </children>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="ref"/>
+ <properties key="actorref_version" value="2"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="131" y="250">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="180" height="80" x="33" y="27">
+ <properties key="actorref_graphic_element" value="replborder"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
+ <properties key="actorref_graphic_element" value="mainborder"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50">
+ <properties key="actorref_graphic_element" value="substructure"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65">
+ <properties key="actorref_graphic_element" value="substructure"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="15"/>
+ <points x="15"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="30"/>
+ <points x="30"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="45"/>
+ <points x="45"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="60"/>
+ <points x="60"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="75"/>
+ <points x="75"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="10" y="80"/>
+ <points x="90"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="25" y="80"/>
+ <points x="105"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="40" y="80"/>
+ <points x="120"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="55" y="80"/>
+ <points x="135"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="70" y="80"/>
+ <points x="150"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="85" y="80"/>
+ <points x="165"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="100" y="80"/>
+ <points x="180"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="115" y="80"/>
+ <points x="180" y="15"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="130" y="80"/>
+ <points x="180" y="30"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="145" y="80"/>
+ <points x="180" y="45"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="160" y="80"/>
+ <points x="180" y="60"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="175" y="80"/>
+ <points x="180" y="75"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="25" height="25" x="185" y="30">
+ <properties key="actorref_graphic_element" value="sizeframe"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorRef:ContractMonitor_Top$PAxisControlMonitor0"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.1">
+ <properties key="actorref_graphic_element" value="layerconn_anchor"/>
+ </anchors>
+ <children visible="true">
+ <properties key="actorref_graphic_element" value="name_shape"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="PAxisControlMonitor0&#xA;(PAxisControlContract_GeneratedMonitor)"/>
+ </children>
+ <children>
+ <properties key="actorref_graphic_element" value="size_shape"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="25" height="25" x="185" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="1"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value="C"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="59">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../../model-gen/ContractMonitor_monitors.room#Port:PAxisControlContract_GeneratedMonitor$toUnconjugated"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" incomingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.2/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" value="toUnconjugated"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value=""/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="119">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../../model-gen/ContractMonitor_monitors.room#Port:PAxisControlContract_GeneratedMonitor$toConjugated"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1" referencedGraphicsAlgorithm="//@children.0/@children.2/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" value="toConjugated"/>
+ </children>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="ref"/>
+ <properties key="actorref_version" value="2"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="45" y="61">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="180" height="80" x="33" y="27">
+ <properties key="actorref_graphic_element" value="replborder"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
+ <properties key="actorref_graphic_element" value="mainborder"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50">
+ <properties key="actorref_graphic_element" value="substructure"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65">
+ <properties key="actorref_graphic_element" value="substructure"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="15"/>
+ <points x="15"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="30"/>
+ <points x="30"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="45"/>
+ <points x="45"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="60"/>
+ <points x="60"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="75"/>
+ <points x="75"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="10" y="80"/>
+ <points x="90"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="25" y="80"/>
+ <points x="105"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="40" y="80"/>
+ <points x="120"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="55" y="80"/>
+ <points x="135"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="70" y="80"/>
+ <points x="150"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="85" y="80"/>
+ <points x="165"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="100" y="80"/>
+ <points x="180"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="115" y="80"/>
+ <points x="180" y="15"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="130" y="80"/>
+ <points x="180" y="30"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="145" y="80"/>
+ <points x="180" y="45"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="160" y="80"/>
+ <points x="180" y="60"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="175" y="80"/>
+ <points x="180" y="75"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="25" height="25" x="185" y="30">
+ <properties key="actorref_graphic_element" value="sizeframe"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorRef:ContractMonitor_Top$ex1_axis1"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.3/@graphicsAlgorithm/@graphicsAlgorithmChildren.1">
+ <properties key="actorref_graphic_element" value="layerconn_anchor"/>
+ </anchors>
+ <children visible="true">
+ <properties key="actorref_graphic_element" value="name_shape"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="ex1_axis1&#xA;(AxisController)"/>
+ </children>
+ <children>
+ <properties key="actorref_graphic_element" value="size_shape"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="25" height="25" x="185" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="1"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value=""/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="90">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Port:AxisController$fct"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.3/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" value="fct"/>
+ </children>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="ref"/>
+ <properties key="actorref_version" value="2"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="240" height="140" x="532" y="80">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="180" height="80" x="33" y="27">
+ <properties key="actorref_graphic_element" value="replborder"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="180" height="80" x="30" y="30">
+ <properties key="actorref_graphic_element" value="mainborder"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="150" y="50">
+ <properties key="actorref_graphic_element" value="substructure"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="20" height="10" x="145" y="65">
+ <properties key="actorref_graphic_element" value="substructure"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="15"/>
+ <points x="15"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="30"/>
+ <points x="30"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="45"/>
+ <points x="45"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="60"/>
+ <points x="60"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points y="75"/>
+ <points x="75"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="10" y="80"/>
+ <points x="90"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="25" y="80"/>
+ <points x="105"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="40" y="80"/>
+ <points x="120"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="55" y="80"/>
+ <points x="135"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="70" y="80"/>
+ <points x="150"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="85" y="80"/>
+ <points x="165"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="100" y="80"/>
+ <points x="180"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="115" y="80"/>
+ <points x="180" y="15"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="130" y="80"/>
+ <points x="180" y="30"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="145" y="80"/>
+ <points x="180" y="45"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="160" y="80"/>
+ <points x="180" y="60"/>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.2" lineStyle="UNSPECIFIED" lineVisible="false" transparency="0.4">
+ <properties key="actorref_graphic_element" value="hatched_line"/>
+ <points x="175" y="80"/>
+ <points x="180" y="75"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithmChildren>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="25" height="25" x="185" y="30">
+ <properties key="actorref_graphic_element" value="sizeframe"/>
+ </graphicsAlgorithmChildren>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorRef:ContractMonitor_Top$ex2_axis1"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.4/@graphicsAlgorithm/@graphicsAlgorithmChildren.1">
+ <properties key="actorref_graphic_element" value="layerconn_anchor"/>
+ </anchors>
+ <children visible="true">
+ <properties key="actorref_graphic_element" value="name_shape"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="180" height="80" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="ex2_axis1&#xA;(AxisController)"/>
+ </children>
+ <children>
+ <properties key="actorref_graphic_element" value="size_shape"/>
+ <graphicsAlgorithm xsi:type="al:Text" background="//@colors.3" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="25" height="25" x="185" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="1"/>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value=""/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="60" height="60" x="90">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="18" height="18" x="21" y="21"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Port:AxisController$fct"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.3" referencedGraphicsAlgorithm="//@children.0/@children.4/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="60" height="15" y="6" font="//@fonts.0" value="fct"/>
+ </children>
+ </children>
+ </children>
+ </children>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.3/@children.2/@anchors.0" end="//@children.0/@children.2/@children.2/@anchors.0">
+ <properties key="obj-type" value="bind"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Binding:ContractMonitor_Top$fct!ex1_axis1-toUnconjugated!PAxisControlMonitor0"/>
+ </link>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@children.3/@anchors.0" end="//@children.0/@children.0/@children.2/@anchors.0">
+ <properties key="obj-type" value="bind"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Binding:ContractMonitor_Top$toConjugated!PAxisControlMonitor0-toAxis1!controller_ex1"/>
+ </link>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@children.3/@anchors.0" end="//@children.0/@children.0/@children.3/@anchors.0">
+ <properties key="obj-type" value="bind"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Binding:ContractMonitor_Top$toConjugated!PAxisControlMonitor1-toAxis2!controller_ex1"/>
+ </link>
+ </connections>
+ <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.4/@children.2/@anchors.0" end="//@children.0/@children.1/@children.2/@anchors.0">
+ <properties key="obj-type" value="bind"/>
+ <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Binding:ContractMonitor_Top$fct!ex2_axis1-toUnconjugated!PAxisControlMonitor1"/>
+ </link>
+ </connections>
+ <colors red="227" green="238" blue="249"/>
+ <colors red="255" green="255" blue="255"/>
+ <colors/>
+ <colors red="200" green="200" blue="200"/>
+ <fonts name="Arial" size="8"/>
+</pi:Diagram>
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Controller_ex1.structure b/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Controller_ex1.structure
new file mode 100644
index 000000000..80f590f85
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Controller_ex1.structure
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="ASCII"?>
+<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.structure" name="Structure of Controller_ex1" pictogramLinks="//@link //@children.0/@link //@children.0/@children.0/@link //@children.0/@children.1/@link" verticalGridUnit="10" version="0.16.0">
+ <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorClass:Controller_ex1"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="cls"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" lineVisible="false" transparency="0.5" width="800" height="500" x="40" y="40"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorClass:Controller_ex1"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value="C"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="265">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="40" height="40" x="20" y="20"/>
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.2" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Port:Controller_ex1$toAxis1"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="80" height="20" font="//@fonts.0" value="toAxis1"/>
+ </children>
+ </children>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value="C"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="532">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="40" height="40" x="20" y="20"/>
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.2" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Port:Controller_ex1$toAxis2"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="80" height="20" font="//@fonts.0" value="toAxis2"/>
+ </children>
+ </children>
+ </children>
+ <colors red="227" green="238" blue="249"/>
+ <colors red="255" green="255" blue="255"/>
+ <colors/>
+ <fonts name="Arial" size="8"/>
+</pi:Diagram>
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Provider.structure b/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Provider.structure
new file mode 100644
index 000000000..9af28e846
--- /dev/null
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/diagrams/ContractMonitorTest.Provider.structure
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ASCII"?>
+<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.structure" name="Structure of Provider" pictogramLinks="//@link //@children.0/@link //@children.0/@children.0/@link" verticalGridUnit="10" version="0.16.0">
+ <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorClass:Provider"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="cls"/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="1" lineVisible="false" transparency="0.5" width="800" height="500" x="40" y="40"/>
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#ActorClass:Provider"/>
+ </link>
+ <children xsi:type="pi:ContainerShape" visible="true" active="true">
+ <properties key="obj-type" value="port"/>
+ <properties key="inherited" value="false"/>
+ <properties key="item-kind" value=""/>
+ <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="400">
+ <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.2" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="40" height="40" x="20" y="20"/>
+ <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.1" lineWidth="2" transparency="0.0" width="20" height="20" x="30" y="30"/>
+ </graphicsAlgorithm>
+ <link>
+ <businessObjects href="../ContractMonitorTest.room#Port:Provider$fct"/>
+ </link>
+ <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
+ <children visible="true">
+ <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="80" height="20" font="//@fonts.0" value="fct"/>
+ </children>
+ </children>
+ </children>
+ <colors red="227" green="238" blue="249"/>
+ <colors red="255" green="255" blue="255"/>
+ <colors/>
+ <fonts name="Arial" size="8"/>
+</pi:Diagram>

Back to the top