|
Re: problems saving stereotypes [message #1800651 is a reply to message #1800647] |
Fri, 04 January 2019 13:25 |
|
Hi, Gary,
Did you remember to add your stereotype applications (instances) to the contents of the resource before saving it? This will happen automatically if your UML package is already in the resource before any stereotypes are applied to elements. Otherwise, you may have to track down all the stereotype applications and add them yourself. Note that the return result from Element::applyStereotype(...) is the stereotype application/instance that needs to be added to the Resource::getContents() list.
Profiles applied to a package are implicitly applied to all packages within it. However, it's possible that a Packages within a Component don't "see" profiles applied to packages containing the component, but of course I would never recommend putting packages in components anyways.
A "static profile" is just a profile that has been imported into an EMF generator model (*.genmodel) and generated to code. So, it provides a generated Java API and EPackage implementation for working with stereotype instances, just like any other EMF-generated model (including UML, itself). It can be easier to manipulate the properties of stereotypes this way, rather than relying on the Element::set/getValue(Stereotype, ...) API.
HTH,
Christian
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04397 seconds