Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2014-01-27 16:23:48 +0000
committerAnsgar Radermacher2014-01-27 16:24:32 +0000
commit0fd966709954db55bff763e2212a6a92acab3183 (patch)
treecb4bfbf4f271d8ff99525943f0e3ec60db4acfb3 /extraplugins
parentc04a4bd96accb96c4c9aca0558a4c2561f6d8a12 (diff)
downloadorg.eclipse.papyrus-0fd966709954db55bff763e2212a6a92acab3183.tar.gz
org.eclipse.papyrus-0fd966709954db55bff763e2212a6a92acab3183.tar.xz
org.eclipse.papyrus-0fd966709954db55bff763e2212a6a92acab3183.zip
426720 - [QDesginer] Need to re-target connectors after template binding
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/build.acceleo2
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Messages.java2
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/PortUtils.java4
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Utils.java3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/acceleo/EnumService.java42
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/acceleo/UMLTool.java8
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/messages.properties1
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/AbstractContainerTrafo.java7
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/CompImplTrafos.java11
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/ConnectorReification.java22
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/ContainerTrafo.java168
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/Copy.java12
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/InstantiateDepPlan.java21
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/LWContainerTrafo.java1
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/MainModelTrafo.java21
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/PropagateAllocationToSharedInstances.java58
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/UpdateDerivedInterfaces.java51
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/filters/FilterStateMachines.java7
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/AllocationDialog.java3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/META-INF/MANIFEST.MF3
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/build.acceleo2
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/models/examples/HelloWorld.notation30
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/models/library/fifo.notation21
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/models/library/fifo.uml127
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/plugin.xml10
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/StateMachine.mtl4
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/StateMachineUtil.java37
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/StateMachineUtil.mtl7
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/acceptableEvents.mtl34
-rw-r--r--extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/iconfigurators/AnimServiceConfigurator.java5
-rw-r--r--extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/build.acceleo2
31 files changed, 459 insertions, 267 deletions
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/build.acceleo b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/build.acceleo
index b4a22fdacc3..0cdb04e52f1 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/build.acceleo
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/build.acceleo
@@ -18,7 +18,7 @@
<acceleoCompiler
sourceFolder="${target.folder}"
outputFolder="${target.folder}"
- dependencies="${target.folder}/../../org.eclipse.papyrus.fcm.profile;${target.folder}/../../org.eclipse.papyrus.infra.core.sasheditor;${target.folder}/../../org.eclipse.papyrus.infra.core.sasheditor.di;${target.folder}/../../org.eclipse.papyrus.qompass.designer.vsl;${target.folder}/../../org.eclipse.papyrus.cpp.profile;${target.folder}/../../org.eclipse.papyrus.acceleo;${target.folder}/../../org.eclipse.papyrus.infra.widgets.toolbox;"
+ dependencies="${target.folder}/../../org.eclipse.papyrus.fcm.profile;${target.folder}/../../org.eclipse.papyrus.qompass.designer.vsl;${target.folder}/../../org.eclipse.papyrus.cpp.profile;${target.folder}/../../org.eclipse.papyrus.acceleo;"
binaryResource="false"
packagesToRegister="">
</acceleoCompiler>
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Messages.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Messages.java
index 8f0a90b7f06..181da5511ce 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Messages.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Messages.java
@@ -75,6 +75,8 @@ public class Messages extends NLS {
public static String ContainerTrafo_CannotFindDelegationConn;
public static String ContainerTrafo_InterceptionRuleButNoInterceptor;
+ public static String InstanceConfigurator_InvalidPluginExtension;
+
public static String InstantiateDepPlan_AcceleoErrors;
public static String InstantiateDepPlan_AcceleoErrorsCheckLog;
public static String InstantiateDepPlan_CannotGenModel;
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/PortUtils.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/PortUtils.java
index 8679e1f830b..e6ff1cb5bd8 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/PortUtils.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/PortUtils.java
@@ -247,10 +247,10 @@ public class PortUtils {
*/
public static boolean matches(Port portA, Port portB, boolean isAssembly) {
if(isAssembly) {
- return (sameKinds(portA, portB) && (portA.isConjugated() != portB.isConjugated()));
+ return ((portA.getType() == portB.getType()) && sameKinds(portA, portB) && (portA.isConjugated() != portB.isConjugated()));
} else {
// delegation
- return (sameKinds(portA, portB) && (portA.isConjugated() == portB.isConjugated()));
+ return ((portA.getType() == portB.getType()) && sameKinds(portA, portB) && (portA.isConjugated() == portB.isConjugated()));
}
}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Utils.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Utils.java
index 2fac99cac7b..43c7a9900fa 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Utils.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/Utils.java
@@ -46,6 +46,7 @@ import org.eclipse.uml2.uml.Namespace;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Port;
+import org.eclipse.uml2.uml.Profile;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.Type;
import org.eclipse.uml2.uml.util.UMLUtil;
@@ -381,7 +382,7 @@ public class Utils {
Resource userResource = resources.get(i);
if(userResource.getContents().size() > 0) {
EObject topEObj = userResource.getContents().get(0);
- if(topEObj instanceof Package) {
+ if((topEObj instanceof Package) && (!(topEObj instanceof Profile))) {
return (Package)topEObj;
}
}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/acceleo/EnumService.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/acceleo/EnumService.java
index 2870684a147..e1e5d8eb9a0 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/acceleo/EnumService.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/acceleo/EnumService.java
@@ -73,9 +73,11 @@ public class EnumService {
}
/**
- * Create a literal within an enumeration. Both, the literal and the enumeration may be an Acceleo template startiung with [
- *
- * @param dummy
+ * Create a literal within an enumeration. Both, the literal and the enumeration may be an
+ * Acceleo template. If the name of the enumeration starts with "L", it is considered as a
+ * local enumeration, i.e. a nested classifier within the classifier (it has to be a class)
+ * from the transformation context.
+ *
* @param enumName
* the name of an enumeration
* @param literal
@@ -83,23 +85,6 @@ public class EnumService {
* @return
*/
public static String literal(String enumName, String literal) {
- // Acceleo does not expand parameters, so we do it here
- /*
- * if(enumName.contains("[") && enumName.contains("/]")) {
- * try {
- * enumName = AcceleoDriver.bind(enumName, dummy);
- * } catch (TransformationException e) {
- * return e.toString();
- * }
- * }
- * if(literal.contains("[") && enumName.contains("/]")) {
- * try {
- * literal = AcceleoDriver.bind(literal, dummy);
- * } catch (TransformationException e) {
- * return e.toString();
- * }
- * }
- */
Enumeration enumeration = enumHash.get(enumName);
if(enumPkg == null) {
return literal;
@@ -121,9 +106,21 @@ public class EnumService {
// declare a dependency to the enumeration from the current classifier
checkAndCreateDependency(TransformationContext.classifier, enumeration);
- return literal;
+ if (enumName.startsWith("L")) { //$NON-NLS-1$
+ return literal;
+ }
+ else {
+ return GLOBALENUMS + "::" + literal; //$NON-NLS-1$
+ }
}
+ /**
+ * Create a dependency between the passed classifier, target pair. The objective
+ * of this function is that code generators do the necessary to assure that the
+ * target is known within the classifier (e.g. include directives)
+ * @param classifier a classifier
+ * @param target a target, on which the classifier or its code depends.
+ */
public static void checkAndCreateDependency(Classifier classifier, NamedElement target) {
boolean found = false;
for(Dependency dep : classifier.getClientDependencies()) {
@@ -132,7 +129,8 @@ public class EnumService {
}
}
if(!found) {
- classifier.createDependency(target);
+ Dependency dep = classifier.createDependency(target);
+ dep.setName(String.format("from %s to %s", classifier.getName(), target.getName())); //$NON-NLS-1$
}
}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/acceleo/UMLTool.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/acceleo/UMLTool.java
index d63fd1b3655..64b2513dabd 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/acceleo/UMLTool.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/acceleo/UMLTool.java
@@ -25,6 +25,7 @@ import org.eclipse.papyrus.C_Cpp.External;
import org.eclipse.papyrus.C_Cpp.NoCodeGen;
import org.eclipse.papyrus.C_Cpp.Typedef;
import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
+import org.eclipse.uml2.uml.BehavioredClassifier;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Classifier;
import org.eclipse.uml2.uml.Dependency;
@@ -259,14 +260,15 @@ public class UMLTool {
* The operation is useful in the context of state-machines: when a transition is triggered by
* the call of an operation of the class, we'd like to know which interceptor (for which interface)
* belongs to it (since the operations are enumerated within each interface).
- * TOOD: move operation into state-chart java code
+ * TODO: move operation into state-chart java code
+ * TODO: would not work for ROOM ports typed with a collaboration
*
* @param operation
* @return the interface which the operation belongs
*/
public static Interface implementsInterface(Operation operation) {
Element owner = operation.getOwner();
- if(owner instanceof Class) {
+ if(owner instanceof BehavioredClassifier) {
String name = operation.getName();
EList<Type> types = new BasicEList<Type>();
for(Parameter parameter : operation.getOwnedParameters()) {
@@ -275,7 +277,7 @@ public class UMLTool {
// loop over implemented realizations. Do not rely on FCM derivedElement information
// as it might be missing on some models (it would point from an operation of the class
// to the associated operation of the interface)
- for(InterfaceRealization ir : ((Class)owner).getInterfaceRealizations()) {
+ for(InterfaceRealization ir : ((BehavioredClassifier)owner).getInterfaceRealizations()) {
// check for types to allow for overloading
Operation candidate = ir.getContract().getOwnedOperation(name, null, types);
if(candidate != null) {
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/messages.properties b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/messages.properties
index c237acc8ada..465c8398807 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/messages.properties
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/messages.properties
@@ -54,6 +54,7 @@ CompTypeTrafos_CannotFindType=Can not find type <%s>. Thus, unable to create sui
ContainerTrafo_CannotApplyRule=Cannot apply container rule <%s>, since the type of one of its parts is undefined. Check for unresolved proxies in imports
ContainerTrafo_CannotFindDelegationConn=(during interceptor transformation for container): cannot find existing delegation connector
ContainerTrafo_InterceptionRuleButNoInterceptor=The part %s in rule %s has an interceptionRule, but is not typed with an interaction component
+InstanceConfigurator_InvalidPluginExtension=InstanceConfigurator: plugin extension for id %s is invalid
InstantiateDepPlan_AcceleoErrors=Acceleo errors occured
InstantiateDepPlan_AcceleoErrorsCheckLog=Acceleo errors occured during code generation. Please check the error log
InstantiateDepPlan_CannotGenModel=Cannot generate model
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/AbstractContainerTrafo.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/AbstractContainerTrafo.java
index 12ca2ec6579..eb6e8fee831 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/AbstractContainerTrafo.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/AbstractContainerTrafo.java
@@ -95,13 +95,6 @@ public abstract class AbstractContainerTrafo {
public void finalize() {
}
-
- /**
- * The created container implementation (prefixed with sm, since part of
- * source model)
- */
- protected Class smClass;
-
/**
* The created container implementation (prefixed with tm, since part of
* target model)
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/CompImplTrafos.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/CompImplTrafos.java
index f87ce91d5a5..f789e2c22f2 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/CompImplTrafos.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/CompImplTrafos.java
@@ -253,7 +253,10 @@ public class CompImplTrafos {
body = part.getName();
ConnectableElement role = ce.getRole();
if(role instanceof Port) {
- body += refOp(part) + opName;
+ // in case of a delegation, use name of target port which might be different
+ String targetOpName = PrefixConstants.connectQ_Prefix + role.getName();
+ body += refOp(part) + targetOpName;
+ // TODO: no check that multiplicity of both port matches
if((portInfo.getUpper() > 1) || (portInfo.getUpper() == -1)) {
body += "(index, ref);"; //$NON-NLS-1$
} else {
@@ -502,8 +505,8 @@ public class CompImplTrafos {
* @return
*/
public static boolean instantiateViaBootloader(Class implementation) {
- return Utils.isCompType(implementation) ||
- implementation.isAbstract() || Utils.isSingleton(implementation) ||
+ return
+ implementation.isAbstract() ||
Utils.isAssembly(implementation);
}
@@ -539,7 +542,7 @@ public class CompImplTrafos {
* @return
*/
protected static String refOp(Property part) {
- return instantiateViaBootloader(part) ?
+ return ((part.getAggregation() == AggregationKind.SHARED_LITERAL) || StereotypeUtil.isApplied(part, Ptr.class)) ?
"->" : "."; //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/ConnectorReification.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/ConnectorReification.java
index 8c385174d53..357fd6a34ef 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/ConnectorReification.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/ConnectorReification.java
@@ -31,7 +31,6 @@ import org.eclipse.papyrus.qompass.designer.core.ConnectorUtils;
import org.eclipse.papyrus.qompass.designer.core.Log;
import org.eclipse.papyrus.qompass.designer.core.Messages;
import org.eclipse.papyrus.qompass.designer.core.PortUtils;
-import org.eclipse.papyrus.qompass.designer.core.Utils;
import org.eclipse.papyrus.qompass.designer.core.deployment.AllocUtils;
import org.eclipse.papyrus.qompass.designer.core.deployment.DepUtils;
import org.eclipse.papyrus.qompass.designer.core.templates.ConnectorBinding;
@@ -153,21 +152,8 @@ public class ConnectorReification {
}
Property tmConnectorPart = copy.getCopy(smConnectorPart);
tmConnectorPart.setType(connectorImplem);
- // now retarget connectors towards this part
-
- for(Connector connector : tmComponent.getOwnedConnectors()) {
- if(ConnectorUtils.connectsPart(connector, tmConnectorPart)) {
- // the connector end targets a port of a part or the composite (in case of delegation)
- ConnectorEnd connEnd = ConnectorUtils.connEndForPart(connector, tmConnectorPart);
- // redirect role, if pointing to port
- if(connEnd.getRole() instanceof Port) {
- Port connectedTemplatePort = (Port)connEnd.getRole();
- Port connectedBoundPort = (Port)Utils.getNamedElementFromList(
- PortUtils.getAllPorts(connectorImplem), connectedTemplatePort.getName());
- connEnd.setRole(connectedBoundPort);
- }
- }
- }
+ // now re-target connectors towards this part
+ TemplateUtils.retargetConnectors(tmComponent, tmConnectorPart);
return tmConnectorPart;
}
@@ -465,9 +451,7 @@ public class ConnectorReification {
for(Slot slot : compositeIS.getSlots()) {
if(slot.getDefiningFeature() == otherPart) {
InstanceSpecification containedInstance = DepUtils.getInstance(slot);
- // TODO: too complicated, if the non-connector is a composite as well, it must be clearly allocated
- EList<InstanceSpecification> nodes = AllocUtils.getAllNodesForPort(
- containedInstance, otherPort);
+ EList<InstanceSpecification> nodes = AllocUtils.getAllNodesForPort(containedInstance, otherPort);
AllocUtils.propagateNodesViaPort(
DepUtils.getInstance(partSlot), myPort, nodes);
break;
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/ContainerTrafo.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/ContainerTrafo.java
index 40d7e55ae02..41364c8b593 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/ContainerTrafo.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/ContainerTrafo.java
@@ -21,10 +21,15 @@ import java.util.Map;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.FCM.BindTemplate;
import org.eclipse.papyrus.FCM.ContainerRule;
+import org.eclipse.papyrus.FCM.ContainerRuleKind;
import org.eclipse.papyrus.FCM.InteractionComponent;
import org.eclipse.papyrus.FCM.InterceptionKind;
import org.eclipse.papyrus.FCM.InterceptionRule;
+import org.eclipse.papyrus.FCM.Singleton;
+import org.eclipse.papyrus.FCM.util.FCMUtil;
+import org.eclipse.papyrus.FCM.util.MapUtil;
import org.eclipse.papyrus.qompass.designer.core.ConnectorUtils;
import org.eclipse.papyrus.qompass.designer.core.Messages;
import org.eclipse.papyrus.qompass.designer.core.PortUtils;
@@ -33,7 +38,6 @@ import org.eclipse.papyrus.qompass.designer.core.Utils;
import org.eclipse.papyrus.qompass.designer.core.acceleo.UMLTool;
import org.eclipse.papyrus.qompass.designer.core.deployment.DepCreation;
import org.eclipse.papyrus.qompass.designer.core.deployment.DepUtils;
-import org.eclipse.papyrus.qompass.designer.core.deployment.DeployConstants;
import org.eclipse.papyrus.qompass.designer.core.templates.TemplateInstantiation;
import org.eclipse.papyrus.qompass.designer.core.templates.TemplateUtils;
import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
@@ -46,11 +50,11 @@ import org.eclipse.uml2.uml.EncapsulatedClassifier;
import org.eclipse.uml2.uml.Feature;
import org.eclipse.uml2.uml.InstanceSpecification;
import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.PackageableElement;
import org.eclipse.uml2.uml.Port;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.Slot;
import org.eclipse.uml2.uml.TemplateBinding;
+import org.eclipse.uml2.uml.TemplateParameter;
import org.eclipse.uml2.uml.TemplateSignature;
import org.eclipse.uml2.uml.Type;
import org.eclipse.uml2.uml.UMLPackage;
@@ -98,17 +102,31 @@ public class ContainerTrafo extends AbstractContainerTrafo {
*/
@Override
public void createContainer(Class smComponent, Class tmComponent) throws TransformationException {
- Package tmPkgOwner = tmComponent.getNearestPackage();
- // create a container with the suitable postfix
+ Package tmPkgOwner;
+ if (tmComponent.eResource() == tmCDP.eResource()) {
+ // tmComponent is in same model as tmContainer
+ tmPkgOwner = tmComponent.getNearestPackage();
+ }
+ else {
+ // tmComponent is not a member of the target model. This is the case, if tmComponent is
+ // in an imported model that has not been copied during the transformation towards an intermediate
+ // model.
+ tmPkgOwner = MapUtil.getAndCreate(Utils.getTop(tmCDP), tmComponent.allNamespaces(), true);
+ }
+ // create a container with the suitable postfix
tmContainerImpl = tmPkgOwner.createOwnedClass(tmComponent.getName() + containerPostfix, false);
+
+ // Apply singleton to container, if original class is a singleton
+ boolean isSingleton = StereotypeUtil.isApplied(smComponent, Singleton.class);
+ if (isSingleton) {
+ StereotypeUtil.apply(tmContainerImpl, Singleton.class);
+ }
Copy.copyID(tmComponent, tmContainerImpl, containerPostfix);
// add part and slot corresponding to component;
executorPart = tmContainerImpl.createOwnedAttribute(executorPartName, tmComponent);
Copy.copyID(tmComponent, executorPart, "e"); //$NON-NLS-1$
- this.smClass = smComponent;
-
executorPart.setIsComposite(true);
// copy ports from the executor (tmComponent) to the container
@@ -118,7 +136,7 @@ public class ContainerTrafo extends AbstractContainerTrafo {
for(Port port : PortUtils.getAllPorts(tmComponent)) {
// copy port
if (port.getVisibility() == VisibilityKind.PUBLIC_LITERAL) {
- Port newPort = EcoreUtil.copy(port); // don't use E3CM copy, since this is not a copy from source to target model
+ Port newPort = EcoreUtil.copy(port); // don't use Qompass copy, since this is not a copy from source to target model
tmContainerImpl.getOwnedAttributes().add(newPort);
StUtils.copyStereotypes(port, newPort);
@@ -190,26 +208,17 @@ public class ContainerTrafo extends AbstractContainerTrafo {
// containers.put(tmComponent, this);
EList<Slot> connectorSlots = new BasicEList<Slot>();
+ executorIS = tmIS;
// now create instances for the contained elements
for(Property extensionPart : tmContainerImpl.getAttributes()) {
Type tmContainerExtImpl = extensionPart.getType();
if(tmContainerExtImpl instanceof Class) {
- if (DepUtils.getSlot(executorIS, extensionPart) == null) {
+ if (DepUtils.getSlot(containerIS, extensionPart) == null) {
// no slot for part exists => assume that the part has been added by the container and create an instance specification for it.
- String isName;
InstanceSpecification containerExtIS = null;
- if(Utils.isSingleton((Class)tmContainerExtImpl)) {
- // is a singleton - exactly one instance exists
- // use a common instance prefix for singletons
- isName = DeployConstants.singletonPrefix + extensionPart.getName();
- PackageableElement pe = tmCDP.getPackagedElement(isName);
- if (pe instanceof InstanceSpecification) {
- containerExtIS = (InstanceSpecification) pe;
- }
- }
- else {
- isName = containerIS.getName() + "." + extensionPart.getName(); //$NON-NLS-1$
- }
+
+ String isName = containerIS.getName() + "." + extensionPart.getName(); //$NON-NLS-1$
+
// create sub-instance and slot for extensions
if (containerExtIS == null) {
containerExtIS = DepCreation.createDepPlan(tmCDP, (Class)tmContainerExtImpl, isName, false);
@@ -304,23 +313,21 @@ public class ContainerTrafo extends AbstractContainerTrafo {
// DepUtils.chooseImplementation((Class) type,
// new BasicEList<InstanceSpecification>(), false);
- if(StereotypeUtil.isApplied(extOrInterceptor, InteractionComponent.class)) {
+ if(StereotypeUtil.isApplied(part, InterceptionRule.class)) {
+ if(StereotypeUtil.isApplied(extOrInterceptor, InteractionComponent.class)) {
- InterceptionRule interceptionRule = UMLUtil.getStereotypeApplication(part, InterceptionRule.class);
- InterceptionKind interceptionKind = InterceptionKind.INTERCEPT_ALL; // default: intercept all ports
- EList<Feature> interceptFeatures = null;
- if(interceptionRule != null) {
- interceptionKind = interceptionRule.getInterceptionKind();
- interceptFeatures = interceptionRule.getInterceptionSet();
- }
- EList<Property> interceptorParts =
+ InterceptionRule interceptionRule = UMLUtil.getStereotypeApplication(part, InterceptionRule.class);
+ InterceptionKind interceptionKind = interceptionRule.getInterceptionKind();
+ EList<Feature> interceptFeatures = interceptionRule.getInterceptionSet();
+ EList<Property> interceptorParts =
expandInterceptorExtension(interceptionKind, interceptFeatures, extOrInterceptor, tmComponent);
- interceptorPartsMap.put(part, interceptorParts);
- }
- else if(StereotypeUtil.isApplied(part, InterceptionRule.class)) {
- throw new TransformationException(String.format(
- Messages.ContainerTrafo_InterceptionRuleButNoInterceptor,
- part.getName(), smContainerRule.getBase_Class().getName()));
+ interceptorPartsMap.put(part, interceptorParts);
+ }
+ else {
+ throw new TransformationException(String.format(
+ Messages.ContainerTrafo_InterceptionRuleButNoInterceptor,
+ part.getName(), smContainerRule.getBase_Class().getName()));
+ }
}
else {
Property extensionPart =
@@ -333,7 +340,8 @@ public class ContainerTrafo extends AbstractContainerTrafo {
}
}
createConnectorForAssociations();
- // tell copy that tmcontainerImpl is associated with the smContainerRule
+
+ // tell copier that tmcontainerImpl is associated with the smContainerRule
// register a package template (although it is not a template) to assure that the connectors
// get copied, although they are in a different resource (only the connectors are copied, not
// the types of the referenced parts).
@@ -375,6 +383,8 @@ public class ContainerTrafo extends AbstractContainerTrafo {
}
}
copy.setPackageTemplate(null, null);
+
+ TemplateUtils.retargetConnectors(tmContainerImpl);
}
/**
@@ -392,15 +402,62 @@ public class ContainerTrafo extends AbstractContainerTrafo {
if(signature == null) {
// no template signature, just copy the container extension into the target model
tmContainerExtImpl = copy.getCopy(smContainerExtImpl);
- } else {
- // template signature found, instantiate container extension via the
- // template binding mechanism
- TemplateBinding binding = TemplateUtils.fixedBinding(copy.target, smContainerExtImpl, tmComponent);
+ }
+ else {
+ // template signature found, instantiate container extension via template binding mechanism
+ Classifier actual;
+ if (StereotypeUtil.isApplied(smExtensionPart, BindTemplate.class)) {
+ BindTemplate bt = UMLUtil.getStereotypeApplication(smExtensionPart, BindTemplate.class);
+ // use explicit binding from stereotype
+ actual = (Classifier) bt.getActual().get(0);
+ }
+ else {
+ // use executor component as actual
+ actual = tmComponent;
+ }
+ // template signature and instantiate container extension via the
+ // template binding mechanism, use executor component as actual
+ TemplateBinding binding = TemplateUtils.fixedBinding(copy.target, smContainerExtImpl, actual);
Object[] args = new Object[]{};
TemplateInstantiation ti = new TemplateInstantiation(copy, binding, args);
tmContainerExtImpl = (Class)ti.bindNamedElement(smContainerExtImpl);
}
+ // --------------------------------------------------
+ // a container extension could be subject to container rules as well, i.e. need
+ // to handle recursive rule application.
+ EList<ContainerRule> rules = FCMUtil.getAllContainerRules(smContainerExtImpl);
+
+ // get container trafo instance, if already existing
+ AbstractContainerTrafo containerTrafo = ContainerTrafo.get(tmContainerExtImpl);
+
+ if(containerTrafo == null) {
+ // no container exists, check rules and create eventually
+ for(ContainerRule rule : rules) {
+ if(RuleManagement.isRuleActive(rule)) {
+ // at least one active rule => create container (or get previously instantiated))
+ if(containerTrafo == null) {
+ if(rule.getKind() == ContainerRuleKind.LIGHT_WEIGHT_OO_RULE) {
+ throw new TransformationException("Recursive lightweight container rules currently not supported");
+ }
+ else {
+ containerTrafo = new ContainerTrafo(copy, tmCDP, null);
+ }
+ containerTrafo.createContainer(smContainerExtImpl, tmContainerExtImpl);
+ }
+ else {
+ // configure only??
+ }
+ containerTrafo.applyRule(rule, smContainerExtImpl, tmContainerExtImpl);
+ }
+ }
+ if (containerTrafo != null) {
+ containerTrafo.finalize();
+ tmContainerExtImpl = ((ContainerTrafo) containerTrafo).getContainer();
+ }
+ }
+ // --------------------------------------------------
+
// add part associated with the extension to the container
extensionPart = tmContainerImpl.createOwnedAttribute(name, tmContainerExtImpl);
@@ -408,6 +465,7 @@ public class ContainerTrafo extends AbstractContainerTrafo {
extensionPart.setAggregation(smExtensionPart.getAggregation());
Copy.copyMultElemModifiers(smExtensionPart, extensionPart);
Copy.copyFeatureModifiers(smExtensionPart, extensionPart);
+
return extensionPart;
}
@@ -436,13 +494,27 @@ public class ContainerTrafo extends AbstractContainerTrafo {
if(extKind == InterceptionKind.INTERCEPT_ALL_IN) {
// IN-PORT = provided port
match = (PortUtils.getProvided(port) != null);
- } else if(extKind == InterceptionKind.INTERCEPT_ALL_OUT) {
+ }
+ else if(extKind == InterceptionKind.INTERCEPT_ALL_OUT) {
// IN-PORT = provided port
match = (PortUtils.getRequired(port) != null);
- } else if(extKind == InterceptionKind.INTERCEPT_SOME) {
+ }
+ else if(extKind == InterceptionKind.INTERCEPT_SOME) {
// comparison based on name, since in different models
match = (Utils.getNamedElementFromList(featureList, port.getName()) != null);
}
+ else if(extKind == InterceptionKind.INTERCEPT_MATCHING) {
+ EList<Port> interceptorPorts = PortUtils.getAllPorts(smContainerConnImpl);
+ match = false;
+ // get first port from interception connector that is typed with a template parameter
+ for (Port interceptorPort : interceptorPorts) {
+ if (interceptorPort.getType().getOwner() instanceof TemplateParameter) {
+ match = (PortUtils.getKind(port) == PortUtils.getKind(interceptorPort));
+ break;
+ }
+ }
+ }
+
// else INTERCEPT_ALL_PORT => match remains true
if(!match) {
// port does not match criterion, continue with next port
@@ -465,7 +537,7 @@ public class ContainerTrafo extends AbstractContainerTrafo {
throw new TransformationException(Messages.ContainerTrafo_CannotFindDelegationConn);
}
- interceptionConnector.setName(interceptorName + port.getName() + counter);
+ interceptionConnector.setName(interceptionName);
org.eclipse.papyrus.FCM.Connector fcmConn = StereotypeUtil.applyApp(interceptionConnector, org.eclipse.papyrus.FCM.Connector.class);
InteractionComponent fcmConnType = UMLUtil.getStereotypeApplication(smContainerConnImpl, InteractionComponent.class);
fcmConn.setIc(fcmConnType);
@@ -529,11 +601,12 @@ public class ContainerTrafo extends AbstractContainerTrafo {
/**
* Create an connector for parts that have an association. The rationale
- * behind this is
+ * behind this is support connections between the state machine in the container
+ * and the executor.
*
*/
public void createConnectorForAssociations() {
- // TODO: keep list of added parts, only recheck those!
+ // TODO: keep list of added parts, only re-check those!
for(Property part : Utils.getParts(tmContainerImpl)) {
if(part.getType() == null) {
@@ -595,7 +668,8 @@ public class ContainerTrafo extends AbstractContainerTrafo {
for (Port svcPort : containerSvc.getOwnedPorts()) {
if (PortUtils.matches(executorPort, svcPort, true)) {
// create connector
- Connector c = tmContainerImpl.createOwnedConnector("auto"); //$NON-NLS-1$
+ Connector c = tmContainerImpl.createOwnedConnector(
+ String.format("auto from %s to %s", executorPart.getName(), svcPart.getName())); //$NON-NLS-1$
ConnectorEnd ce1 = c.createEnd();
ConnectorEnd ce2 = c.createEnd();
ce1.setPartWithPort(executorPart);
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/Copy.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/Copy.java
index 790048a6f5d..b930350bf66 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/Copy.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/Copy.java
@@ -308,8 +308,20 @@ public class Copy extends Copier {
private Stack<Namespace> boundPackages;
+ /**
+ * Remove an element and its children from the map to enable subsequent copies, in particular if the
+ * same element (e.g. an operation) is bound multiple times within a template instantiation.
+ * TODO: there must be a better way to do this.
+ * @param element
+ */
public void removeForCopy(EObject element) {
templateMap.remove(element);
+ if(element instanceof Element) {
+ // also remove applied stereotypes
+ for (EObject stereoApplication : ((Element) element).getStereotypeApplications()) {
+ removeForCopy(stereoApplication);
+ }
+ }
EClass eClass = element.eClass();
for(int i = 0, size = eClass.getFeatureCount(); i < size; ++i)
{
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/InstantiateDepPlan.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/InstantiateDepPlan.java
index ff8779bb0f0..a1e27391ee8 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/InstantiateDepPlan.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/InstantiateDepPlan.java
@@ -199,17 +199,19 @@ public class InstantiateDepPlan {
InstanceConfigurator.onNodeModel = false;
MainModelTrafo mainModelTrafo = new MainModelTrafo(tmpCopy, tmCDP);
InstanceSpecification newRootIS = mainModelTrafo.transformInstance(rootIS, null);
- DeploymentPlan newCDP = StereotypeUtil.applyApp(tmCDP, DeploymentPlan.class);
- newCDP.setMainInstance(newRootIS);
monitor.worked(1);
// 1c: late bindings
// LateEval.bindLateOperations();
// 3: distribute to nodes
+ // UpdateDerivedInterfaces.updateIntfs(newRootIS);
+
ApplyInstanceConfigurators.applyInstanceConfigurators(newRootIS);
FlattenInteractionComponents.getInstance().flattenAssembly(newRootIS, null);
+
+ PropagateAllocationToSharedInstances.propagateAllocation(newRootIS);
String tmpPath = tmpMM.getPath(project, TEMP_MODEL_FOLDER, tmpModel.getName() + TEMP_MODEL_POSTFIX);
tmpMM.saveModel(tmpPath);
@@ -263,7 +265,9 @@ public class InstantiateDepPlan {
ILangSupport langSupport = LanguageSupport.getLangSupport(targetLanguage);
langSupport.resetConfigurationData();
- Deploy deploy = Deploy.distributeToNode(targetCopy, langSupport, node, nodeIndex, nodes.size(), newRootIS);
+ Deploy deploy = new Deploy(targetCopy, langSupport, node, nodeIndex, nodes.size());
+ InstanceSpecification nodeRootIS = deploy.distributeToNode(newRootIS);
+ UpdateDerivedInterfaces.updateIntfs(nodeRootIS);
if(monitor.isCanceled()) {
return;
@@ -275,11 +279,14 @@ public class InstantiateDepPlan {
// Due to the copying of imports, the top-level package has changed which implies that new
// derived interfaces are put into a different package and the derivedInterfaces package in
// the original root becomes obsolete. Delete this obsolete package, if existing.
- NamedElement derivedInterfaces = Utils.getQualifiedElement(genModel, "root::derivedInterfaces"); //$NON-NLS-1$
- if(derivedInterfaces instanceof Package) {
- derivedInterfaces.destroy();
+ for (PackageableElement pe : genModel.getPackagedElements()) {
+ if (pe instanceof Package) {
+ NamedElement derivedInterfaces = ((Package) pe).getPackagedElement("derivedInterfaces"); //$NON-NLS-1$
+ if(derivedInterfaces instanceof Package) {
+ derivedInterfaces.destroy();
+ }
+ }
}
-
// 2c: add get_p/connect_q operations
// caveat: may modify imported classes
CompImplTrafos.bootloader = deploy.getBootloader();
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/LWContainerTrafo.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/LWContainerTrafo.java
index d47ec6d4196..75b169e87ab 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/LWContainerTrafo.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/LWContainerTrafo.java
@@ -109,7 +109,6 @@ public class LWContainerTrafo extends AbstractContainerTrafo {
// => clarify, how container handles super-classes, i.e. if it inherits ports as well (from a container of the abstract component) or not (not trivial at all!)
// TODO: don't copy derived operations
- this.smClass = smClass;
this.tmClass = tmClass;
// create a copy of all operations
operations = new BasicEList<Operation>(smClass.getAllOperations());
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/MainModelTrafo.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/MainModelTrafo.java
index 8bfea62d6af..da469b85d09 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/MainModelTrafo.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/MainModelTrafo.java
@@ -182,8 +182,19 @@ public class MainModelTrafo {
}
String instName = smIS.getName();
+ // first check, if instance specification exists already. This may be the case for explicitly modeled singleton instances.
InstanceSpecification tmIS = (InstanceSpecification)
- tmCDP.createPackagedElement(instName, UMLPackage.eINSTANCE.getInstanceSpecification());
+ tmCDP.getPackagedElement(instName);
+ if (tmIS == null) {
+ tmIS = (InstanceSpecification)
+ tmCDP.createPackagedElement(instName, UMLPackage.eINSTANCE.getInstanceSpecification());
+ }
+ if (smDF == null) {
+ // no defining feature => must be main instance
+ // => apply deployment plan stereotype and set main instance
+ DeploymentPlan newCDP = StereotypeUtil.applyApp(tmCDP, DeploymentPlan.class);
+ newCDP.setMainInstance(tmIS);
+ }
Class tmComponent = copy.getCopy(smComponent);
if(tmComponent == null) {
@@ -238,7 +249,13 @@ public class MainModelTrafo {
// copy node allocation
for(InstanceSpecification smNode : AllocUtils.getNodes(smIS)) {
InstanceSpecification tmNode = copy.getCopy(smNode);
- AllocUtils.allocate(tmIS, tmNode);
+ if (containerIS != null) {
+ // allocate container instead of executor.
+ AllocUtils.allocate(containerIS, tmNode);
+ }
+ else {
+ AllocUtils.allocate(tmIS, tmNode);
+ }
if(!nodeHandled.containsKey(tmNode)) {
// check if node (on an instance level) has already been treated. This is required, since many
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/PropagateAllocationToSharedInstances.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/PropagateAllocationToSharedInstances.java
new file mode 100644
index 00000000000..cc34e630d6e
--- /dev/null
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/PropagateAllocationToSharedInstances.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * 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:
+ * Ansgar Radermacher ansgar.radermacher@cea.fr
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.qompass.designer.core.transformations;
+
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.UniqueEList;
+import org.eclipse.papyrus.qompass.designer.core.Log;
+import org.eclipse.papyrus.qompass.designer.core.deployment.AllocUtils;
+import org.eclipse.papyrus.qompass.designer.core.deployment.DepUtils;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.Slot;
+
+
+/**
+ * Propagate allocation to shared instances: if a class references another instance
+ * via sharing, the shared instance must be allocated on the node of the referencing
+ * class as well.
+ *
+ */
+public class PropagateAllocationToSharedInstances {
+ public static void propagateAllocation(InstanceSpecification instance) {
+ propagateAllocation(instance, new UniqueEList<InstanceSpecification>());
+ }
+
+ public static void propagateAllocation(InstanceSpecification instance, EList<InstanceSpecification> nodes) {
+ // create copy of node (otherwise, more and more nodes get aggregated.
+ UniqueEList<InstanceSpecification> nodesCopy = new UniqueEList<InstanceSpecification>();
+ nodesCopy.addAll(nodes);
+ nodesCopy.addAll(AllocUtils.getNodes(instance));
+ for (Slot slot : instance.getSlots()) {
+ InstanceSpecification subInstance = DepUtils.getInstance(slot);
+ if (subInstance != null) {
+ if (DepUtils.isShared(slot)) {
+ for (InstanceSpecification node : nodesCopy) {
+ Log.log(Status.INFO, Log.DEPLOYMENT, String.format("Propagate node allocation: %s to %s", subInstance.getName(), node.getName())); //$NON-NLS-1$
+ AllocUtils.allocate(subInstance, node);
+ }
+ }
+ else {
+ propagateAllocation(subInstance, nodesCopy);
+ }
+ }
+ }
+ }
+}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/UpdateDerivedInterfaces.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/UpdateDerivedInterfaces.java
new file mode 100644
index 00000000000..1bec8c88131
--- /dev/null
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/UpdateDerivedInterfaces.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * 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:
+ * Ansgar Radermacher ansgar.radermacher@cea.fr
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.qompass.designer.core.transformations;
+
+import org.eclipse.papyrus.qompass.designer.core.deployment.DepUtils;
+import org.eclipse.papyrus.qompass.designer.core.sync.CompImplSync;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Classifier;
+import org.eclipse.uml2.uml.InstanceSpecification;
+import org.eclipse.uml2.uml.Slot;
+
+
+/**
+ * Update derived interfaces of ports. This is required, since the Copier does not follow references
+ * that are referenced via a derived attribute. Derived attributes are used for provided and required
+ * interfaces in the stereotype attributes of an FCM port. Thus, required (derived) interfaces would be
+ * unavailable in the copy, if not explicitly updated.
+ * However, the provided interface is not concerned as it appears in an "implements" relation. If the
+ * port is connected, the used interface of one port is the provided interface of the port counter part.
+ * Thus, the explicit update done by this function is not needed in most cases.
+ *
+ * see also FixTemplateSync (remove the latter?)
+ */
+public class UpdateDerivedInterfaces {
+ public static void updateIntfs(InstanceSpecification instance) {
+ Classifier cl = DepUtils.getClassifier(instance);
+ if (cl instanceof Class) {
+ Class implementation = (Class) cl;
+ CompImplSync.updatePorts(implementation);
+ CompImplSync.syncRealizations(implementation);
+ }
+ for (Slot slot : instance.getSlots()) {
+ InstanceSpecification subInstance = DepUtils.getInstance(slot);
+ if (!DepUtils.isShared(slot) && (subInstance != null)) {
+ updateIntfs(subInstance);
+ }
+ }
+ }
+}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/filters/FilterStateMachines.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/filters/FilterStateMachines.java
index caa2cd88daa..1dd7b5ce874 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/filters/FilterStateMachines.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core/src/org/eclipse/papyrus/qompass/designer/core/transformations/filters/FilterStateMachines.java
@@ -16,12 +16,14 @@ package org.eclipse.papyrus.qompass.designer.core.transformations.filters;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.qompass.designer.core.StUtils;
import org.eclipse.papyrus.qompass.designer.core.listeners.CopyListener;
import org.eclipse.papyrus.qompass.designer.core.transformations.Copy;
import org.eclipse.uml2.uml.Behavior;
import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Parameter;
import org.eclipse.uml2.uml.Region;
import org.eclipse.uml2.uml.StateMachine;
import org.eclipse.uml2.uml.Transition;
@@ -76,6 +78,11 @@ public class FilterStateMachines implements CopyListener {
return;
}
Operation operation = tmClass.createOwnedOperation(newName, null, null);
+ for (Parameter parameter : effect.getOwnedParameters()) {
+ Parameter newParameter = EcoreUtil.copy(parameter);
+ operation.getOwnedParameters().add(newParameter);
+ StUtils.copyStereotypes(parameter, newParameter);
+ }
copiedEffect.setSpecification(operation);
copiedEffect.setName(newName);
tmClass.getOwnedBehaviors().add(copiedEffect);
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/AllocationDialog.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/AllocationDialog.java
index debfcb26bab..ad0af39eea6 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/AllocationDialog.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui/src/org/eclipse/papyrus/qompass/designer/ui/dialogs/AllocationDialog.java
@@ -70,7 +70,6 @@ public class AllocationDialog extends SelectionStatusDialog {
public AllocationDialog(Shell parent, Package cdp) {
super(parent);
- // m_cdp = cdp;
m_cdp = UMLUtil.getStereotypeApplication(cdp, DeploymentPlan.class);
nodeOrThreadList = new BasicEList<InstanceSpecification>();
nodeOrThreadList.add(null); // dummy entry for no allocation
@@ -173,7 +172,7 @@ public class AllocationDialog extends SelectionStatusDialog {
setTextFromData(item);
// create children
- for(InstanceSpecification subIS : DepUtils.getContainedInstances(is)) {
+ for(InstanceSpecification subIS : DepUtils.getContainedNonSharedInstances(is)) {
fillTree(tree, item, subIS);
}
}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/META-INF/MANIFEST.MF b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/META-INF/MANIFEST.MF
index 24da025656b..c6c2f8d918a 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/META-INF/MANIFEST.MF
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/META-INF/MANIFEST.MF
@@ -8,7 +8,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.uml2.uml;bundle-version="4.0.0",
org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0",
org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0"
-Export-Package: org.eclipse.papyrus.qompass.modellibs.core
+Export-Package: org.eclipse.papyrus.qompass.modellibs.core,
+ org.eclipse.papyrus.qompass.modellibs.core.acceleo
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.0.0.qualifier
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/build.acceleo b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/build.acceleo
index b9a612c8c60..c54d6aa1121 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/build.acceleo
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/build.acceleo
@@ -18,7 +18,7 @@
<acceleoCompiler
sourceFolder="${target.folder}"
outputFolder="${target.folder}"
- dependencies="${target.folder}/../../org.eclipse.papyrus.fcm.profile;${target.folder}/../../org.eclipse.papyrus.infra.core.sasheditor;${target.folder}/../../org.eclipse.papyrus.infra.core.sasheditor.di;${target.folder}/../../org.eclipse.papyrus.qompass.designer.core;${target.folder}/../../org.eclipse.papyrus.qompass.designer.vsl;${target.folder}/../../org.eclipse.papyrus.cpp.profile;${target.folder}/../../org.eclipse.papyrus.acceleo;${target.folder}/../../org.eclipse.papyrus.infra.widgets.toolbox;"
+ dependencies="${target.folder}/../../org.eclipse.papyrus.fcm.profile;${target.folder}/../../org.eclipse.papyrus.qompass.designer.core;${target.folder}/../../org.eclipse.papyrus.qompass.designer.vsl;${target.folder}/../../org.eclipse.papyrus.cpp.profile;${target.folder}/../../org.eclipse.papyrus.acceleo;"
binaryResource="false"
packagesToRegister="">
</acceleoCompiler>
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/models/examples/HelloWorld.notation b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/models/examples/HelloWorld.notation
index 3afc39afe8c..00866a49ece 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/models/examples/HelloWorld.notation
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/models/examples/HelloWorld.notation
@@ -37,6 +37,10 @@
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KU5Y0lT0EeKvFeqt5Q_lqw" key="PropStereoDisplay" value=""/>
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KU5Y01T0EeKvFeqt5Q_lqw" key="StereotypePropertyLocation" value="Compartment"/>
</eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4k6AsHk1EeOph7IIHUnNoA" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_4k7O0Hk1EeOph7IIHUnNoA" key="fillColor" value="true"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_4urnwHk1EeOph7IIHUnNoA" key="gradient" value="true"/>
+ </eAnnotations>
<children xmi:type="notation:DecorationNode" xmi:id="_8rHJYFTzEeKvFeqt5Q_lqw" type="5126">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_CBQusFT0EeKvFeqt5Q_lqw" source="CustomAppearance_Annotation">
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CGsoUFT0EeKvFeqt5Q_lqw" key="CustomAppearance_MaskValue" value="28"/>
@@ -76,7 +80,7 @@
<children xmi:type="notation:DecorationNode" xmi:id="_6UflIVWUEeKdxoQIVxFNNg" type="5125">
<layoutConstraint xmi:type="notation:Location" xmi:id="_6UflIlWUEeKdxoQIVxFNNg" x="25" y="3"/>
</children>
- <children xmi:type="notation:DecorationNode" xmi:id="_6UflI1WUEeKdxoQIVxFNNg" type="6029">
+ <children xmi:type="notation:DecorationNode" xmi:id="_6UflI1WUEeKdxoQIVxFNNg" visible="false" type="6029">
<layoutConstraint xmi:type="notation:Location" xmi:id="_6UflJFWUEeKdxoQIVxFNNg" x="25" y="-10"/>
</children>
<element xmi:type="uml:Port" href="pathmap://QML_CORE/core.uml#_OfiosJsrEd61Eo3nmu3JhQ"/>
@@ -162,7 +166,7 @@
<children xmi:type="notation:DecorationNode" xmi:id="_wd891lWUEeKdxoQIVxFNNg" type="5125">
<layoutConstraint xmi:type="notation:Location" xmi:id="_wd9k4FWUEeKdxoQIVxFNNg" x="25" y="3"/>
</children>
- <children xmi:type="notation:DecorationNode" xmi:id="_wd9k4VWUEeKdxoQIVxFNNg" type="6029">
+ <children xmi:type="notation:DecorationNode" xmi:id="_wd9k4VWUEeKdxoQIVxFNNg" visible="false" type="6029">
<layoutConstraint xmi:type="notation:Location" xmi:id="_wd9k4lWUEeKdxoQIVxFNNg" x="25" y="-10"/>
</children>
<element xmi:type="uml:Port" href="pathmap://QML_CORE/core.uml#_OfiosJsrEd61Eo3nmu3JhQ"/>
@@ -227,6 +231,10 @@
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_XsTi5NHtEd-A1oPfP47IaQ" source="QualifiedName">
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XsTi5dHtEd-A1oPfP47IaQ" key="QualifiedNameDepth" value="1000"/>
</eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6iThgHk1EeOph7IIHUnNoA" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6iUvoHk1EeOph7IIHUnNoA" key="fillColor" value="true"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6o-xQHk1EeOph7IIHUnNoA" key="gradient" value="true"/>
+ </eAnnotations>
<children xmi:type="notation:DecorationNode" xmi:id="_XsTi5tHtEd-A1oPfP47IaQ" type="5126">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_yonwwFTzEeKvFeqt5Q_lqw" source="CustomAppearance_Annotation">
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yzIXoFTzEeKvFeqt5Q_lqw" key="CustomAppearance_MaskValue" value="28"/>
@@ -298,6 +306,10 @@
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ZQkTYVWjEeKOivupHOJ8Ew" source="QualifiedName">
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ZQkTYlWjEeKOivupHOJ8Ew" key="QualifiedNameDepth" value="1000"/>
</eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_8slAsHk1EeOph7IIHUnNoA" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8slnwHk1EeOph7IIHUnNoA" key="fillColor" value="true"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8-kvoHk1EeOph7IIHUnNoA" key="gradient" value="true"/>
+ </eAnnotations>
<children xmi:type="notation:DecorationNode" xmi:id="_ZQkTY1WjEeKOivupHOJ8Ew" type="5040"/>
<children xmi:type="notation:BasicCompartment" xmi:id="_ZQkTZFWjEeKOivupHOJ8Ew" type="7035">
<children xmi:type="notation:Shape" xmi:id="_ET2zcFWkEeKOivupHOJ8Ew" type="3030" fontName="Sans Serif" lineColor="0">
@@ -322,6 +334,10 @@
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Z7UglFWjEeKOivupHOJ8Ew" source="QualifiedName">
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Z7UglVWjEeKOivupHOJ8Ew" key="QualifiedNameDepth" value="1000"/>
</eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_8smO0nk1EeOph7IIHUnNoA" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8smO03k1EeOph7IIHUnNoA" key="fillColor" value="true"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8-nL4Hk1EeOph7IIHUnNoA" key="gradient" value="true"/>
+ </eAnnotations>
<children xmi:type="notation:DecorationNode" xmi:id="_Z7UgllWjEeKOivupHOJ8Ew" type="5040"/>
<children xmi:type="notation:BasicCompartment" xmi:id="_Z7Ugl1WjEeKOivupHOJ8Ew" type="7035">
<children xmi:type="notation:Shape" xmi:id="_6VXKAFWjEeKOivupHOJ8Ew" type="3030" fontName="Sans Serif" lineColor="0">
@@ -346,6 +362,10 @@
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_85kzNFWjEeKOivupHOJ8Ew" source="QualifiedName">
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_85kzNVWjEeKOivupHOJ8Ew" key="QualifiedNameDepth" value="1000"/>
</eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_8smO0Hk1EeOph7IIHUnNoA" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8smO0Xk1EeOph7IIHUnNoA" key="fillColor" value="true"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_8-l9wHk1EeOph7IIHUnNoA" key="gradient" value="true"/>
+ </eAnnotations>
<children xmi:type="notation:DecorationNode" xmi:id="_85kzNlWjEeKOivupHOJ8Ew" type="5040"/>
<children xmi:type="notation:BasicCompartment" xmi:id="_85kzN1WjEeKOivupHOJ8Ew" visible="false" type="7035">
<styles xmi:type="notation:TitleStyle" xmi:id="_85laQFWjEeKOivupHOJ8Ew"/>
@@ -454,6 +474,10 @@
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4HMOdDefEeGPyrZ5I3hMlA" source="QualifiedName">
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_4HMOdTefEeGPyrZ5I3hMlA" key="QualifiedNameDepth" value="1000"/>
</eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__C2UgHk1EeOph7IIHUnNoA" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="__C2UgXk1EeOph7IIHUnNoA" key="fillColor" value="true"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="__Oj1QHk1EeOph7IIHUnNoA" key="gradient" value="true"/>
+ </eAnnotations>
<children xmi:type="notation:DecorationNode" xmi:id="_4HMOdjefEeGPyrZ5I3hMlA" type="5126">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ENwn8FWjEeKOivupHOJ8Ew" source="CustomAppearance_Annotation">
<details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EUBoAFWjEeKOivupHOJ8Ew" key="CustomAppearance_MaskValue" value="28"/>
@@ -464,7 +488,7 @@
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_4HMOeTefEeGPyrZ5I3hMlA"/>
</children>
<element xmi:type="uml:Property" href="HelloWorld.uml#_4HAoQDefEeGPyrZ5I3hMlA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4HLnYTefEeGPyrZ5I3hMlA" x="61" y="22" width="162"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4HLnYTefEeGPyrZ5I3hMlA" x="49" y="22" width="190"/>
</children>
<styles xmi:type="notation:TitleStyle" xmi:id="_1w2pODefEeGPyrZ5I3hMlA"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_1w2pOTefEeGPyrZ5I3hMlA"/>
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/models/library/fifo.notation b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/models/library/fifo.notation
index 9f4fa25c06a..3e1ac463e04 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/models/library/fifo.notation
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/models/library/fifo.notation
@@ -49,7 +49,7 @@
</eAnnotations>
<layoutConstraint xmi:type="notation:Location" xmi:id="_tAInECiLEeC_VbmKpDkWDw" x="19"/>
</children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_tAInESiLEeC_VbmKpDkWDw" type="6029">
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tAInESiLEeC_VbmKpDkWDw" visible="false" type="6029">
<layoutConstraint xmi:type="notation:Location" xmi:id="_tAInEiiLEeC_VbmKpDkWDw" x="25" y="-10"/>
</children>
<element xmi:type="uml:Port" href="fifo.uml#_xHb7MHLmEd6R5tffIPrlPg"/>
@@ -78,7 +78,7 @@
</eAnnotations>
<layoutConstraint xmi:type="notation:Location" xmi:id="_KnMOhTFrEeCz5-DK9j5azg" x="-45"/>
</children>
- <children xmi:type="notation:DecorationNode" xmi:id="_KnMOhjFrEeCz5-DK9j5azg" type="6029">
+ <children xmi:type="notation:DecorationNode" xmi:id="_KnMOhjFrEeCz5-DK9j5azg" visible="false" type="6029">
<layoutConstraint xmi:type="notation:Location" xmi:id="_KnMOhzFrEeCz5-DK9j5azg" x="25" y="-10"/>
</children>
<element xmi:type="uml:Port" href="fifo.uml#_xcu1wHLmEd6R5tffIPrlPg"/>
@@ -132,7 +132,7 @@
</eAnnotations>
<layoutConstraint xmi:type="notation:Location" xmi:id="_tALDRCiLEeC_VbmKpDkWDw" x="28" y="2"/>
</children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_tALDRSiLEeC_VbmKpDkWDw" type="6029">
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tALDRSiLEeC_VbmKpDkWDw" visible="false" type="6029">
<layoutConstraint xmi:type="notation:Location" xmi:id="_tALDRiiLEeC_VbmKpDkWDw" x="25" y="-10"/>
</children>
<element xmi:type="uml:Port" href="fifo.uml#_xHb7MHLmEd6R5tffIPrlPg"/>
@@ -161,7 +161,7 @@
</eAnnotations>
<layoutConstraint xmi:type="notation:Location" xmi:id="_ItZbUzFrEeCz5-DK9j5azg" x="-54" y="2"/>
</children>
- <children xmi:type="notation:DecorationNode" xmi:id="_ItZbVDFrEeCz5-DK9j5azg" type="6029">
+ <children xmi:type="notation:DecorationNode" xmi:id="_ItZbVDFrEeCz5-DK9j5azg" visible="false" type="6029">
<layoutConstraint xmi:type="notation:Location" xmi:id="_ItZbVTFrEeCz5-DK9j5azg" x="25" y="-10"/>
</children>
<element xmi:type="uml:Port" href="fifo.uml#_TRsvoHLoEd6R5tffIPrlPg"/>
@@ -208,7 +208,7 @@
</eAnnotations>
<layoutConstraint xmi:type="notation:Location" xmi:id="_tALDXCiLEeC_VbmKpDkWDw" x="19" y="1"/>
</children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_tALDXSiLEeC_VbmKpDkWDw" type="6029">
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tALDXSiLEeC_VbmKpDkWDw" visible="false" type="6029">
<layoutConstraint xmi:type="notation:Location" xmi:id="_tALDXiiLEeC_VbmKpDkWDw" x="25" y="-10"/>
</children>
<element xmi:type="uml:Port" href="fifo.uml#_xHb7MHLmEd6R5tffIPrlPg"/>
@@ -255,7 +255,7 @@
</eAnnotations>
<layoutConstraint xmi:type="notation:Location" xmi:id="_tALqZSiLEeC_VbmKpDkWDw" x="-99" y="1"/>
</children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_tALqZiiLEeC_VbmKpDkWDw" type="6029">
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tALqZiiLEeC_VbmKpDkWDw" visible="false" type="6029">
<layoutConstraint xmi:type="notation:Location" xmi:id="_tALqZyiLEeC_VbmKpDkWDw" x="25" y="-10"/>
</children>
<element xmi:type="uml:Port" href="fifo.uml#_xcu1wHLmEd6R5tffIPrlPg"/>
@@ -302,7 +302,7 @@
</eAnnotations>
<layoutConstraint xmi:type="notation:Location" xmi:id="_tAMRbyiLEeC_VbmKpDkWDw" x="-99" y="1"/>
</children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_tAMRcCiLEeC_VbmKpDkWDw" type="6029">
+ <children xmi:type="notation:BasicCompartment" xmi:id="_tAMRcCiLEeC_VbmKpDkWDw" visible="false" type="6029">
<layoutConstraint xmi:type="notation:Location" xmi:id="_tAMRcSiLEeC_VbmKpDkWDw" x="25" y="-10"/>
</children>
<element xmi:type="uml:Port" href="fifo.uml#_TRsvoHLoEd6R5tffIPrlPg"/>
@@ -357,7 +357,7 @@
</eAnnotations>
<layoutConstraint xmi:type="notation:Location" xmi:id="_h-nfxS_fEeKl_vDGXh-OPw" x="25" y="3"/>
</children>
- <children xmi:type="notation:DecorationNode" xmi:id="_h-nfxi_fEeKl_vDGXh-OPw" type="6029">
+ <children xmi:type="notation:DecorationNode" xmi:id="_h-nfxi_fEeKl_vDGXh-OPw" visible="false" type="6029">
<layoutConstraint xmi:type="notation:Location" xmi:id="_h-nfxy_fEeKl_vDGXh-OPw" x="25" y="-10"/>
</children>
<element xmi:type="uml:Port" href="fifo.uml#_h9XikC_fEeKl_vDGXh-OPw"/>
@@ -393,7 +393,7 @@
</eAnnotations>
<layoutConstraint xmi:type="notation:Location" xmi:id="_jaeZxi_fEeKl_vDGXh-OPw" x="25" y="3"/>
</children>
- <children xmi:type="notation:DecorationNode" xmi:id="_jaeZxy_fEeKl_vDGXh-OPw" type="6029">
+ <children xmi:type="notation:DecorationNode" xmi:id="_jaeZxy_fEeKl_vDGXh-OPw" visible="false" type="6029">
<layoutConstraint xmi:type="notation:Location" xmi:id="_jaeZyC_fEeKl_vDGXh-OPw" x="25" y="-10"/>
</children>
<element xmi:type="uml:Port" href="fifo.uml#_jaXsEC_fEeKl_vDGXh-OPw"/>
@@ -1014,15 +1014,12 @@
</children>
<children xmi:type="notation:BasicCompartment" xmi:id="_BdhsB6_2EeC6ALhykKLu_g" type="7018">
<children xmi:type="notation:Shape" xmi:id="_ZFbm0AO7EeGb-spUJr9V6w" type="3013" fontName="Sans Serif" lineColor="0">
- <element xmi:type="uml:Operation" href="fifo.uml#_EYsdUP68Ed6Zw96O-tCw7A"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_ZFbm0QO7EeGb-spUJr9V6w"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_ZFcN4AO7EeGb-spUJr9V6w" type="3013" fontName="Sans Serif" lineColor="0">
- <element xmi:type="uml:Operation" href="fifo.uml#_EYx84P68Ed6Zw96O-tCw7A"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_ZFcN4QO7EeGb-spUJr9V6w"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_ZFdcAAO7EeGb-spUJr9V6w" type="3013" fontName="Sans Serif" lineColor="0">
- <element xmi:type="uml:Operation" href="fifo.uml#_AnQ3QBI9Ed-XjYZ05V-9-Q"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_ZFdcAQO7EeGb-spUJr9V6w"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_ZFeqIAO7EeGb-spUJr9V6w" type="3013" fontName="Sans Serif" lineColor="0">
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/models/library/fifo.uml b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/models/library/fifo.uml
index 64fc3e76565..18e902f0d79 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/models/library/fifo.uml
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/models/library/fifo.uml
@@ -125,7 +125,7 @@ if (m_filled &lt; m_size) {
<ownedComment xmi:type="uml:Comment" xmi:id="_K_UZoDF2EeCpQdhNuFCtew" annotatedElement="_Y1jF8HPpEd6R5tffIPrlPg">
<body>This is an implementation of a FIFO of a configurable size (default: 20 elements).</body>
</ownedComment>
- <packagedElement xmi:type="uml:Class" xmi:id="_Y1jF8HPpEd6R5tffIPrlPg" clientDependency="_y6XsAF72EeGerN33d-RdRg _ZR77QL5wEeKpNr0GJaRwvw _ZUSrsL5wEeKpNr0GJaRwvw" name="FIFO_impl">
+ <packagedElement xmi:type="uml:Class" xmi:id="_Y1jF8HPpEd6R5tffIPrlPg" clientDependency="_y6XsAF72EeGerN33d-RdRg" name="FIFO_impl">
<ownedComment xmi:type="uml:Comment" xmi:id="_EiDM8K_2EeC6ALhykKLu_g" annotatedElement="_XDRnoHUIEd6R5tffIPrlPg">
<body>Configuration attribute: the size of the FIFO
</body>
@@ -157,9 +157,11 @@ if (m_filled &lt; m_size) {
<supplier xmi:type="uml:Interface" href="pathmap://QML_CORE/sysinterfaces.uml#_T3li0Dz6Ed-v9PxuTj6Elw"/>
<contract xmi:type="uml:Interface" href="pathmap://QML_CORE/sysinterfaces.uml#_T3li0Dz6Ed-v9PxuTj6Elw"/>
</interfaceRealization>
- <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_ZR77QL5wEeKpNr0GJaRwvw" name="derived realization of D_Push_T" client="_Y1jF8HPpEd6R5tffIPrlPg" supplier="_ZQ2WIL5wEeKpNr0GJaRwvw" contract="_ZQ2WIL5wEeKpNr0GJaRwvw"/>
- <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_ZUSrsL5wEeKpNr0GJaRwvw" name="derived realization of D_PullConsumer_T" client="_Y1jF8HPpEd6R5tffIPrlPg" supplier="_ZSdfsL5wEeKpNr0GJaRwvw" contract="_ZSdfsL5wEeKpNr0GJaRwvw"/>
- <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="_FjGlgP69Ed6Zw96O-tCw7A" name="pull" specification="_EYx84P68Ed6Zw96O-tCw7A">
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="_FjGlgP69Ed6Zw96O-tCw7A" name="pull">
+ <ownedParameter xmi:type="uml:Parameter" xmi:id="_PYjMgIdsEeOIFtxdWqAdSw" name="ret" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_PYjzkIdsEeOIFtxdWqAdSw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_PYjzkYdsEeOIFtxdWqAdSw" value="1"/>
+ </ownedParameter>
<language>C/C++</language>
<body>if (m_filled > 0) {
int current_pos = m_pull_pos;
@@ -172,7 +174,11 @@ if (m_filled &lt; m_size) {
return m_fifo [current_pos];
}</body>
</ownedBehavior>
- <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="_IwXLsP69Ed6Zw96O-tCw7A" name="push" specification="_EYsdUP68Ed6Zw96O-tCw7A">
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="_IwXLsP69Ed6Zw96O-tCw7A" name="push">
+ <ownedParameter xmi:type="uml:Parameter" xmi:id="_PYEEUIdsEeOIFtxdWqAdSw" name="data">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_PYErYIdsEeOIFtxdWqAdSw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_PYErYYdsEeOIFtxdWqAdSw" value="1"/>
+ </ownedParameter>
<language>C/C++</language>
<body>// copy passed parameters ...
if (m_filled &lt; m_size) {
@@ -184,7 +190,11 @@ if (m_filled &lt; m_size) {
}
}</body>
</ownedBehavior>
- <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="__Ha0IBJHEd-XjYZ05V-9-Q" name="hasData" specification="_AnQ3QBI9Ed-XjYZ05V-9-Q">
+ <ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="__Ha0IBJHEd-XjYZ05V-9-Q" name="hasData">
+ <ownedParameter xmi:type="uml:Parameter" xmi:id="_PY4jsIdsEeOIFtxdWqAdSw" name="ret" direction="return">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_PY4jsYdsEeOIFtxdWqAdSw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_PY5KwIdsEeOIFtxdWqAdSw" value="1"/>
+ </ownedParameter>
<language>C/C++</language>
<body>return (m_filled > 0);</body>
</ownedBehavior>
@@ -201,36 +211,16 @@ if (m_size == 0) {
m_fifo = new [pkgTemplateParameter('T')+'[m_size]'/];
[/template]</body>
</ownedBehavior>
- <ownedOperation xmi:type="uml:Operation" xmi:id="_EYsdUP68Ed6Zw96O-tCw7A" name="push" method="_IwXLsP69Ed6Zw96O-tCw7A">
- <ownedParameter xmi:type="uml:Parameter" xmi:id="_EYtEYP68Ed6Zw96O-tCw7A" name="data" type="_j_050HLoEd6R5tffIPrlPg">
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_EYtEYf68Ed6Zw96O-tCw7A" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_EYtEYv68Ed6Zw96O-tCw7A" value="1"/>
- </ownedParameter>
- </ownedOperation>
- <ownedOperation xmi:type="uml:Operation" xmi:id="_EYx84P68Ed6Zw96O-tCw7A" name="pull" method="_FjGlgP69Ed6Zw96O-tCw7A">
- <ownedParameter xmi:type="uml:Parameter" xmi:id="_EYx84f68Ed6Zw96O-tCw7A" name="ret" type="_j_050HLoEd6R5tffIPrlPg" direction="return">
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_EYx84v68Ed6Zw96O-tCw7A" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_EYx84_68Ed6Zw96O-tCw7A" value="1"/>
- </ownedParameter>
- </ownedOperation>
- <ownedOperation xmi:type="uml:Operation" xmi:id="_AnQ3QBI9Ed-XjYZ05V-9-Q" name="hasData" method="__Ha0IBJHEd-XjYZ05V-9-Q">
- <ownedParameter xmi:type="uml:Parameter" xmi:id="_AtKsIBJXEd-QgZm_R1AKbA" name="ret" direction="return">
- <type xmi:type="uml:PrimitiveType" href="corba.uml#_Bv7l0B-VEd6nGq8wpI2tjg"/>
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_AtNIYBJXEd-QgZm_R1AKbA" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_AtNvcBJXEd-QgZm_R1AKbA" value="1"/>
- </ownedParameter>
- </ownedOperation>
<ownedOperation xmi:type="uml:Operation" xmi:id="_5IpEwK8xEeCXIcykFPsB8Q" name="activate" method="_QzOqwK8yEeCXIcykFPsB8Q"/>
<ownedOperation xmi:type="uml:Operation" xmi:id="_y7cqEF72EeGerN33d-RdRg" name="deactivate"/>
+ <ownedOperation xmi:type="uml:Operation" xmi:id="_PXutIIdsEeOIFtxdWqAdSw" name="configuration_complete"/>
</packagedElement>
- <packagedElement xmi:type="uml:Class" xmi:id="_dr0doDqNEeCd_O2fHA8dPg" clientDependency="_iR440L5wEeKpNr0GJaRwvw _iScScL5wEeKpNr0GJaRwvw" name="KeepLast">
+ <packagedElement xmi:type="uml:Class" xmi:id="_dr0doDqNEeCd_O2fHA8dPg" name="KeepLast">
<generalization xmi:type="uml:Generalization" xmi:id="_dr0dozqNEeCd_O2fHA8dPg" general="_wh_EwHLmEd6R5tffIPrlPg"/>
<ownedAttribute xmi:type="uml:Property" xmi:id="_dr0dqzqNEeCd_O2fHA8dPg" name="m_data" visibility="public" type="_j_050HLoEd6R5tffIPrlPg" isUnique="false" aggregation="composite">
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="_dr0drTqNEeCd_O2fHA8dPg" value="1"/>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_dr0drDqNEeCd_O2fHA8dPg" value="1"/>
</ownedAttribute>
- <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_iR440L5wEeKpNr0GJaRwvw" name="derived realization of D_Push_T" client="_dr0doDqNEeCd_O2fHA8dPg" supplier="_ZQ2WIL5wEeKpNr0GJaRwvw" contract="_ZQ2WIL5wEeKpNr0GJaRwvw"/>
- <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_iScScL5wEeKpNr0GJaRwvw" name="derived realization of D_PullConsumer_T" client="_dr0doDqNEeCd_O2fHA8dPg" supplier="_ZSdfsL5wEeKpNr0GJaRwvw" contract="_ZSdfsL5wEeKpNr0GJaRwvw"/>
<ownedBehavior xmi:type="uml:OpaqueBehavior" xmi:id="_dr0drjqNEeCd_O2fHA8dPg" name="pull">
<language>C/C++</language>
<body>return m_data;</body>
@@ -246,25 +236,6 @@ m_data = data;
<body>// only return true, once first data has been received
return true;</body>
</ownedBehavior>
- <ownedOperation xmi:type="uml:Operation" xmi:id="_iS924L5wEeKpNr0GJaRwvw" name="push">
- <ownedParameter xmi:type="uml:Parameter" xmi:id="_iTxvML5wEeKpNr0GJaRwvw" name="data" type="_j_050HLoEd6R5tffIPrlPg">
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iUYzML5wEeKpNr0GJaRwvw" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iUmOkL5wEeKpNr0GJaRwvw" value="1"/>
- </ownedParameter>
- </ownedOperation>
- <ownedOperation xmi:type="uml:Operation" xmi:id="_iVK2UL5wEeKpNr0GJaRwvw" name="pull">
- <ownedParameter xmi:type="uml:Parameter" xmi:id="_iV-uoL5wEeKpNr0GJaRwvw" name="ret" type="_j_050HLoEd6R5tffIPrlPg" direction="return">
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iWlLkL5wEeKpNr0GJaRwvw" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iWym8L5wEeKpNr0GJaRwvw" value="1"/>
- </ownedParameter>
- </ownedOperation>
- <ownedOperation xmi:type="uml:Operation" xmi:id="_iXWAkL5wEeKpNr0GJaRwvw" name="hasData">
- <ownedParameter xmi:type="uml:Parameter" xmi:id="_iYKf8L5wEeKpNr0GJaRwvw" name="ret" direction="return">
- <type xmi:type="uml:PrimitiveType" href="corba.uml#_Bv7l0B-VEd6nGq8wpI2tjg"/>
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_iYyLAL5wEeKpNr0GJaRwvw" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_iY_mYL5wEeKpNr0GJaRwvw" value="1"/>
- </ownedParameter>
- </ownedOperation>
</packagedElement>
<packagedElement xmi:type="uml:Class" xmi:id="_qZQUUC_gEeKl_vDGXh-OPw" name="KeepLastBidir">
<generalization xmi:type="uml:Generalization" xmi:id="_qZQUUS_gEeKl_vDGXh-OPw" general="_gKLGoC_fEeKl_vDGXh-OPw"/>
@@ -306,23 +277,6 @@ return true;</body>
</ownedAttribute>
</packagedElement>
</packagedElement>
- <packagedElement xmi:type="uml:Package" xmi:id="_EUZMIP68Ed6Zw96O-tCw7A" name="derivedInterfaces">
- <packagedElement xmi:type="uml:Interface" xmi:id="_ZQ2WIL5wEeKpNr0GJaRwvw" name="D_Push_T">
- <ownedOperation xmi:type="uml:Operation" xmi:id="_ZRa94L5wEeKpNr0GJaRwvw" name="push">
- <ownedParameter xmi:type="uml:Parameter" xmi:id="_ZRnyML5wEeKpNr0GJaRwvw" name="data" type="_j_050HLoEd6R5tffIPrlPg"/>
- </ownedOperation>
- </packagedElement>
- <packagedElement xmi:type="uml:Interface" xmi:id="_ZSdfsL5wEeKpNr0GJaRwvw" name="D_PullConsumer_T">
- <ownedOperation xmi:type="uml:Operation" xmi:id="_ZTBgYL5wEeKpNr0GJaRwvw" name="pull">
- <ownedParameter xmi:type="uml:Parameter" xmi:id="_ZTOUsL5wEeKpNr0GJaRwvw" name="ret" type="_j_050HLoEd6R5tffIPrlPg" direction="return"/>
- </ownedOperation>
- <ownedOperation xmi:type="uml:Operation" xmi:id="_ZTqZkL5wEeKpNr0GJaRwvw" name="hasData">
- <ownedParameter xmi:type="uml:Parameter" xmi:id="_ZT308L5wEeKpNr0GJaRwvw" name="ret" direction="return">
- <type xmi:type="uml:PrimitiveType" href="corba.uml#_Bv7l0B-VEd6nGq8wpI2tjg"/>
- </ownedParameter>
- </ownedOperation>
- </packagedElement>
- </packagedElement>
<profileApplication xmi:type="uml:ProfileApplication" xmi:id="_eWXo4HLmEd6R5tffIPrlPg">
<eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_eWdIcHLmEd6R5tffIPrlPg" source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/4.0.0/UML/Profile/L2#/"/>
@@ -353,46 +307,9 @@ return true;</body>
<kind xmi:type="FCM:PortKind" href="core.uml#_pE6GUFR1Ed6GqrP6fkWBoQ"/>
</FCM:Port>
<FCM:InteractionComponent xmi:id="_xQ_ccHUuEd6R5tffIPrlPg" base_Class="_Y1jF8HPpEd6R5tffIPrlPg"/>
- <FCM:DerivedElement xmi:id="_EYu5kP68Ed6Zw96O-tCw7A" base_Element="_EYsdUP68Ed6Zw96O-tCw7A" source="_ZRa94L5wEeKpNr0GJaRwvw"/>
- <FCM:DerivedElement xmi:id="_EYzyEP68Ed6Zw96O-tCw7A" base_Element="_EYx84P68Ed6Zw96O-tCw7A" source="_ZTBgYL5wEeKpNr0GJaRwvw"/>
- <FCM:DerivedElement xmi:id="_0TRKgP6-Ed6Zw96O-tCw7A" base_Element="_EYsdUP68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_0TVb8P6-Ed6Zw96O-tCw7A" base_Element="_EYx84P68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_7G9E0P6-Ed6Zw96O-tCw7A" base_Element="_EYsdUP68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_7HAIIP6-Ed6Zw96O-tCw7A" base_Element="_EYx84P68Ed6Zw96O-tCw7A"/>
<FCM:InteractionComponent xmi:id="_IwT2cP6_Ed6Zw96O-tCw7A" base_Class="_wh_EwHLmEd6R5tffIPrlPg"/>
<FCM:InteractionComponent xmi:id="_KcV6cP6_Ed6Zw96O-tCw7A" base_Class="_zc4voHLmEd6R5tffIPrlPg"/>
- <FCM:DerivedElement xmi:id="_vfBPwARNEd-OidZzGKCpzg" base_Element="_EYsdUP68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_vfETEARNEd-OidZzGKCpzg" base_Element="_EYx84P68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_op38oAnOEd-9beZpMGts2w" base_Element="_EYsdUP68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_op6Y4AnOEd-9beZpMGts2w" base_Element="_EYx84P68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_6tSQAAnUEd-co_m_wv4b6A" base_Element="_EYx84P68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_6tRB4AnUEd-co_m_wv4b6A" base_Element="_EYsdUP68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_YMvtUBGZEd-rfYlCjUOxJQ" base_Element="_EYsdUP68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_YMw7cBGZEd-rfYlCjUOxJQ" base_Element="_EYx84P68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_t02owBGaEd-rfYlCjUOxJQ" base_Element="_EYsdUP68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_t04d8BGaEd-rfYlCjUOxJQ" base_Element="_EYx84P68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_G7PB4BGcEd-rfYlCjUOxJQ" base_Element="_EYsdUP68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_G7QQABGcEd-rfYlCjUOxJQ" base_Element="_EYx84P68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_C4zYIBGlEd-Jq_XWT8Mhpg" base_Element="_EYsdUP68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_C5J9cBGlEd-Jq_XWT8Mhpg" base_Element="_EYx84P68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_IAwfQBI7Ed-3zOZ0RGapGA" base_Element="_EYsdUP68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_IAxtYBI7Ed-3zOZ0RGapGA" base_Element="_EYx84P68Ed6Zw96O-tCw7A"/>
<FCM:DerivedElement xmi:id="_IA3M8BI7Ed-3zOZ0RGapGA"/>
- <FCM:DerivedElement xmi:id="_AnNM4BI9Ed-XjYZ05V-9-Q" base_Element="_EYsdUP68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_AnPpIBI9Ed-XjYZ05V-9-Q" base_Element="_EYx84P68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_AnVvwBI9Ed-XjYZ05V-9-Q" base_Element="_AnQ3QBI9Ed-XjYZ05V-9-Q" source="_ZTqZkL5wEeKpNr0GJaRwvw"/>
- <FCM:DerivedElement xmi:id="_11TxwBJWEd-QgZm_R1AKbA" base_Element="_EYsdUP68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_11WOABJWEd-QgZm_R1AKbA" base_Element="_EYx84P68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_11YqQBJWEd-QgZm_R1AKbA" base_Element="_AnQ3QBI9Ed-XjYZ05V-9-Q"/>
- <FCM:DerivedElement xmi:id="_C7UZcBQ-Ed-_dI0JopJMvQ" base_Element="_EYsdUP68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_C7WOoBQ-Ed-_dI0JopJMvQ" base_Element="_EYx84P68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_C7YD0BQ-Ed-_dI0JopJMvQ" base_Element="_AnQ3QBI9Ed-XjYZ05V-9-Q"/>
- <FCM:DerivedElement xmi:id="_kUMisBb8Ed-u0pMEAnvpEQ" base_Element="_EYsdUP68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_kUNw0Bb8Ed-u0pMEAnvpEQ" base_Element="_EYx84P68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_kUPmABb8Ed-u0pMEAnvpEQ" base_Element="_AnQ3QBI9Ed-XjYZ05V-9-Q"/>
- <FCM:DerivedElement xmi:id="_6-zKABcKEd-Tda7vKXmT2A" base_Element="_EYsdUP68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_6-1mQBcKEd-Tda7vKXmT2A" base_Element="_EYx84P68Ed6Zw96O-tCw7A"/>
- <FCM:DerivedElement xmi:id="_6-3bcBcKEd-Tda7vKXmT2A" base_Element="_AnQ3QBI9Ed-XjYZ05V-9-Q"/>
<FCM:InteractionComponent xmi:id="_hp8gEDqNEeCd_O2fHA8dPg" base_Class="_dr0doDqNEeCd_O2fHA8dPg"/>
<FCM:InteractionComponent xmi:id="_MyvicK4iEeCXIcykFPsB8Q" base_Class="_DA0VYK4iEeCXIcykFPsB8Q"/>
<FCM:Template xmi:id="_53zBoK-xEeC6ALhykKLu_g" base_Element="_5IpEwK8xEeCXIcykFPsB8Q"/>
@@ -412,9 +329,7 @@ return true;</body>
<FCM:Port xmi:id="_DPPWcC_hEeKl_vDGXh-OPw" base_Port="_h9XikC_fEeKl_vDGXh-OPw" conjugated="true">
<kind xmi:type="FCM:PortKind" href="core.uml#_SrCqQC8qEeKx7OxAiA06uw"/>
</FCM:Port>
- <FCM:DerivedElement xmi:id="_ZRMUYL5wEeKpNr0GJaRwvw" base_Element="_ZQ2WIL5wEeKpNr0GJaRwvw" source="_j_050HLoEd6R5tffIPrlPg"/>
- <FCM:DerivedElement xmi:id="_ZSzd8L5wEeKpNr0GJaRwvw" base_Element="_ZSdfsL5wEeKpNr0GJaRwvw" source="_j_050HLoEd6R5tffIPrlPg"/>
- <FCM:DerivedElement xmi:id="_iU8M0L5wEeKpNr0GJaRwvw" base_Element="_iS924L5wEeKpNr0GJaRwvw" source="_ZRa94L5wEeKpNr0GJaRwvw"/>
- <FCM:DerivedElement xmi:id="_iXH-IL5wEeKpNr0GJaRwvw" base_Element="_iVK2UL5wEeKpNr0GJaRwvw" source="_ZTBgYL5wEeKpNr0GJaRwvw"/>
- <FCM:DerivedElement xmi:id="_iZUWgL5wEeKpNr0GJaRwvw" base_Element="_iXWAkL5wEeKpNr0GJaRwvw" source="_ZTqZkL5wEeKpNr0GJaRwvw"/>
+ <FCM:DerivedElement xmi:id="_PXy-kIdsEeOIFtxdWqAdSw" base_Element="_PXutIIdsEeOIFtxdWqAdSw">
+ <source xmi:type="uml:Operation" href="pathmap://QML_CORE/sysinterfaces.uml#_ns4qsClUEeO4bs_nkcnKOg"/>
+ </FCM:DerivedElement>
</xmi:XMI>
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/plugin.xml b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/plugin.xml
index 896dae535c6..f1319fa6607 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/plugin.xml
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/plugin.xml
@@ -130,7 +130,15 @@
</wizard>
</extension>
<extension id="LoopOperations" point="org.eclipse.papyrus.fcm.profile.fcmBindingHelper">
- <client class="org.eclipse.papyrus.qompass.modellibs.core.bindinghelpers.LoopOperations" bindingHelperName="LoopOperations">
+ <client
+ bindingHelperName="LoopOperations"
+ class="org.eclipse.papyrus.qompass.modellibs.core.bindinghelpers.LoopOperations">
+ </client>
+ </extension>
+ <extension id="BindOperation" point="org.eclipse.papyrus.fcm.profile.fcmBindingHelper">
+ <client
+ bindingHelperName="BindOperation"
+ class="org.eclipse.papyrus.qompass.modellibs.core.bindinghelpers.BindOperation">
</client>
</extension>
<extension point="org.eclipse.help.toc">
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/StateMachine.mtl b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/StateMachine.mtl
index 4dd53ec0045..99c915d4197 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/StateMachine.mtl
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/StateMachine.mtl
@@ -5,11 +5,11 @@
[import org::eclipse::papyrus::qompass::designer::core::acceleo::UMLTool/]
[import org::eclipse::papyrus::qompass::modellibs::core::acceleo::acceptableEvents/]
-[template public StateMachine(clazz : Class)]
+[template public StateMachine(clazz : BehavioredClassifier)]
// processEvents body - generated by Qompass
//
-// supports ports [for (port : Port | clazz.ownedPort)] [literal('PortEnum_'+clazz.name, 'port_'+port.name)/] [/for]
+// supports ports [if clazz.oclIsKindOf(Class)][for (port : Port | clazz.oclAsType(Class).ownedPort)] [literal('PortEnum_'+clazz.name, 'port_'+port.name)/] [/for][/if]
TRACEpr (AO);
PR ("IN [clazz.name/]::checkPreCond()" << showI);
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/StateMachineUtil.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/StateMachineUtil.java
index 4d2ec77d755..6c8efd7ce81 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/StateMachineUtil.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/StateMachineUtil.java
@@ -16,9 +16,11 @@ package org.eclipse.papyrus.qompass.modellibs.core.acceleo;
import org.eclipse.papyrus.qompass.designer.core.Utils;
import org.eclipse.papyrus.qompass.designer.core.acceleo.UMLTool;
+import org.eclipse.papyrus.qompass.designer.core.templates.TemplateUtils;
import org.eclipse.papyrus.qompass.designer.core.transformations.TransformationContext;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.TemplateBinding;
import org.eclipse.uml2.uml.Type;
@@ -30,31 +32,44 @@ public class StateMachineUtil {
* This is required by the state machine template which needs to access operation IDs
* provided by the call interceptor.
*
- * TODO: seems not very clean: why hardcoded operationIDs? precondition: package with suitable
- * postfix must have been created
- *
- * @param actual
+ * @param actual The actual for template binding
* @return
*/
public static Package boundPackageRef(Type actual) {
- String suffix = "_" + actual.getName();
for(Package nestedPkg : Utils.getTop(actual).getNestedPackages()) {
- if(nestedPkg.getName().endsWith(suffix)) {
- return nestedPkg;
+ if(nestedPkg.getTemplateBindings().size() > 0) {
+ TemplateBinding binding = nestedPkg.getTemplateBindings().get(0);
+ if (actual == TemplateUtils.getFirstActualFromBinding(binding)) {
+ return nestedPkg;
+ }
}
}
return null;
}
-
+
/**
* Declares a dependency from the current classifier which is produced by template instantiation
- * to the element "OperationIDs, if found within the passed package.
- *
+ * to the element (enum) "OperationIDs", if found within the passed package.
+ * Called by Acceleo script "acceptableEvents.mtl".
* @param pkg
* @return
*/
public static void declareDependencyToOperationIDs(Package pkg) {
- PackageableElement type = pkg.getPackagedElement("OperationIDs");
+ PackageableElement type = pkg.getPackagedElement("OperationIDs"); //$NON-NLS-1$
+ if(type instanceof Type) {
+ UMLTool.declareDependency(TransformationContext.classifier, (Type)type);
+ }
+ }
+
+ /**
+ * Declares a dependency from the current classifier which is produced by template instantiation
+ * to the element (enum) "SignalIDs", if found within the passed package.
+ * Called by Acceleo script "acceptableEvents.mtl".
+ * @param pkg the package in which an enumeration is looked up
+ * @return
+ */
+ public static void declareDependencyToSignalIDs(Package pkg) {
+ PackageableElement type = pkg.getPackagedElement("SignalIDs"); //$NON-NLS-1$
if(type instanceof Type) {
UMLTool.declareDependency(TransformationContext.classifier, (Type)type);
}
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/StateMachineUtil.mtl b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/StateMachineUtil.mtl
index b61f5800ab7..39dd285efdf 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/StateMachineUtil.mtl
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/StateMachineUtil.mtl
@@ -6,7 +6,14 @@
'boundPackageRef(org.eclipse.uml2.uml.Type)',
Sequence{actual}) /]
+[comment called by acceptableEvents.mtl/]
[query public declareDependencyToOperationIDs(pkg : Package) : OclVoid =
invoke('org.eclipse.papyrus.qompass.modellibs.core.acceleo.StateMachineUtil',
'declareDependencyToOperationIDs(org.eclipse.uml2.uml.Package)',
Sequence{pkg}) /]
+
+[comment called by acceptableEvents.mtl/]
+[query public declareDependencyToSignalIDs(pkg : Package) : OclVoid =
+ invoke('org.eclipse.papyrus.qompass.modellibs.core.acceleo.StateMachineUtil',
+ 'declareDependencyToSignalIDs(org.eclipse.uml2.uml.Package)',
+ Sequence{pkg}) /]
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/acceptableEvents.mtl b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/acceptableEvents.mtl
index 3cfe740f28d..5b26fad3114 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/acceptableEvents.mtl
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/acceleo/acceptableEvents.mtl
@@ -2,16 +2,26 @@
[import org::eclipse::papyrus::qompass::modellibs::core::acceleo::TransitionService /]
[import org::eclipse::papyrus::qompass::modellibs::core::acceleo::StateMachineUtil /]
[import org::eclipse::papyrus::qompass::designer::core::acceleo::UMLTool /]
+[import org::eclipse::papyrus::qompass::designer::core::acceleo::EnumService /]
[import org::eclipse::papyrus::qompass::designer::vsl::ParseVSL /]
[comment produce a call event trigger label (TODO) /]
+[comment
+Pass the actual to which the port is bound. In case of a CallEvent, pass the implemented interface
+(Not the class to which the state machine is bound)
+/]
[template public cetrigger(operation: Operation) post(trim())]
[boundPackageRef(operation.implementsInterface()).qualifiedName/]::ID_[name/]
[comment declare dependency to OperationIDs enumeration /]
[boundPackageRef(operation.implementsInterface()).declareDependencyToOperationIDs() /]
[/template]
+[comment
+Use service for global enumerations/]
+[template public setrigger(trigger: Trigger) post(trim())]
+ [literal('SignalEvents', 'SIG_' + trigger.event.oclAsType(SignalEvent).signal.name)/]
+[/template]
[template public acceptableEvents(state: State)]
@@ -42,7 +52,8 @@
[for (transition : Transition | state.outgoing)]
[comment big restriction: will only analyse first of possibly multiple triggers/]
- [if (transition.trigger->asSequence()->first().event.oclIsKindOf(TimeEvent))]
+ [let trigger : Trigger = transition.trigger->asSequence()->first()]
+ [if (trigger.event.oclIsKindOf(TimeEvent))]
// transition [transition.name/] - trigger: TimeEvent (there should be at most one outgoing timed transition per state).
if (event.operationID == core::ContainerServices::EventPool::ID_TIMEOUT) {
newState = STATE_[transition.target.name/];
@@ -50,23 +61,28 @@
[/if]
}
[/if]
- [if (transition.trigger->asSequence()->first().event.oclIsKindOf(CallEvent))]
- // transition [name/] - trigger: CallEvent, operation [transition.trigger.event.oclAsType(CallEvent).operation.name/]
- if (event.operationID == [cetrigger(transition.trigger->asSequence()->first().event.oclAsType(CallEvent).operation)/]) {
+ [if (trigger.event.oclIsKindOf(CallEvent))]
+ // transition [name/] - trigger: CallEvent ([trigger.event.name/]), operation [trigger.event.oclAsType(CallEvent).operation.name/]
+ if (event.operationID == [cetrigger(trigger.event.oclAsType(CallEvent).operation)/]) {
newState = STATE_[transition.target.name/];
[if not (transition.effect = null)] executor->[state.containingStateMachine().name/]_[transition.name/]_[transition.effect.name/]();
[/if]
}
[/if]
- [if (transition.trigger->asSequence()->first().event.oclIsKindOf(SignalEvent))]
- // transition [name/] - trigger: SignalEvent, signal [transition.trigger.event.oclAsType(SignalEvent).signal.name/]
- if (event.operationID == SIG_[transition.trigger.event.oclAsType(SignalEvent).signal.name/]) {
- newState = STATE_[transition.target.name/]) ;
-[if not (transition.effect = null)] executor->[state.containingStateMachine().name/]_[transition.name/]_[transition.effect.name/]();
+ [if (trigger.event.oclIsKindOf(SignalEvent))]
+ [let signalEvent : SignalEvent = trigger.event.oclAsType(SignalEvent)]
+ // transition [name/] - trigger: SignalEvent ([signalEvent.name/]), signal [signalEvent.signal.name/]
+ if (event.operationID == [setrigger(trigger)/]) {
+ newState = STATE_[transition.target.name/];
+[if not (transition.effect = null)] [if signalEvent.signal.attribute->size() > 0]void* data = &event.params;[/if]
+ executor->[state.containingStateMachine().name/]_[transition.name/]_[transition.effect.name/]([if signalEvent.signal.attribute->size() > 0]data[/if]);
+
[/if]
// ok = EvQUEUE ;
}
+ [/let]
[/if]
+ [/let]
[/for]
if (newState != m_currentState) {
m_currentState = newState;
diff --git a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/iconfigurators/AnimServiceConfigurator.java b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/iconfigurators/AnimServiceConfigurator.java
index 21bc29e0e2e..5ac32b50f4e 100644
--- a/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/iconfigurators/AnimServiceConfigurator.java
+++ b/extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core/src/org/eclipse/papyrus/qompass/modellibs/core/iconfigurators/AnimServiceConfigurator.java
@@ -17,7 +17,6 @@ package org.eclipse.papyrus.qompass.modellibs.core.iconfigurators;
import org.eclipse.emf.common.util.EList;
import org.eclipse.papyrus.qompass.designer.core.deployment.AllocUtils;
import org.eclipse.papyrus.qompass.designer.core.extensions.IInstanceConfigurator;
-import org.eclipse.papyrus.qompass.designer.core.transformations.TransformationRTException;
import org.eclipse.uml2.uml.InstanceSpecification;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Property;
@@ -55,13 +54,15 @@ public class AnimServiceConfigurator implements IInstanceConfigurator {
EList<InstanceSpecification> nodes = AllocUtils.getAllNodesOrThreadsParent(parentInstance);
if (nodes.size() > 0) {
InstanceSpecification node = nodes.get(0);
+ // problem: instance specification is within intermediate model, thus incomplete.
+ // option: explicitly pre-create singletons (and allocate these?)
NamedElement animService = node.getNearestPackage().getMember(eclipseAnimService);
if (animService instanceof InstanceSpecification) {
AllocUtils.allocate(instance, (InstanceSpecification)animService);
return;
}
}
- throw new TransformationRTException(String.format("Cannot find node <%s> in platform definition", eclipseAnimService));
+ // throw new TransformationRTException(String.format("Cannot find node <%s> in platform definition", eclipseAnimService));
}
}
diff --git a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/build.acceleo b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/build.acceleo
index 94def70bf62..cfae891d995 100644
--- a/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/build.acceleo
+++ b/extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing/build.acceleo
@@ -18,7 +18,7 @@
<acceleoCompiler
sourceFolder="${target.folder}"
outputFolder="${target.folder}"
- dependencies="${target.folder}/../../org.eclipse.papyrus.fcm.profile;${target.folder}/../../org.eclipse.papyrus.infra.core.sasheditor;${target.folder}/../../org.eclipse.papyrus.infra.core.sasheditor.di;${target.folder}/../../org.eclipse.papyrus.qompass.modellibs.core;${target.folder}/../../org.eclipse.papyrus.qompass.designer.core;${target.folder}/../../org.eclipse.papyrus.qompass.designer.vsl;${target.folder}/../../org.eclipse.papyrus.cpp.profile;${target.folder}/../../org.eclipse.papyrus.acceleo;${target.folder}/../../org.eclipse.papyrus.infra.widgets.toolbox;${target.folder}/../../org.eclipse.papyrus.infra.services.tracepoints;${target.folder}/../../org.eclipse.papyrus.qompass.designer.ui;"
+ dependencies="${target.folder}/../../org.eclipse.papyrus.fcm.profile;${target.folder}/../../org.eclipse.papyrus.qompass.modellibs.core;${target.folder}/../../org.eclipse.papyrus.qompass.designer.core;${target.folder}/../../org.eclipse.papyrus.qompass.designer.vsl;${target.folder}/../../org.eclipse.papyrus.cpp.profile;${target.folder}/../../org.eclipse.papyrus.acceleo;${target.folder}/../../org.eclipse.papyrus.infra.services.tracepoints;${target.folder}/../../org.eclipse.papyrus.qompass.designer.ui;"
binaryResource="false"
packagesToRegister="">
</acceleoCompiler>

Back to the top