Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Seidewitz2016-01-13 21:21:22 +0000
committerjeremie.tatibouet2016-03-21 15:22:48 +0000
commit223fc6a5af4d0ccaa2310d7e50bf2317b80c386a (patch)
tree784ec56d83acc6a43437a49abed4fda7022467cd
parentd0e3e580942d8c4c4ca7964f90e721c92c29567f (diff)
downloadorg.eclipse.papyrus-223fc6a5af4d0ccaa2310d7e50bf2317b80c386a.tar.gz
org.eclipse.papyrus-223fc6a5af4d0ccaa2310d7e50bf2317b80c386a.tar.xz
org.eclipse.papyrus-223fc6a5af4d0ccaa2310d7e50bf2317b80c386a.zip
Bug 482510 - Corrected mapping of link end data for association reads.
- Also corrected the derived parameters for association end read arguments so their multiplicity is 1..1. Change-Id: Id865b65dfe6c517073e45afc3f06b1d203db6c00 Signed-off-by: Ed Seidewitz <ed-s@modeldriven.com>
-rw-r--r--plugins/uml/alf/org.eclipse.papyrus.uml.alf.to.fuml/transformation/AlfCommon2UML.qvto20
-rw-r--r--plugins/uml/alf/org.eclipse.papyrus.uml.alf/model/alf.ecore2
-rw-r--r--plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/InvocationExpression.java2
-rw-r--r--plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/alf.ecore2
4 files changed, 14 insertions, 12 deletions
diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf.to.fuml/transformation/AlfCommon2UML.qvto b/plugins/uml/alf/org.eclipse.papyrus.uml.alf.to.fuml/transformation/AlfCommon2UML.qvto
index c82b44b780e..5237e89e13d 100644
--- a/plugins/uml/alf/org.eclipse.papyrus.uml.alf.to.fuml/transformation/AlfCommon2UML.qvto
+++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf.to.fuml/transformation/AlfCommon2UML.qvto
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
+ * Copyright (c) 2015-2016 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
@@ -472,15 +472,15 @@ query CallBehaviorAction::parameters() : OrderedSet(Parameter) {
// Link End Data
-constructor LinkEndData::LinkEndData(inout action : LinkAction, end_ : Property, pin : Pin) {
+constructor LinkEndData::LinkEndData(inout action : LinkAction, end_ : Property, isInput : Boolean) {
_'end' := end_;
action.endData += result;
- if pin.oclIsKindOf(InputPin) then {
- value := pin.oclAsType(InputPin);
- action.inputValue += pin.oclAsType(InputPin);
+ if isInput then {
+ value := new InputPin(nameOf(action) + ".value(" + nameOf(end_) + ")", end_.type, 1, 1);
+ action.inputValue += value;
} else if action.oclIsKindOf(ReadLinkAction) then {
- action.oclAsType(ReadLinkAction).result := pin.oclAsType(OutputPin);
+ action.oclAsType(ReadLinkAction).result := new OutputPin(nameOf(action) + ".result", end_);
} endif endif;
}
@@ -655,9 +655,11 @@ constructor ReadIsClassifiedObjectAction::ReadIsClassifiedObjectAction(type : Cl
constructor ReadLinkAction::ReadLinkAction(associationEnd : Property) {
name := "ReadLink(" + nameOf(associationEnd) + ")";
- inputValue := inputPinsFromProperties(name + ".inputValue",
- associationEnd.association.ownedEnd->asSequence()->excluding(associationEnd)->asOrderedSet());
- result.result := new OutputPin(name + ".result", associationEnd);
+ associationEnd.association.ownedEnd->asSequence()->excluding(associationEnd)->
+ forEach(otherEnd) {
+ new LinkEndData(result, otherEnd, true);
+ };
+ new LinkEndData(result, associationEnd, false);
}
constructor ReadSelfAction::ReadSelfAction(type : Type) {
diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/model/alf.ecore b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/model/alf.ecore
index a8e91045f93..341f8eb01c5 100644
--- a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/model/alf.ecore
+++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/model/alf.ecore
@@ -3972,7 +3972,7 @@
</eOperations>
<eOperations name="InvocationExpression_parameterElements" upperBound="-1" eType="#//ElementReference">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details key="body" value="&#xA; let referent = self.referent in&#xA; if self.isBehavior or self.isOperation then&#xA; referent.parameters()&#xA; else if self.isAssociationEnd then&#xA; let association = referent.association() in&#xA; association.properties()->reject(equals(referent))->&#xA; collect(p | self.parameterFromProperty(p))->asOrderedSet()&#xA; else if referent &lt;> null then&#xA; referent.properties()->&#xA; collect(p | self.parameterFromProperty(p))->asOrderedSet() &#xA; else&#xA; OrderedSet(ElementReference){}&#xA; endif endif endif"/>
+ <details key="body" value="&#xA; let referent = self.referent in&#xA; if self.isBehavior or self.isOperation then&#xA; referent.parameters()&#xA; else if self.isAssociationEnd then&#xA; let association = referent.association() in&#xA; association.properties()->reject(equals(referent))->&#xA; collect(p | self.parameterFromPropertyWithMultiplicity(p, '1', '1'))->asOrderedSet()&#xA; else if referent &lt;> null then&#xA; referent.properties()->&#xA; collect(p | self.parameterFromProperty(p))->asOrderedSet() &#xA; else&#xA; OrderedSet(ElementReference){}&#xA; endif endif endif"/>
</eAnnotations>
</eOperations>
<eOperations name="parameterFromProperty" lowerBound="1" eType="#//ElementReference">
diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/InvocationExpression.java b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/InvocationExpression.java
index d31e790828b..962ccc9c253 100644
--- a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/InvocationExpression.java
+++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/InvocationExpression.java
@@ -461,7 +461,7 @@ public interface InvocationExpression extends Expression {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @model annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='\n let referent = self.referent in\n if self.isBehavior or self.isOperation then\n referent.parameters()\n else if self.isAssociationEnd then\n let association = referent.association() in\n association.properties()->reject(equals(referent))->\n collect(p | self.parameterFromProperty(p))->asOrderedSet()\n else if referent <> null then\n referent.properties()->\n collect(p | self.parameterFromProperty(p))->asOrderedSet() \n else\n OrderedSet(ElementReference){}\n endif endif endif'"
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='\n let referent = self.referent in\n if self.isBehavior or self.isOperation then\n referent.parameters()\n else if self.isAssociationEnd then\n let association = referent.association() in\n association.properties()->reject(equals(referent))->\n collect(p | self.parameterFromPropertyWithMultiplicity(p, \'1\', \'1\'))->asOrderedSet()\n else if referent <> null then\n referent.properties()->\n collect(p | self.parameterFromProperty(p))->asOrderedSet() \n else\n OrderedSet(ElementReference){}\n endif endif endif'"
* @generated
*/
EList<ElementReference> InvocationExpression_parameterElements();
diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/alf.ecore b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/alf.ecore
index c4649fa3d1c..b0e8c6c06e5 100644
--- a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/alf.ecore
+++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/alf.ecore
@@ -3369,7 +3369,7 @@
</eOperations>
<eOperations name="InvocationExpression_parameterElements" upperBound="-1" eType="#//ElementReference">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details key="body" value="&#xA; let referent = self.referent in&#xA; if self.isBehavior or self.isOperation then&#xA; referent.parameters()&#xA; else if self.isAssociationEnd then&#xA; let association = referent.association() in&#xA; association.properties()->reject(equals(referent))->&#xA; collect(p | self.parameterFromProperty(p))->asOrderedSet()&#xA; else if referent &lt;> null then&#xA; referent.properties()->&#xA; collect(p | self.parameterFromProperty(p))->asOrderedSet() &#xA; else&#xA; OrderedSet(ElementReference){}&#xA; endif endif endif"/>
+ <details key="body" value="&#xA; let referent = self.referent in&#xA; if self.isBehavior or self.isOperation then&#xA; referent.parameters()&#xA; else if self.isAssociationEnd then&#xA; let association = referent.association() in&#xA; association.properties()->reject(equals(referent))->&#xA; collect(p | self.parameterFromPropertyWithMultiplicity(p, '1', '1'))->asOrderedSet()&#xA; else if referent &lt;> null then&#xA; referent.properties()->&#xA; collect(p | self.parameterFromProperty(p))->asOrderedSet() &#xA; else&#xA; OrderedSet(ElementReference){}&#xA; endif endif endif"/>
</eAnnotations>
</eOperations>
<eOperations name="parameterFromProperty" lowerBound="1" eType="#//ElementReference">

Back to the top