I am trying to execute a transformation to generate code from UML models.
Given the following piece of the UML model:
<ownedAttribute xmi:id="_o3ZeEMoOEd6s0aPOcCHGGw" name="number" aggregation="composite">
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Integer"/>
I want to get the type of the attribute number. The following line is supposed to return "Integer":
It does return "Integer" when I run the transformation in the MOFScript Eclipse plugin, but when I try to run the transformation programmatically, it returns nothing.
If this may help you help me, the code "self.type" returns:
org.eclipse.uml2.uml.internal.impl.PrimitiveTypeImpl@1428ea (eProxyURI: pathmap://UML_METAMODELS/UML.metamodel.uml#Integer)
when the transformation is executed programmatically;
org.eclipse.uml2.uml.internal.impl.PrimitiveTypeImpl@124a99a (name: Integer, visibility: <unset>) (isLeaf: false, isAbstract: false)
when the transformation is executed in the plugin.
Does anyone know what might be happening?