|Stereotypes are not applied to exported MD-xmi files [message #717387]
||Sat, 20 August 2011 10:30
Originally posted by: Philipp Kalb|
I have a problem applying stereotypes to magic draw Eclipse UML2 v3.x
exported xmi files.
I create a class diagram with a profile in magic draw. The profile is
very simple and just adds a stereotype to one of the classes properties.
I export this file as an UML2 file and import it into my RCP
application. The general import works fine, I can go through all
information of the model and all elements of the profile. My problem is
that the stereotype is not applied to the property after the import.
If I use (a quit stupid) for-loop to manually apply the stereotype it
works fine. But of course this is a very static work around....
for ( Stereotype st2:slot.getDefiningFeature().getApplicableStereotypes())
if (slot.getDefiningFeature().getName().equals("state") &&
} //I hope the format is not too bad to read...
So I guess the profile is properly loaded, since the information is
already stored in the ApplicableStereotypes list and applying the
stereotype with the loop works fine.
Without the previous loop I can not get any applied stereotypes but of
course there should be some. If I query the model for applied profiles I
get the right ones, so the profile itself should be correctly loaded and
From the previous posts about stereotypes in this newsgroup I learned
that I must use absolute URL for file loading etc. but nothing helps :-(
Since I spent some hours with that problem now, I dare to ask if you
have any ideas or hints?
Powered by FUDForum
. Page generated in 0.07945 seconds