Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Nested objects' connection handles not working within a compartment
Nested objects' connection handles not working within a compartment [message #557750] Wed, 08 September 2010 17:38 Go to next message
Asiri Rathnayake is currently offline Asiri RathnayakeFriend
Messages: 80
Registered: September 2010
Location: Colombo, Sri Lanka.
Member
Hi All,

I've been developing EMF based plugins for sometime but I'm pretty new to GMF - hence this newbie question. I have a model with small objects (say, Flowers) nested within a bigger container object (say, Basket) and two Flowers can be connected via a link object (FlowerLink), I'm using a Compartment (FlowerCompartment) for grouping / nesting Flowers inside the Basket. Everything works fine and I can nest Flowers inside the Basket (compartment) and link them with FlowerLinks using the FlowerLink creation tool. However the problem is that I cannot use the connection handles that appear on the Flower objects to make a link from one Flower object to another; when I drag a handle (either out-going or incoming) onto another flower, it simply shows that I cannot make such a link.

I think I'm missing something trivial but I couldn't find anything similar on the forum Sad - any pointers would be really helpful.

Thanks in advance.

- Asiri Rathnayake.
Re: Nested objects' connection handles not working within a compartment [message #557760 is a reply to message #557750] Wed, 08 September 2010 18:38 Go to previous messageGo to next message
Asiri Rathnayake is currently offline Asiri RathnayakeFriend
Messages: 80
Registered: September 2010
Location: Colombo, Sri Lanka.
Member
I couldn't give up, just found the answer to my question on this thread. Hope this will help someone someday! Smile

A big thanks to Mr. Peter Lang Cool

- Asiri Rathnayake.
Re: Nested objects' connection handles not working within a compartment [message #760838 is a reply to message #557760] Mon, 05 December 2011 12:26 Go to previous message
George  is currently offline George Friend
Messages: 1
Registered: December 2011
Junior Member
The link to the thread Asiri refers to above is dead, so I am adding the solution that worked for me here. Thanks to pointers from Asiri Smile
The generated plugin.xml in the xxx.diagram project has an extension point="org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders". The problem was resolved by adding references to the edit parts for the contained nodes under
<modelingAssistantProvider class="IvrBuilder.diagram.providers.Builder3ModelingAssistantProvider">.

By default the generator only adds references to editparts of nodes which are placed directly on the canvas. The generator generates different editparts for nodes that are placed in a container. So even if the .ecore has only one class representing the node e.g. MyNode, two independent editparts will be generated if that node can exist both on the canvas and in a container e.g. MyNodeEditPart and MyNode2EditPart. The generator will only add a reference to the first generated editpart (something like <object class="MyEditor.diagram.edit.parts.MyNodeEditPart" id="MyNode_2004"/>), the second contained one needed to be added manually.

If anyone knows of a way to have these added automatically by the generator, please update this thread
Previous Topic:problems with XYlayout
Next Topic:CompoundCommand (gmf)
Goto Forum:
  


Current Time: Thu Sep 26 00:57:30 GMT 2024

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

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

Back to the top