Commit 5d04d6bb authored by Philip Makedonski's avatar Philip Makedonski
Browse files

* fix for resolveBaseDataType in default Member/Parameter/SimpleDataInstance values, #213, #214

parent 7a48a0e5
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -361,7 +361,7 @@
  <eClassifiers xsi:type="ecore:EClass" name="AnyValue" eSuperTypes="#//SpecialValueUse">
    <eOperations name="resolveBaseDataType" eType="#//DataType">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="&#xA;                    if (not self.dataType.oclIsUndefined()) then&#xA;                        self.dataType&#xA;                    else &#xA;                        if (self.container().oclIsTypeOf(MemberAssignment)) then&#xA;                            self.container().oclAsType(MemberAssignment).member.dataType&#xA;                        else &#xA;                            if (self.container().oclIsTypeOf(ParameterBinding)) then&#xA;                                self.container().oclAsType(ParameterBinding).parameter.dataType&#xA;                            else&#xA;                                if (self.container().oclIsTypeOf(CollectionDataInstance)) then&#xA;                                    self.container().oclAsType(CollectionDataInstance).dataType.oclAsType(CollectionDataType).itemType&#xA;                                else&#xA;                                    if (self.container().oclIsTypeOf(DataElementUse)) then&#xA;                                        self.container().oclAsType(DataElementUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA;                                    else&#xA;                                        if (self.container().oclIsTypeOf(DataInstanceUse)) then&#xA;                                            self.container().oclAsType(DataInstanceUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA;                                        else&#xA;                                            null&#xA;                                        endif&#xA;                                    endif&#xA;                                endif&#xA;                            endif&#xA;                        endif&#xA;                    endif&#xA;                "/>
        <details key="body" value="&#xA;                    if (not self.dataType.oclIsUndefined()) then&#xA;                        self.dataType&#xA;                    else &#xA;                        if (self.container().oclIsTypeOf(MemberAssignment)) then&#xA;                            self.container().oclAsType(MemberAssignment).member.dataType&#xA;                        else &#xA;                            if (self.container().oclIsTypeOf(ParameterBinding)) then&#xA;                                self.container().oclAsType(ParameterBinding).parameter.dataType&#xA;                            else&#xA;                                if (self.container().oclIsTypeOf(CollectionDataInstance)) then&#xA;                                    self.container().oclAsType(CollectionDataInstance).dataType.oclAsType(CollectionDataType).itemType&#xA;                                else&#xA;                                    if (self.container().oclIsTypeOf(DataElementUse)) then&#xA;                                        self.container().oclAsType(DataElementUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA;                                    else&#xA;                                        if (self.container().oclIsTypeOf(DataInstanceUse)) then&#xA;                                            self.container().oclAsType(DataInstanceUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA;                                        else&#xA;                                            if (self.container().oclIsKindOf(Parameter)) then&#xA;                                                self.container().oclAsType(Parameter).dataType&#xA;                                            else&#xA;                                                if (self.container().oclIsTypeOf(SimpleDataInstance)) then&#xA;                                                    self.container().oclAsType(SimpleDataInstance).dataType&#xA;                                                else&#xA;                                                    null&#xA;                                                endif&#xA;                                            endif&#xA;                                        endif&#xA;                                    endif&#xA;                                endif&#xA;                            endif&#xA;                        endif&#xA;                    endif&#xA;                "/>
      </eAnnotations>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="dataType" eType="#//DataType"/>
@@ -370,7 +370,7 @@
  <eClassifiers xsi:type="ecore:EClass" name="DataInstanceUse" eSuperTypes="#//StaticDataUse">
    <eOperations name="resolveBaseDataType" eType="#//DataType">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="&#xA;                if (not self.dataInstance.oclIsUndefined()) then&#xA;                    self.dataInstance.dataType&#xA;                else &#xA;                    if (not self.dataType.oclIsUndefined()) then&#xA;                        self.dataType&#xA;                    else &#xA;                        if (self.container().oclIsTypeOf(MemberAssignment)) then&#xA;                            self.container().oclAsType(MemberAssignment).member.dataType&#xA;                        else &#xA;                            if (self.container().oclIsTypeOf(ParameterBinding)) then&#xA;                                self.container().oclAsType(ParameterBinding).parameter.dataType&#xA;                            else&#xA;                                if (self.container().oclIsTypeOf(CollectionDataInstance)) then&#xA;                                    self.container().oclAsType(CollectionDataInstance).dataType.oclAsType(CollectionDataType).itemType&#xA;                                else&#xA;                                    if (self.container().oclIsTypeOf(DataElementUse)) then&#xA;                                        self.container().oclAsType(DataElementUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA;                                    else&#xA;                                        if (self.container().oclIsTypeOf(DataInstanceUse)) then&#xA;                                            self.container().oclAsType(DataInstanceUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA;                                        else&#xA;                                            null&#xA;                                        endif&#xA;                                    endif&#xA;                                endif&#xA;                            endif&#xA;                        endif&#xA;                    endif&#xA;                endif&#xA;                "/>
        <details key="body" value="&#xA;                if (not self.dataInstance.oclIsUndefined()) then&#xA;                    self.dataInstance.dataType&#xA;                else &#xA;                    if (not self.dataType.oclIsUndefined()) then&#xA;                        self.dataType&#xA;                    else &#xA;                        if (self.container().oclIsTypeOf(MemberAssignment)) then&#xA;                            self.container().oclAsType(MemberAssignment).member.dataType&#xA;                        else &#xA;                            if (self.container().oclIsTypeOf(ParameterBinding)) then&#xA;                                self.container().oclAsType(ParameterBinding).parameter.dataType&#xA;                            else&#xA;                                if (self.container().oclIsTypeOf(CollectionDataInstance)) then&#xA;                                    self.container().oclAsType(CollectionDataInstance).dataType.oclAsType(CollectionDataType).itemType&#xA;                                else&#xA;                                    if (self.container().oclIsTypeOf(DataElementUse)) then&#xA;                                        self.container().oclAsType(DataElementUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA;                                    else&#xA;                                        if (self.container().oclIsTypeOf(DataInstanceUse)) then&#xA;                                            self.container().oclAsType(DataInstanceUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA;                                        else&#xA;                                            if (self.container().oclIsKindOf(Parameter)) then&#xA;                                                self.container().oclAsType(Parameter).dataType&#xA;                                            else&#xA;                                                null&#xA;                                            endif&#xA;                                        endif&#xA;                                    endif&#xA;                                endif&#xA;                            endif&#xA;                        endif&#xA;                    endif&#xA;                endif&#xA;                "/>
      </eAnnotations>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="dataInstance" eType="#//DataInstance"/>
@@ -500,7 +500,7 @@
  <eClassifiers xsi:type="ecore:EClass" name="TestConfiguration" eSuperTypes="#//PackageableElement">
    <eOperations name="compatibleWith" 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="self.componentInstance->forAll(c | cb->exists(formalComponent = c)) and&#xA;self.connection->forAll(c1 | tc.connection->exists(c2 |&#xA;&#x9;c1.endPoint->reject(ep1 | c2.endPoint->exists(ep2 |&#xA;&#x9;&#x9;cb->any(formalComponent = ep1.component).actualComponent = ep2.component and ep1.gate = ep2.gate&#xA;&#x9;))->isEmpty()&#xA;))"/>
        <details key="body" value="self.componentInstance->forAll(c | cb->exists(formalComponent = c)) and&#xA;                  self.connection->forAll(c1 | tc.connection->exists(c2 |&#xA;&#x9;                   c1.endPoint->reject(ep1 | c2.endPoint->exists(ep2 |&#xA;&#x9;&#x9;                  cb->any(formalComponent = ep1.component).actualComponent = ep2.component and &#xA;&#x9;&#x9;                  ep1.gate = ep2.gate&#xA;            &#x9;       ))->isEmpty()&#xA;                  ))"/>
      </eAnnotations>
      <eParameters name="tc" lowerBound="1" eType="#//TestConfiguration"/>
      <eParameters name="cb" ordered="false" upperBound="-1" eType="#//ComponentInstanceBinding"/>
@@ -871,7 +871,7 @@
  <eClassifiers xsi:type="ecore:EClass" name="DataElementUse" eSuperTypes="#//DataUse">
    <eOperations name="resolveBaseDataType" eType="#//DataType">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="&#xA;                if (not self.dataElement.oclIsUndefined()) then&#xA;                    if (self.dataElement.oclIsKindOf(DataType)) then&#xA;                        self.dataElement.oclAsType(DataType)&#xA;                    else&#xA;                        if (self.dataElement.oclIsKindOf(DataInstance)) then&#xA;                            self.dataElement.oclAsType(DataInstance).dataType&#xA;                        else &#xA;                            if (self.dataElement.oclIsTypeOf(FormalParameter)) then&#xA;                                self.dataElement.oclAsType(FormalParameter).dataType&#xA;                            else &#xA;                                if (self.dataElement.oclIsTypeOf(Function)) then&#xA;                                    self.dataElement.oclAsType(Function).returnType&#xA;                                else&#xA;&#x9;                                if (self.dataElement.oclIsTypeOf(Variable)) then&#xA;&#x9;                                    self.dataElement.oclAsType(Variable).dataType&#xA;&#x9;                                else&#xA;                                    &#x9;null&#xA;                                    endif&#xA;                                endif&#xA;                            endif &#xA;                        endif&#xA;                    endif&#xA;                else &#xA;                    if (self.container().oclIsTypeOf(MemberAssignment)) then&#xA;                        self.container().oclAsType(MemberAssignment).member.dataType&#xA;                    else &#xA;                        if (self.container().oclIsTypeOf(ParameterBinding)) then&#xA;                        &#x9;self.container().oclAsType(ParameterBinding).resolveParameterType()&#xA;                        else&#xA;                            if (self.container().oclIsTypeOf(CollectionDataInstance)) then&#xA;                                self.container().oclAsType(CollectionDataInstance).dataType.oclAsType(CollectionDataType).itemType&#xA;                            else&#xA;                                if (self.container().oclIsTypeOf(DataElementUse)) then&#xA;                                &#x9;if (self.container().oclAsType(DataElementUse).resolveDataType()->isEmpty()) then&#xA;                                &#x9;&#x9;null&#xA;                                &#x9;else&#xA;                                    &#x9;self.container().oclAsType(DataElementUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA;                                &#x9;endif&#xA;                                else&#xA;                                    if (self.container().oclIsTypeOf(DataInstanceUse)) then&#xA;&#x9;                                &#x9;if (self.container().oclAsType(DataInstanceUse).resolveDataType()->isEmpty()) then&#xA;&#x9;                                &#x9;&#x9;null&#xA;&#x9;                                &#x9;else&#xA;                                        &#x9;self.container().oclAsType(DataInstanceUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA;&#x9;                                &#x9;endif&#xA;                                    else&#xA;                                        null&#xA;                                    endif&#xA;                                endif&#xA;                            endif&#xA;                        endif&#xA;                    endif&#xA;                endif&#xA;                "/>
        <details key="body" value="&#xA;                if (not self.dataElement.oclIsUndefined()) then&#xA;                    if (self.dataElement.oclIsKindOf(DataType)) then&#xA;                        self.dataElement.oclAsType(DataType)&#xA;                    else&#xA;                        if (self.dataElement.oclIsKindOf(DataInstance)) then&#xA;                            self.dataElement.oclAsType(DataInstance).dataType&#xA;                        else &#xA;                            if (self.dataElement.oclIsTypeOf(FormalParameter)) then&#xA;                                self.dataElement.oclAsType(FormalParameter).dataType&#xA;                            else &#xA;                                if (self.dataElement.oclIsTypeOf(Function)) then&#xA;                                    self.dataElement.oclAsType(Function).returnType&#xA;                                else&#xA;&#x9;                                if (self.dataElement.oclIsTypeOf(Variable)) then&#xA;&#x9;                                    self.dataElement.oclAsType(Variable).dataType&#xA;&#x9;                                else&#xA;                                    &#x9;null&#xA;                                    endif&#xA;                                endif&#xA;                            endif &#xA;                        endif&#xA;                    endif&#xA;                else &#xA;                    if (self.container().oclIsTypeOf(MemberAssignment)) then&#xA;                        self.container().oclAsType(MemberAssignment).member.dataType&#xA;                    else &#xA;                        if (self.container().oclIsTypeOf(ParameterBinding)) then&#xA;                        &#x9;self.container().oclAsType(ParameterBinding).resolveParameterType()&#xA;                        else&#xA;                            if (self.container().oclIsTypeOf(CollectionDataInstance)) then&#xA;                                self.container().oclAsType(CollectionDataInstance).dataType.oclAsType(CollectionDataType).itemType&#xA;                            else&#xA;                                if (self.container().oclIsTypeOf(DataElementUse)) then&#xA;                                &#x9;if (self.container().oclAsType(DataElementUse).resolveDataType()->isEmpty()) then&#xA;                                &#x9;&#x9;null&#xA;                                &#x9;else&#xA;                                    &#x9;self.container().oclAsType(DataElementUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA;                                &#x9;endif&#xA;                                else&#xA;                                    if (self.container().oclIsTypeOf(DataInstanceUse)) then&#xA;&#x9;                                &#x9;if (self.container().oclAsType(DataInstanceUse).resolveDataType()->isEmpty()) then&#xA;&#x9;                                &#x9;&#x9;null&#xA;&#x9;                                &#x9;else&#xA;                                        &#x9;self.container().oclAsType(DataInstanceUse).resolveDataType().oclAsType(CollectionDataType).itemType&#xA;&#x9;                                &#x9;endif&#xA;                                    else&#xA;                                        if (self.container().oclIsKindOf(Parameter)) then&#xA;                                            self.container().oclAsType(Parameter).dataType&#xA;                                        else&#xA;                                            if (self.container().oclIsTypeOf(SimpleDataInstance)) then&#xA;                                                self.container().oclAsType(SimpleDataInstance).dataType&#xA;                                            else&#xA;                                                null&#xA;                                            endif&#xA;                                        endif&#xA;                                    endif&#xA;                                endif&#xA;                            endif&#xA;                        endif&#xA;                    endif&#xA;                endif&#xA;                "/>
      </eAnnotations>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="unassignedMember" eType="#//UnassignedMemberTreatment"/>