Cannot get Instances of Applied Stereotypes [message #1753184] |
Thu, 02 February 2017 09:20  |
Eclipse User |
|
|
|
Hello everyone,
I've an problem with getting instances of UML sereotype applications.
I think I've some problem with the registration of the generated EMF code but I am not able to figure out where the problem is.
In advance I am executing everything in the Eclipse context.
My problem is that a call to Element.getStereotypeApplications() only returns a List of DynamicEObjectImpl instances instead of instances of the according EClasses. However, every DynamicEObjectImpl represents the correct EClass and has somehow also a List with the right values for EAttributes.
Ok, what have I done:
I defined a UML profile and for use in Papyrus I created the following two entries in my plugin.xml:
<extension point="org.eclipse.papyrus.uml.extensionpoints.UMLProfile">
<profile
iconpath="icons/Logo16x16.png"
name="UMLsec.Variability"
path="pathmap://UMLsec/Variability.uml">
</profile>
</extension>
<extension point="org.eclipse.emf.ecore.uri_mapping">
<mapping
source="pathmap://UMLsec/Variability.uml"
target="platform:/plugin/carisma.profile.umlsec.variability/profile/variability.profile.uml">
</mapping>
</extension>
And inside of Papyrus everything is working fine.
However, I have the problem described above at the point where I am processing the created models.
Until now I tried to register the model at the following extension points but it made no differences:
org.eclipse.uml2.uml.dynamic_package
org.eclipse.uml2.uml.generated_package
If I register a genmodel created from the profile under the same URI at org.eclipse.emf.ecore.generated_package, I get a collision and a call to Element.getStereotypeApplications() or Element.getAppliedStereotypes() returns an empty List.
Therefore, I tried also to register the genmodel with an URI containing a postfix. But this only resolves the collision but makes no difference for my main problem.
I hope I din't forget to mention anything important. Hopefully, you are able to help me.
Thank you very much
Sven
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03945 seconds