Links and subclasses [message #60622] |
Tue, 10 October 2006 09:04  |
Eclipse User |
|
|
|
Originally posted by: contact.noelios.com
Let's say that in my ECore model I have 4 classes (see below). A is
abstract, A1, A2 and B correspond to visual nodes.
A B
/ \
A1 A2
Now, I want to allow links from A1 or A2 to B. In reality I have many
subclasses of A, so I want to specify one mapping if possible. I created
a Link class with two properties: "source : A" and "target : B".
Now, if I create a mapping in .gmfmap based on this Link class, I can't
draw the links at runtime. It seems that GMF or EMF don't recognize A1
or A2 instances as valid values for the Link's "source" property.
Is this the intended behavior? What are the workarounds?
Thanks,
--
Jerome Louvel
http://www.noelios.com
|
|
|
Re: Links and subclasses [message #60650 is a reply to message #60622] |
Wed, 11 October 2006 04:46  |
Eclipse User |
|
|
|
Originally posted by: tobk.gmx.de
Jerome Louvel wrote:
> Let's say that in my ECore model I have 4 classes (see below). A is
> abstract, A1, A2 and B correspond to visual nodes.
>
> A B
> / \
> A1 A2
>
> Now, I want to allow links from A1 or A2 to B. In reality I have many
> subclasses of A, so I want to specify one mapping if possible. I created
> a Link class with two properties: "source : A" and "target : B".
>
> Now, if I create a mapping in .gmfmap based on this Link class, I can't
> draw the links at runtime. It seems that GMF or EMF don't recognize A1
> or A2 instances as valid values for the Link's "source" property.
>
> Is this the intended behavior? What are the workarounds?
It should work (at least it works for me). How did you configure the Link
mapping?
Do A1,A2 or B have Compartents? In that case it's important to aim for the
Node's label and not for the compartment.
|
|
|
Powered by
FUDForum. Page generated in 0.03267 seconds