Stereotype application problem [message #732267] |
Tue, 04 October 2011 11:23 |
Alexander Weickmann Messages: 33 Registered: July 2009 |
Member |
|
|
Hi,
I have a problem concerning the application of stereotypes to association member ends using the Eclipse UML2 API.
- Custom UML-Profile that defines some stereotypes
- Two separate UML2 models
- Model 2 imports model 1 using <Package Import>
I have a class in model 1 (ClassA) and another class in model 2 (ClassB). Now I create an association from ClassB to ClassA. I want to apply stereotypes to the member end properties. I am doing this programatically:
association.getMemberEnds().get(0).applyStereotype(memberStereotype);
association.getMemberEnds().get(1).applyStereotype(memberStereotype);
Even though the code is executed and getAppliedStereotypes() returns the expected stereotype afterwards, this is not saved to the UML model file. However, it works if the target class originates from the same model and not from an imported model. So an association from ClassB to another ClassC that is in the same model as ClassB works.
You can see the problem more easily in the attached image.
Thanks in advance for any help.
|
|
|
Powered by
FUDForum. Page generated in 0.03061 seconds