Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Link mappings for inherited associations
Link mappings for inherited associations [message #96464] Thu, 25 January 2007 02:13 Go to next message
Eclipse UserFriend
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 #96662 is a reply to message #96464] Thu, 25 January 2007 07:05 Go to previous messageGo to next message
Eclipse UserFriend
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 #96781 is a reply to message #96662] Thu, 25 January 2007 09:16 Go to previous messageGo to next message
Eclipse UserFriend
> 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?

This does work..I've done it. As long as the source and target objects
are for the abstract classes you're good. (Now, about the situation
where there is *no* domain conneciton..see msg below ;))

While we're on this subject, is there a way to accomp;ish an analagos
thing with nodes just using gmfmap? IOTW, I'v got some generic thing
I'd like to do with abstract node(s), and then specialize them, but
there doesn't seem to be any implementation inheiritance mechanism, so
I end up having to repeat node defintions for each node subclass?




On 2007-01-25 07:05:18 -0500, Alex Shatalin <vano@borland.com> said:

> 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 #96862 is a reply to message #96781] Thu, 25 January 2007 10:46 Go to previous messageGo to next message
Eclipse UserFriend
Hello Miles,

Currently GMF support design-only links. These links can be drawn from any
diagram element to any diagram element. Am I answering the question you'd
like to ask or something else?.. :-)

-----------------
Alex Shatalin
Re: Link mappings for inherited associations [message #97105 is a reply to message #96662] Fri, 26 January 2007 02:07 Go to previous messageGo to next message
Eclipse UserFriend
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 #97120 is a reply to message #97105] Fri, 26 January 2007 02:16 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Increasing Line Width of a PolylineConnectionEx Figure
Next Topic:Auto Resizing Parent Node as child nodes are added,removed or resized.
Goto Forum:
  


Current Time: Mon May 12 16:53:42 EDT 2025

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

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

Back to the top