getValue and 1..* [message #673418] |
Mon, 23 May 2011 15:09  |
Eclipse User |
|
|
|
Hi !
I've got a Stereotype with a few attributes, but one of thoses got a 1..* multiplicity.
While i can cast the getValue object in a DynamicEObjectImpl for 1..1, and then use dynamicGet(0) to obtain the needed object, everythings i tried with 1..* property return void.
Can someone help me for this ?
Thanks !
|
|
|
Re: getValue and 1..* [message #673954 is a reply to message #673418] |
Wed, 25 May 2011 09:25   |
Eclipse User |
|
|
|
If your stereotype's attribute is 1..*, Element.getValue(Steretotype, String) should return a List.
You may try to get the tagged value directly from your stereotype application on your element:
// eObject here is the holder of tagged values
EObject eObject = element.getStereotypeApplication(stereotype);
then, try to get the value of the your stereotype feature:
EStructuralFeature eSF = eObject.eClass().getEStructuralFeature(nameOfYourStereotypeAttribute);
Object taggedValue = eObject.eGet(eSF);
Debug the type of taggedValue, you should have some clues I suggest also you post your question on the MDT-UML2 forum as they are the real UML2 specialists!
Best Regards,
Mikael
|
|
|
|
Powered by
FUDForum. Page generated in 0.03917 seconds