[Acceleo] How to get the value of a property (tagged value) [message #1095710] |
Tue, 27 August 2013 08:23  |
Eclipse User |
|
|
|
Hi everyone,
I have an UML model with a profile applied, one of the elements has an Stereotype applied called Workbench. There is another stereotype called Perspective.
So Workbench has a property(tagged value)referencing elements with the stereotype Perspective.
The problem for me is that this property is a Set of elements, so when I try to get this property I get the Set, but what I would like to do is get the elements contained in the set.
Is this possible?And if so, how could I do this?
I have tried several different things and I can't find a way, but I know that in the model the elements are linked, so I hope there is a way to get these elements.
Let me know if there's anything else you need to know.
Thanks in advance,
regards,
Javier
[Updated on: Wed, 28 August 2013 03:57] by Moderator
|
|
|
|
Re: [Acceleo] How to get the value of a property (tagged value) [message #1096494 is a reply to message #1096327] |
Wed, 28 August 2013 09:17  |
Eclipse User |
|
|
|
The following works on my side:
[query public getPointerKind(p : uml::Parameter) : String = p.getValue(p.getAppliedStereotype('functional_C::Pointer'), 'Pointer').oclAsType(uml::EnumerationLiteral).name
/]
This is an example in C with UML. The stereotype is applied on a function parameter and the query returns '**' or '*'.
|
|
|
Powered by
FUDForum. Page generated in 0.05720 seconds