diff options
author | Ed Seidewitz | 2016-01-09 20:00:53 +0000 |
---|---|---|
committer | jeremie.tatibouet | 2016-03-21 15:19:51 +0000 |
commit | ef7dd990e6d2dc43035236577366f2e85bf544e6 (patch) | |
tree | eeaacae12de9ac174e959454ed5f3330a56d0f93 | |
parent | fcf2082a5e379eb54f14a5e3b4e374a405312ab5 (diff) | |
download | org.eclipse.papyrus-ef7dd990e6d2dc43035236577366f2e85bf544e6.tar.gz org.eclipse.papyrus-ef7dd990e6d2dc43035236577366f2e85bf544e6.tar.xz org.eclipse.papyrus-ef7dd990e6d2dc43035236577366f2e85bf544e6.zip |
Corrected constraints in alf.ecore.
- Corrected featureInvocationExpressionReferentExists constraint.
- Corrected the determination of whether an internal namespace is within
the external context of the model namespace.
Change-Id: I785463ef58f51fd7323749bd92081ee76248f0bc
Signed-off-by: Ed Seidewitz <ed-s@modeldriven.com>
6 files changed, 13 insertions, 13 deletions
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 369b236ae0c..853e75d4cc4 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 @@ -829,7 +829,7 @@ </eOperations> <eOperations name="namespace" eType="#//ElementReference"> <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> - <details key="body" value="
 if self.element.oclIsKindOf(MemberDefinition) then
 self.element.oclAsType(MemberDefinition).outerScope()
 else
 null
 endif"/> + <details key="body" value="
 if self.isModelNamespace() then
 	self.element.oclAsType(ModelNamespace).context().namespace()
 else if self.element.oclIsKindOf(MemberDefinition) then
 self.element.oclAsType(MemberDefinition).outerScope()
 else
 null
 endif endif"/> </eAnnotations> </eOperations> <eOperations name="template" eType="#//ElementReference"> @@ -925,7 +925,7 @@ </eOperations> <eOperations name="equals" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"> <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> - <details key="body" value="other <> null and other.asAlf() = self.element"/> + <details key="body" value="
		other <> null and (other.asAlf() = self.element or 
			self.isModelNamespace() and other.asUml() = self.element.oclAsType(ModelNamespace).context().asUml())"/> </eAnnotations> <eParameters name="other" eType="#//ElementReference"/> </eOperations> @@ -1385,7 +1385,7 @@ </eOperations> <eOperations name="equals" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"> <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> - <details key="body" value="
 other <> null and 
 other.asUml() = self.element and 
 other.name() = self.name()"/> + <details key="body" value="
 other <> null and 
 	(other.asUml() = self.element and other.name() = self.name() or
 	 other.isModelNamespace() and other.asAlf().oclAsType(ModelNamespace).context().asUml() = self.element)"/> </eAnnotations> <eParameters name="other" eType="#//ElementReference"/> </eOperations> @@ -7108,7 +7108,7 @@ <details key="documentation" value="If a feature invocation expression is not an implicit destructor call,
then it must be possible to determine a single valid referent for it
according to the overloading resolution rules."/> </eAnnotations> <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> - <details key="body" value="
 self.isImplicit or
 -- TODO: Remove this check once overloading resolution is implemented.
 self.tuple.size() <= self.parameterCount() and
 self.tuple.input()->forAll(input | self.parameterIsAssignableFrom(input)) and
 self.tuple.output()->forAll(output | self.parameterIsAssignableTo(output))"/> + <details key="body" value="
 self.isImplicit or self.referent <> null and
 -- TODO: Remove this check once overloading resolution is implemented.
 self.tuple.size() <= self.parameterCount() and
 self.tuple.input()->forAll(input | self.parameterIsAssignableFrom(input)) and
 self.tuple.output()->forAll(output | self.parameterIsAssignableTo(output))"/> </eAnnotations> <eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/> <eParameters name="context"> diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/ExternalElementReference.java b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/ExternalElementReference.java index 92d607004ce..958ba1f36f8 100644 --- a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/ExternalElementReference.java +++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/ExternalElementReference.java @@ -779,7 +779,7 @@ public interface ExternalElementReference extends ElementReference { * <!-- begin-user-doc --> * <!-- end-user-doc --> * @model required="true" - * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='\n other <> null and \n other.asUml() = self.element and \n other.name() = self.name()'" + * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='\n other <> null and \n \t(other.asUml() = self.element and other.name() = self.name() or\n \t other.isModelNamespace() and other.asAlf().oclAsType(ModelNamespace).context().asUml() = self.element)'" * @generated */ boolean equals(ElementReference other); diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/FeatureInvocationExpression.java b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/FeatureInvocationExpression.java index c6564695d1f..fa4245c3648 100644 --- a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/FeatureInvocationExpression.java +++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/FeatureInvocationExpression.java @@ -104,7 +104,7 @@ public interface FeatureInvocationExpression extends InvocationExpression { * then it must be possible to determine a single valid referent for it * according to the overloading resolution rules. * <!-- end-model-doc --> - * @model annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='\n self.isImplicit or\n -- TODO: Remove this check once overloading resolution is implemented.\n self.tuple.size() <= self.parameterCount() and\n self.tuple.input()->forAll(input | self.parameterIsAssignableFrom(input)) and\n self.tuple.output()->forAll(output | self.parameterIsAssignableTo(output))'" + * @model annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='\n self.isImplicit or self.referent <> null and\n -- TODO: Remove this check once overloading resolution is implemented.\n self.tuple.size() <= self.parameterCount() and\n self.tuple.input()->forAll(input | self.parameterIsAssignableFrom(input)) and\n self.tuple.output()->forAll(output | self.parameterIsAssignableTo(output))'" * @generated */ boolean featureInvocationExpressionReferentExists(DiagnosticChain diagnostics, Map<Object, Object> context); diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/InternalElementReference.java b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/InternalElementReference.java index 96d3ecbe118..8c603537505 100644 --- a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/InternalElementReference.java +++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/InternalElementReference.java @@ -519,7 +519,7 @@ public interface InternalElementReference extends ElementReference { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> - * @model annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='\n if self.element.oclIsKindOf(MemberDefinition) then\n self.element.oclAsType(MemberDefinition).outerScope()\n else\n null\n endif'" + * @model annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='\n if self.isModelNamespace() then\n \tself.element.oclAsType(ModelNamespace).context().namespace()\n else if self.element.oclIsKindOf(MemberDefinition) then\n self.element.oclAsType(MemberDefinition).outerScope()\n else\n null\n endif endif'" * @generated */ ElementReference namespace(); @@ -680,7 +680,7 @@ public interface InternalElementReference extends ElementReference { * <!-- begin-user-doc --> * <!-- end-user-doc --> * @model required="true" - * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='other <> null and other.asAlf() = self.element'" + * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='\n\t\tother <> null and (other.asAlf() = self.element or \n\t\t\tself.isModelNamespace() and other.asUml() = self.element.oclAsType(ModelNamespace).context().asUml())'" * @generated */ boolean equals(ElementReference other); diff --git a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/FeatureInvocationExpressionImpl.java b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/FeatureInvocationExpressionImpl.java index 3caa358dfb7..b90863360f9 100644 --- a/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/FeatureInvocationExpressionImpl.java +++ b/plugins/uml/alf/org.eclipse.papyrus.uml.alf/syntax-gen/org/eclipse/papyrus/uml/alf/impl/FeatureInvocationExpressionImpl.java @@ -177,7 +177,7 @@ public class FeatureInvocationExpressionImpl extends InvocationExpressionImpl im * @ordered */ protected static final String FEATURE_INVOCATION_EXPRESSION_REFERENT_EXISTS_DIAGNOSTIC_CHAIN_MAP__EEXPRESSION = "\n" + - " self.isImplicit or\n" + + " self.isImplicit or self.referent <> null and\n" + " -- TODO: Remove this check once overloading resolution is implemented.\n" + " self.tuple.size() <= self.parameterCount() and\n" + " self.tuple.input()->forAll(input | self.parameterIsAssignableFrom(input)) and\n" + 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 33c45b5c933..5265fc38bf4 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 @@ -758,7 +758,7 @@ </eOperations>
<eOperations name="namespace" eType="#//ElementReference">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details key="body" value="
 if self.element.oclIsKindOf(MemberDefinition) then
 self.element.oclAsType(MemberDefinition).outerScope()
 else
 null
 endif"/>
+ <details key="body" value="
 if self.isModelNamespace() then
 	self.element.oclAsType(ModelNamespace).context().namespace()
 else if self.element.oclIsKindOf(MemberDefinition) then
 self.element.oclAsType(MemberDefinition).outerScope()
 else
 null
 endif endif"/>
</eAnnotations>
</eOperations>
<eOperations name="template" eType="#//ElementReference">
@@ -854,7 +854,7 @@ </eOperations>
<eOperations name="equals" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details key="body" value="other <> null and other.asAlf() = self.element"/>
+ <details key="body" value="
		other <> null and (other.asAlf() = self.element or 
			self.isModelNamespace() and other.asUml() = self.element.oclAsType(ModelNamespace).context().asUml())"/>
</eAnnotations>
<eParameters name="other" eType="#//ElementReference"/>
</eOperations>
@@ -1303,7 +1303,7 @@ </eOperations>
<eOperations name="equals" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details key="body" value="
 other <> null and 
 other.asUml() = self.element and 
 other.name() = self.name()"/>
+ <details key="body" value="
 other <> null and 
 	(other.asUml() = self.element and other.name() = self.name() or
 	 other.isModelNamespace() and other.asAlf().oclAsType(ModelNamespace).context().asUml() = self.element)"/>
</eAnnotations>
<eParameters name="other" eType="#//ElementReference"/>
</eOperations>
@@ -5720,7 +5720,7 @@ </eOperations>
<eOperations name="featureInvocationExpressionReferentExists" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
- <details key="body" value="
 self.isImplicit or
 -- TODO: Remove this check once overloading resolution is implemented.
 self.tuple.size() <= self.parameterCount() and
 self.tuple.input()->forAll(input | self.parameterIsAssignableFrom(input)) and
 self.tuple.output()->forAll(output | self.parameterIsAssignableTo(output))"/>
+ <details key="body" value="
 self.isImplicit or self.referent <> null and
 -- TODO: Remove this check once overloading resolution is implemented.
 self.tuple.size() <= self.parameterCount() and
 self.tuple.input()->forAll(input | self.parameterIsAssignableFrom(input)) and
 self.tuple.output()->forAll(output | self.parameterIsAssignableTo(output))"/>
</eAnnotations>
<eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
<eParameters name="context">
|