Link mappings for inherited associations [message #96464] |
Thu, 25 January 2007 02:13  |
Eclipse User |
|
|
|
Hello,
I want to be able to support connections that correspond to
associations between abstract classes.
Currently, using the Wizard, I get Link Mappings generated
for each of the sub-classes. However, it would be much more
convenient to have *one* Link Mapping that
can be used between all sub-classes.
Is this possible, and if so, how would I specify that the Link
Mapping is to be applied across all superclasses?
Thanks,
Andy
|
|
|
|
|
|
|
Re: Link mappings for inherited associations [message #97120 is a reply to message #97105] |
Fri, 26 January 2007 02:16   |
Eclipse User |
|
|
|
Further to this.
If I don't set Containment Feature or the Element, but just set
Target Feature to be composed_of, I can then connect between
subclass elements.
However, the default toolbar icon is still blank (red)
Andy
"ase" <andye@xactium.com> wrote in message
news:epc9cg$d6m$1@utils.eclipse.org...
> Hi Alex,
>
> I have an abstract class A, with subclasses B and C
>
> A has a "composed_of" aggregation to itself.
>
> I create a Link Mapping with:
>
> Containment Feature: composed_of
> Element: A
> Target Feature: composed_of
>
> 2 problems occur:
>
> You cannot connect between B, C or to themselves
> The Toolbar icon for the connection disappears (red box)
>
> However, if I select a subclass of A in the Link Mapping as the
> Element, it works ok for just that sub-class.
>
> I'm using 2.0-M4
>
> Any thoughts? Perhaps if I don't use an aggregation?
>
> Andy
>
>
>
>
> "Alex Shatalin" <vano@borland.com> wrote in message
> news:3c3172e6f49c8c90e9898c938e1@news.eclipse.org...
>> Hello ase,
>>
>> It should be possible to create link mapping using features from abstract
>> class and only one link should be created in this case. Can you do it
>> using .gmfmap editor?
>>
>> -----------------
>> Alex Shatalin
>>
>>
>>
>
>
|
|
|
Re: Link mappings for inherited associations [message #97872 is a reply to message #97105] |
Mon, 29 January 2007 06:42  |
Eclipse User |
|
|
|
Hello ase,
> I create a Link Mapping with:
>
> Containment Feature: composed_of
> Element: A
> Target Feature: composed_of
> 2 problems occur:
There are 3 possible types of links in GMF:
1. Reference-only link (target feature of the link is specified + this feature
is not containment)
2. Containment Reference modelled as a link (target feature of the link is
specified + this feature is containment) - these types of the links could
connect only top-level diagram elements
3. Links with classes (containment feature + element + target feature are
specified, target feature is not containment)
So, you have to choose one of these types of the links (3?). The rest is
not supported (case 3 + target feature is containment as in your use case).
-----------------
Alex Shatalin
|
|
|
Powered by
FUDForum. Page generated in 0.03853 seconds