diff options
Diffstat (limited to 'plugins')
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="
 let referent = self.referent in
 if self.isBehavior or self.isOperation then
 referent.parameters()
 else if self.isAssociationEnd then
 let association = referent.association() in
 association.properties()->reject(equals(referent))->
 collect(p | self.parameterFromProperty(p))->asOrderedSet()
 else if referent <> null then
 referent.properties()->
 collect(p | self.parameterFromProperty(p))->asOrderedSet() 
 else
 OrderedSet(ElementReference){}
 endif endif endif"/> + <details key="body" value="
 let referent = self.referent in
 if self.isBehavior or self.isOperation then
 referent.parameters()
 else if self.isAssociationEnd then
 let association = referent.association() in
 association.properties()->reject(equals(referent))->
 collect(p | self.parameterFromPropertyWithMultiplicity(p, '1', '1'))->asOrderedSet()
 else if referent <> null then
 referent.properties()->
 collect(p | self.parameterFromProperty(p))->asOrderedSet() 
 else
 OrderedSet(ElementReference){}
 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="
 let referent = self.referent in
 if self.isBehavior or self.isOperation then
 referent.parameters()
 else if self.isAssociationEnd then
 let association = referent.association() in
 association.properties()->reject(equals(referent))->
 collect(p | self.parameterFromProperty(p))->asOrderedSet()
 else if referent <> null then
 referent.properties()->
 collect(p | self.parameterFromProperty(p))->asOrderedSet() 
 else
 OrderedSet(ElementReference){}
 endif endif endif"/>
+ <details key="body" value="
 let referent = self.referent in
 if self.isBehavior or self.isOperation then
 referent.parameters()
 else if self.isAssociationEnd then
 let association = referent.association() in
 association.properties()->reject(equals(referent))->
 collect(p | self.parameterFromPropertyWithMultiplicity(p, '1', '1'))->asOrderedSet()
 else if referent <> null then
 referent.properties()->
 collect(p | self.parameterFromProperty(p))->asOrderedSet() 
 else
 OrderedSet(ElementReference){}
 endif endif endif"/>
</eAnnotations>
</eOperations>
<eOperations name="parameterFromProperty" lowerBound="1" eType="#//ElementReference">
|