Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Unable to get hierarchy in table
Unable to get hierarchy in table [message #1231402] Tue, 14 January 2014 15:41 Go to next message
Wilbert Alberts is currently offline Wilbert AlbertsFriend
Messages: 209
Registered: June 2010
Senior Member
Hi,

I try to put a bounded recursive structure in a table. The meta model contains a class C which on its turn might contain another instance of type C.

C <>---> [0..1] C

I created an model instance looking like: c1{c2{c3}}. So c1 contains c2 which contains c3 which does not contain any C instance anymore.

I would like to visualize this in a table like:

c1
+--c2
   +--c3

Therefore I created a linemapping CLineMapping which imports itself in order to facilitate the recursion.

However I end up with a table looking like:

c1
+--c2
   +--c3
c2
+--c3
c3


So c2 and c3 are present multiple times. How do I limit them? I suppose that this is a rather trivial task and I must be overlooking something but I don't see it.

Any ideas?

Greetings,
Wilbert.

Re: Unable to get hierarchy in table [message #1231409 is a reply to message #1231402] Tue, 14 January 2014 16:00 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
Hi Wilbert,

It seems that your 'Semantic Candidates Expression' on your line mapping
is not restrictive enough. Try to restrict the semantic candidates to
the first containment level with this expression for example:
[eContents()/]

Best regards,

Florian

On 14/01/2014 16:41, Wilbert Alberts wrote:
> Hi,
> I try to put a bounded recursive structure in a table. The meta model
> contains a class C which on its turn might contain another instance of
> type C.
>
> C <>---> [0..1] C
>
> I created an model instance looking like: c1{c2{c3}}. So c1 contains c2
> which contains c3 which does not contain any C instance anymore.
>
> I would like to visualize this in a table like:
>
> c1
> +--c2
> +--c3
> Therefore I created a linemapping CLineMapping which imports itself in
> order to facilitate the recursion.
>
> However I end up with a table looking like:
>
> c1
> +--c2
> +--c3
> c2
> +--c3
> c3
>
> So c2 and c3 are present multiple times. How do I limit them? I suppose
> that this is a rather trivial task and I must be overlooking something
> but I don't see it.
>
> Any ideas?
>
> Greetings,
> Wilbert.
>
>
Re: Unable to get hierarchy in table [message #1231412 is a reply to message #1231409] Tue, 14 January 2014 16:08 Go to previous message
Wilbert Alberts is currently offline Wilbert AlbertsFriend
Messages: 209
Registered: June 2010
Senior Member
Marvellous!

That did the trick. I knew it had to be something simple.

Thanks!

Greetings,
Wilbert.
Previous Topic:Unable to show derived values in table colum
Next Topic:Transparent Diagram elements + Layout algorhitms
Goto Forum:
  


Current Time: Sat Apr 27 04:06:44 GMT 2024

Powered by FUDForum. Page generated in 0.03165 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top