|
Re: Eclipse Sirius: How to access ancestors of the EObject of a line mapping? [message #1695974 is a reply to message #1695259] |
Wed, 20 May 2015 16:46  |
|
Le 13/05/2015 15:23, Vijetha Shivarudraiah a écrit :
> I have tried giving this value to the LabelExpression of the
> column"[lineSemantic.oclAsType(<myClassForTheLineMapping>).ancestors().eContainer(<AncestorClassName>)/].
> This doesn't seem to work.
>
> I have tried giving "[thisEObject.ancestors()/]" value to the Associated
> Elements expression. But I don't know how to make us of it to display
> the value in the column.
>
>
Hi
Could you precise what you expect as a result please.
> column"[lineSemantic.oclAsType(<myClassForTheLineMapping>).ancestors()
As ancestors is not a method specific to <myClassForTheLineMapping> you
can do without oclAsType
Based of what I guessed :
> ... .ancestors().eContainer(<AncestorClassName>)
If you want the first ancestor of type <AncestorClassName> just use
eContainer(<AncestorClassName>)
Or if you want all ancestors of type <AncestorClassName> use
ancestors(<AncestorClassName>)
So it would become [lineSemantic.eContainer(<AncestorClassName>)/] or
[lineSemantic.ancestors(<AncestorClassName>)/]
Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.01267 seconds