| [Acceleo] Papyrus UML Profiles [message #655883] |
Tue, 22 February 2011 20:39  |
No real name Messages: 5 Registered: February 2011 |
Junior Member |
|
|
Hi,
I created an UML profile with Papyrus, and now I have a model.profile.uml file with the metamodel, and an instance of this metamodel in instance.uml.
Now I'd like to generate code from it using Acceleo. Can I somehow import the meta-model into a template? I already tried to reference it via "platform:/resource/path_to_the_profile", but it keeps telling me that the metamodel couldn't be resolved.
Do I have to use the standard UML2 metamodel instead and use UML APIs, like getAppliedStereotypes(), instead?
Thanks in advance,
Jay
EDIT
Sorry for the double post, my connection lagged and I hit the submit button twice.
[Updated on: Tue, 22 February 2011 20:44] Report message to a moderator
|
|
|
|
| Re: [Acceleo] Papyrus UML Profiles [message #656057 is a reply to message #655883] |
Wed, 23 February 2011 17:31   |
Philippe Palau Messages: 13 Registered: February 2011 |
Junior Member |
|
|
Hi Jay,
Perhaps i don't understand your question.
You created an uml profile, i' think you use it in a Uml model. If you intend to generate with acceleo from this model, you can access stereotype applied to your model elements with code like this :
[query public hasStereotype(e : Element, stereotypeName : String) : Boolean = (not self.getAppliedStereotype(stereotypeNameoclIsUndefined())/]
[query public stereoPropValue(e : Element, stereotypeName : String, propertyName : String) : String =
e.getValue(e.getAppliedStereotype(stereotypeName), propertyName)/]
stereotypeName must be qualified like this:
ProfileName::StereotypeName
Best regards
sorry i' double post too
[Updated on: Wed, 23 February 2011 17:36] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02146 seconds