Stereotypes are lost when model is saved [message #572198] |
Thu, 18 January 2007 15:48 |
Francisco Gortázar Messages: 20 Registered: July 2009 Location: Spain |
Junior Member |
|
|
Hi,
I'm trying to save a model containing elements with some stereotypes
applied. I'm using the code from UML2 article to programmatically apply
stereotypes. When the model is saved, the stereotypes are lost. However,
when debugging the application the stereotypes seem to be correctly
applied. Any suggestions?
I'm using Eclipse 3.2, UML 2.0.2. EMF 2.2.0, and I'm applying the
stereotypes as follows:
Model theModel = UMLFactory.eINSTANCE.createModel();
theModel.setName("ASModel");
Profile profile = (Profile) load(
URI.createURI("platform:/resource/parserProfile.uml"));
UML2Article.applyProfile(theModel, profile);
Class umlClass = theModel.createOwnedClass("MyClass", false);
Stereotype typeStereotype = profile.getOwnedStereotype("type");
UML2Article.applyStereotype(umlClass, typeStereotype);
savePackage("SimpleStereotypeUsage.uml", theModel);
this.printAppliedStereotypes(umlClass, ""); // OK: prints "type"
Thank you,
Patxi
http://www.gavab.es/eclipsegavab
http://sidelab.wordpress.com
|
|
|
Powered by
FUDForum. Page generated in 0.05971 seconds