|
Re: Grouping items in a table [message #1711395 is a reply to message #1710735] |
Thu, 15 October 2015 14:23 |
|
Le 08/10/2015 20:23, Hallvard Trætteberg a écrit :
> Hi,
>
> I have a Table line that contains a lot of elements, each of which are
> related to a year: S1 contains S2 and S2 has a feature referencing S3
> which has a year. The S3 object are contained elsewhere (in S1's
> parent). I would like show the S2 object under S1, but group them under
> S3s, so that I get another level:
> - S1
> --S3
> ---S2
>
> Is it possible to group element in a list this way?
yes it is.
You can either write you own expression query or call a service
If you work on Sirius 3, I advise that you use AQL as query language.
It is the recommended and the simplier one. Here is the doc [1]
You can use standard aql services filter, including or eInverse(to get
the inverse references) etc
If you think the query is too complicated you can call a java service
that will return the candidates elements. See doc [2]
>
> I can easily create a Semantic Candidate to get the S3s in a line
> underneath the S1s. But then I have problems getting the S2s that both
> are related to S2 and contained in the S1 at the top. Is it possible for
> a Semantic Candidate Expression to refer to both the target element
> (i.e. self in this context) AND its parent? Then I can do something like
> parent.s2s.filter(s2|s2.s3 = self).
>
> Hallvard
[1] https://www.eclipse.org/acceleo/documentation/aql.html
[2]
http://help.eclipse.org/mars/topic/org.eclipse.sirius.doc/doc/specifier/general/Writing_Queries.html?cp=69_2_7_6#service_methods
Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.03805 seconds