Skip to content

Commit fff3626

Browse files
authored
Merge pull request #648 from Systems-Modeling/ST6RI-841
ST6RI-841 The isCompatibleWith operation needs a return type
2 parents 8d7efe3 + 03c4054 commit fff3626

8 files changed

Lines changed: 21 additions & 10 deletions

File tree

org.omg.sysml/model/KerML_only.uml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2753,6 +2753,9 @@ redefines(mem.memberElement.oclAsType(Feature))</body>
27532753
</specification>
27542754
</ownedRule>
27552755
<ownedParameter xmi:id="34116e2a-c79c-4277-b409-2f25e53abe18" name="otherType" visibility="public" type="a32ae34b-57c2-4f49-832c-00f8741d55e7"/>
2756+
<ownedParameter xmi:id="_Jz9DwCvDEfCJzut8qz2Csg" direction="return">
2757+
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
2758+
</ownedParameter>
27562759
</ownedOperation>
27572760
<ownedOperation xmi:id="43a26f3f-ea82-488e-a0bc-904e16ed9c5e" name="typingFeatures" visibility="public" bodyCondition="3baa429e-0255-4f08-8c83-2a14bd084a1b">
27582761
<ownedComment xmi:id="44a7b1ba-c0ab-40ce-a72a-4ce4bd05c0b9" annotatedElement="43a26f3f-ea82-488e-a0bc-904e16ed9c5e">
@@ -4211,6 +4214,9 @@ specializes(mem.memberElement.oclAsType(Type))</body>
42114214
</specification>
42124215
</ownedRule>
42134216
<ownedParameter xmi:id="1871002f-9e6b-44dd-8e87-759c14da3cd2" name="otherType" visibility="public" type="a32ae34b-57c2-4f49-832c-00f8741d55e7"/>
4217+
<ownedParameter xmi:id="_7H10oCvCEfCJzut8qz2Csg" direction="return">
4218+
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
4219+
</ownedParameter>
42144220
</ownedOperation>
42154221
<ownedOperation xmi:id="75edcbb6-a75e-4709-911e-0cd1094a28f5" name="multiplicities" visibility="public" bodyCondition="9d09cc58-6842-4d74-a593-63afd30d4287">
42164222
<ownedComment xmi:id="d60ff703-e548-406c-a961-d320510a590c" annotatedElement="75edcbb6-a75e-4709-911e-0cd1094a28f5">

org.omg.sysml/model/SysML.ecore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
<eAnnotations source="http://www.omg.org/spec/SysML"/>
117117
<eParameters name="libraryTypeName" ordered="false" lowerBound="1" eType="ecore:EDataType types.ecore#//String"/>
118118
</eOperations>
119-
<eOperations name="isCompatibleWith" ordered="false" lowerBound="1">
119+
<eOperations name="isCompatibleWith" ordered="false" lowerBound="1" eType="ecore:EDataType types.ecore#//Boolean">
120120
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
121121
<details key="documentation" value="&lt;p>By default, this &lt;code>Type&lt;/code> is compatible with an &lt;code>otherType&lt;/code> if it directly or indirectly specializes the &lt;code>otherType&lt;/code>.&lt;/p>&#xA;specializes(otherType)"/>
122122
</eAnnotations>

org.omg.sysml/model/SysML.uml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4420,6 +4420,9 @@ specializes(mem.memberElement.oclAsType(Type))</body>
44204420
</specification>
44214421
</ownedRule>
44224422
<ownedParameter xmi:id="1871002f-9e6b-44dd-8e87-759c14da3cd2" name="otherType" visibility="public" type="a32ae34b-57c2-4f49-832c-00f8741d55e7"/>
4423+
<ownedParameter xmi:id="_cqYMoCvCEfCJzut8qz2Csg" direction="return">
4424+
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
4425+
</ownedParameter>
44234426
</ownedOperation>
44244427
<ownedOperation xmi:id="75edcbb6-a75e-4709-911e-0cd1094a28f5" name="multiplicities" visibility="public" bodyCondition="9d09cc58-6842-4d74-a593-63afd30d4287">
44254428
<ownedComment xmi:id="d60ff703-e548-406c-a961-d320510a590c" annotatedElement="75edcbb6-a75e-4709-911e-0cd1094a28f5">
@@ -5863,6 +5866,9 @@ redefines(mem.memberElement.oclAsType(Feature))</body>
58635866
</specification>
58645867
</ownedRule>
58655868
<ownedParameter xmi:id="34116e2a-c79c-4277-b409-2f25e53abe18" name="otherType" visibility="public" type="a32ae34b-57c2-4f49-832c-00f8741d55e7"/>
5869+
<ownedParameter xmi:id="_qYAaQCvCEfCJzut8qz2Csg" direction="return">
5870+
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
5871+
</ownedParameter>
58665872
</ownedOperation>
58675873
<ownedOperation xmi:id="43a26f3f-ea82-488e-a0bc-904e16ed9c5e" name="typingFeatures" visibility="public" bodyCondition="3baa429e-0255-4f08-8c83-2a14bd084a1b">
58685874
<ownedComment xmi:id="44a7b1ba-c0ab-40ce-a72a-4ce4bd05c0b9" annotatedElement="43a26f3f-ea82-488e-a0bc-904e16ed9c5e">

org.omg.sysml/model/kerml.ecore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@
908908
</eAnnotations>
909909
<eParameters name="libraryTypeName" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/>
910910
</eOperations>
911-
<eOperations name="isCompatibleWith" ordered="false" lowerBound="1">
911+
<eOperations name="isCompatibleWith" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean">
912912
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
913913
<details key="documentation" value="&lt;p>By default, this &lt;code>Type&lt;/code> is compatible with an &lt;code>otherType&lt;/code> if it directly or indirectly specializes the &lt;code>otherType&lt;/code>.&lt;/p>"/>
914914
</eAnnotations>

org.omg.sysml/model/sysml_clean.ecore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
</eAnnotations>
101101
<eParameters name="libraryTypeName" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//String"/>
102102
</eOperations>
103-
<eOperations name="isCompatibleWith" ordered="false" lowerBound="1">
103+
<eOperations name="isCompatibleWith" ordered="false" lowerBound="1" eType="ecore:EDataType ../../org.eclipse.uml2.types/model/Types.ecore#//Boolean">
104104
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
105105
<details key="documentation" value="&lt;p>By default, this &lt;code>Type&lt;/code> is compatible with an &lt;code>otherType&lt;/code> if it directly or indirectly specializes the &lt;code>otherType&lt;/code>.&lt;/p>&#xA;specializes(otherType)"/>
106106
</eAnnotations>

org.omg.sysml/syntax-gen/org/omg/sysml/lang/sysml/Type.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,11 @@ public interface Type extends Namespace {
265265
* <p>By default, this <code>Type</code> is compatible with an <code>otherType</code> if it directly or indirectly specializes the <code>otherType</code>.</p>
266266
* specializes(otherType)
267267
* <!-- end-model-doc -->
268-
* @model otherTypeRequired="true" otherTypeOrdered="false"
268+
* @model dataType="org.omg.sysml.lang.types.Boolean" required="true" ordered="false" otherTypeRequired="true" otherTypeOrdered="false"
269269
* annotation="http://www.omg.org/spec/SysML"
270270
* @generated
271271
*/
272-
void isCompatibleWith(Type otherType);
272+
boolean isCompatibleWith(Type otherType);
273273

274274
/**
275275
* <!-- begin-user-doc -->

org.omg.sysml/syntax-gen/org/omg/sysml/lang/sysml/impl/SysMLPackageImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9233,7 +9233,7 @@ public void initializePackageContents() {
92339233
op = initEOperation(getType__SpecializesFromLibrary__String(), theTypesPackage.getBoolean(), "specializesFromLibrary", 1, 1, IS_UNIQUE, !IS_ORDERED);
92349234
addEParameter(op, theTypesPackage.getString(), "libraryTypeName", 1, 1, IS_UNIQUE, !IS_ORDERED);
92359235

9236-
op = initEOperation(getType__IsCompatibleWith__Type(), null, "isCompatibleWith", 1, 1, IS_UNIQUE, !IS_ORDERED);
9236+
op = initEOperation(getType__IsCompatibleWith__Type(), theTypesPackage.getBoolean(), "isCompatibleWith", 1, 1, IS_UNIQUE, !IS_ORDERED);
92379237
addEParameter(op, this.getType(), "otherType", 1, 1, IS_UNIQUE, !IS_ORDERED);
92389238

92399239
initEOperation(getType__Multiplicities(), this.getMultiplicity(), "multiplicities", 0, -1, IS_UNIQUE, IS_ORDERED);

org.omg.sysml/syntax-gen/org/omg/sysml/lang/sysml/impl/TypeImpl.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,9 +1084,9 @@ public boolean specializesFromLibrary(String libraryTypeName) {
10841084
* <!-- end-user-doc -->
10851085
* @generated
10861086
*/
1087-
public void isCompatibleWith(Type otherType) {
1087+
public boolean isCompatibleWith(Type otherType) {
10881088
try {
1089-
IS_COMPATIBLE_WITH_TYPE__EINVOCATION_DELEGATE.dynamicInvoke(this, new BasicEList.UnmodifiableEList<Object>(1, new Object[]{otherType}));
1089+
return (Boolean)IS_COMPATIBLE_WITH_TYPE__EINVOCATION_DELEGATE.dynamicInvoke(this, new BasicEList.UnmodifiableEList<Object>(1, new Object[]{otherType}));
10901090
}
10911091
catch (InvocationTargetException ite) {
10921092
throw new WrappedException(ite);
@@ -1495,8 +1495,7 @@ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTarg
14951495
case SysMLPackage.TYPE___SPECIALIZES_FROM_LIBRARY__STRING:
14961496
return specializesFromLibrary((String)arguments.get(0));
14971497
case SysMLPackage.TYPE___IS_COMPATIBLE_WITH__TYPE:
1498-
isCompatibleWith((Type)arguments.get(0));
1499-
return null;
1498+
return isCompatibleWith((Type)arguments.get(0));
15001499
case SysMLPackage.TYPE___MULTIPLICITIES:
15011500
return multiplicities();
15021501
}

0 commit comments

Comments
 (0)