Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-07-03 08:44:12 +0000
committerGerrit Code Review @ Eclipse.org2014-07-03 08:44:12 +0000
commit4bd9f168e882ca7a10fd253a1b84a5af4751f771 (patch)
treef766c6d34b9514acd4de7aea7a1e610451b5c49b /extraplugins
parentcfd02a526a0afc9b3cf70edc5715b879eb965475 (diff)
parent4523970a7444c8eb2d056ec6e8329ae2dad35de9 (diff)
downloadorg.eclipse.papyrus-4bd9f168e882ca7a10fd253a1b84a5af4751f771.tar.gz
org.eclipse.papyrus-4bd9f168e882ca7a10fd253a1b84a5af4751f771.tar.xz
org.eclipse.papyrus-4bd9f168e882ca7a10fd253a1b84a5af4751f771.zip
Merge "438725: [Moka] The Factory generator of oep.composite.utils shall assign upperBounds to pins and parameter nodes https://bugs.eclipse.org/bugs/show_bug.cgi?id=438725"
Diffstat (limited to 'extraplugins')
-rw-r--r--extraplugins/moka/org.eclipse.papyrus.moka.composites.utils/src/org/eclipse/papyrus/moka/composites/utils/handlers/Utils.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/extraplugins/moka/org.eclipse.papyrus.moka.composites.utils/src/org/eclipse/papyrus/moka/composites/utils/handlers/Utils.java b/extraplugins/moka/org.eclipse.papyrus.moka.composites.utils/src/org/eclipse/papyrus/moka/composites/utils/handlers/Utils.java
index 80f675b0464..cf3c23c6680 100644
--- a/extraplugins/moka/org.eclipse.papyrus.moka.composites.utils/src/org/eclipse/papyrus/moka/composites/utils/handlers/Utils.java
+++ b/extraplugins/moka/org.eclipse.papyrus.moka.composites.utils/src/org/eclipse/papyrus/moka/composites/utils/handlers/Utils.java
@@ -36,6 +36,7 @@ import org.eclipse.uml2.uml.Class;
import org.eclipse.uml2.uml.CreateObjectAction;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.InputPin;
+import org.eclipse.uml2.uml.LiteralInteger;
import org.eclipse.uml2.uml.ObjectFlow;
import org.eclipse.uml2.uml.Operation;
import org.eclipse.uml2.uml.OutputPin;
@@ -101,18 +102,30 @@ public class Utils {
ActivityParameterNode returnParamNode = (ActivityParameterNode)factory.createOwnedNode("resultParameterNode", UMLPackage.eINSTANCE.getActivityParameterNode());
returnParamNode.setParameter(returnParam);
returnParamNode.setType(context);
+ LiteralInteger returnParamNodeUpperBound = UMLFactory.eINSTANCE.createLiteralInteger();
+ returnParamNodeUpperBound.setValue(1) ;
+ returnParamNode.setUpperBound(returnParamNodeUpperBound) ;
// Retrieves the default constructor of context
Operation defaultConstructor = getDefaultConstructor(context);
CreateObjectAction createObject = (CreateObjectAction)factory.createOwnedNode("createObject", UMLPackage.eINSTANCE.getCreateObjectAction());
OutputPin createObjectResultPin = createObject.createResult("result", context);
+ LiteralInteger createObjectResultPinUpperBound = UMLFactory.eINSTANCE.createLiteralInteger();
+ createObjectResultPinUpperBound.setValue(1) ;
+ createObjectResultPin.setUpperBound(createObjectResultPinUpperBound) ;
createObject.setClassifier(context);
CallOperationAction callConstructor = (CallOperationAction)factory.createOwnedNode("callConstructor", UMLPackage.eINSTANCE.getCallOperationAction());
callConstructor.setOperation(defaultConstructor);
InputPin callConstructorTargetPin = callConstructor.createTarget("target", context);
+ LiteralInteger callConstructorTargetPinUpperBound = UMLFactory.eINSTANCE.createLiteralInteger();
+ callConstructorTargetPinUpperBound.setValue(1) ;
+ callConstructorTargetPin.setUpperBound(callConstructorTargetPinUpperBound) ;
OutputPin callConstructorResultPin = callConstructor.createResult("result", context);
+ LiteralInteger callConstructorResultPinUpperBound = UMLFactory.eINSTANCE.createLiteralInteger();
+ callConstructorResultPinUpperBound.setValue(1) ;
+ callConstructorResultPin.setUpperBound(callConstructorResultPinUpperBound) ;
ObjectFlow createObjectAction_callConstructor = (ObjectFlow)factory.createEdge("createObjectAction to callConstructor", UMLPackage.eINSTANCE.getObjectFlow());
createObjectAction_callConstructor.setSource(createObjectResultPin);
@@ -125,7 +138,13 @@ public class Utils {
} else {
StartObjectBehaviorAction startBehavior = (StartObjectBehaviorAction)factory.createOwnedNode("start classifier behavior", UMLPackage.eINSTANCE.getStartObjectBehaviorAction());
InputPin startBehaviorInputPin = startBehavior.createObject("object", context);
+ LiteralInteger startBehaviorInputPinUpperBound = UMLFactory.eINSTANCE.createLiteralInteger();
+ startBehaviorInputPinUpperBound.setValue(1) ;
+ startBehaviorInputPin.setUpperBound(startBehaviorInputPinUpperBound) ;
OutputPin startBehaviorResultPin = startBehavior.createResult("result", context);
+ LiteralInteger startBehaviorResultPinUpperBound = UMLFactory.eINSTANCE.createLiteralInteger();
+ startBehaviorResultPinUpperBound.setValue(1) ;
+ startBehaviorResultPin.setUpperBound(startBehaviorResultPinUpperBound) ;
toReturnParamNode.setSource(startBehaviorResultPin);
ObjectFlow callConstructor_startBehavior = (ObjectFlow)factory.createEdge("callConstructor to startBehavior", UMLPackage.eINSTANCE.getObjectFlow());
callConstructor_startBehavior.setSource(callConstructorResultPin);

Back to the top