Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Custom GMF mapping for links
Custom GMF mapping for links [message #642931] Fri, 03 December 2010 11:51 Go to next message
Kalin Nakov is currently offline Kalin NakovFriend
Messages: 6
Registered: October 2010
Junior Member
Greetings,

I have two graphical nodes, A and B. I want to connect them with a graphical
link (UML composition), indicating the containment relationship between A
and B and thus mapped to the containment EReference from the underlying EMF
model. I have my custom code generators and use the GMF runtime directly. I
have some progress with the implementation, but I am not sure if custom
mapping is supported by GMF at all. I am afraid I introduce too many hacks
in the code.

As far as I am aware, GMF requires a semantic element bound to the GMF Edge
with from & to EStructuralFeatures, which is not the case in my application.
For containment, GMF provides compartments and they work fine, but I want to
express the containment using UML composition links.

Is this possible? Are there some guidelines which I could follow to
implement such custom mapping?

Thanks in advance,
Kalin
Re: Custom GMF mapping for links [message #642948 is a reply to message #642931] Fri, 03 December 2010 13:30 Go to previous message
Michael Golubev is currently offline Michael GolubevFriend
Messages: 383
Registered: July 2009
Senior Member
Hello,

My experience with UML2Tools forces me to believe that supporting of the non-trivial links in the codegeneration is one of the most important features for GMF in Indigo.

However, your particular case is directly supported in GMF tooling, at least in case if nodes A and B are top level at the diagram.

In the link mapping, just set the target feature to A#myContainedB and leave all other properties empty.

Note that it will introduce so-called "phantoms" support for nodes B, that is the diagram now will have to deal with the cases when node B is already added to diagram but not yet connected with any A's, so it does not have a container. The phantoms introduces a couple of new problems and had been discussed in this news group earlier.

Regards,
Michael
Previous Topic:Multiple Node creation
Next Topic:Generate diagram instance from ecore-instance
Goto Forum:
  


Current Time: Sat Apr 20 00:26:13 GMT 2024

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

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

Back to the top