Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to model edges from and to nodes with compartments?
How to model edges from and to nodes with compartments? [message #491024] Mon, 12 October 2009 20:25 Go to next message
TL is currently offline TLFriend
Messages: 22
Registered: July 2009
Junior Member
Hi everyone,

I am wondering how it would be possible to achieve that I can connect 2
nodes that have compartments when the mouse is over the compartment that
is contained in the node. Currently I can only connect these 2 nodes
when I am not on the compartment part of the node. Please look at the
following examples to understand the issue.

Here is an example that shows that a connection to the state node is not
possible when the mouse is over the compartment of that state:
http://www.mypicx.com/uploadimg/2116030018_10122009_1.bmp

Here are some of the connections that the user can draw (it is obvious
that these connections can only be made from and to the label section
i.e., where the compartment is not present):
http://www.mypicx.com/uploadimg/1938931859_10122009_1.bmp

My stateFigure that represents the node has a BorderLayout and contains
a Rectangle compartmentStateFigurewhich, which has a BorderLayoutData
(Alignment = CENTER & Vertical = true).

Best regards,
Tomaz L.
Re: How to model edges from and to nodes with compartments? [message #491488 is a reply to message #491024] Wed, 14 October 2009 18:54 Go to previous messageGo to next message
Alex Shatalin is currently offline Alex ShatalinFriend
Messages: 141
Registered: July 2009
Senior Member
Hello T,

I suggest you playing with the EditPolicies for child compartment - you have
to install some special EditPolicy redirecting request to the parent node
(diargram element) instead of compartment.

-----------------
Alex Shatalin
Re: How to model edges from and to nodes with compartments? [message #524096 is a reply to message #491488] Tue, 30 March 2010 16:36 Go to previous message
TL is currently offline TLFriend
Messages: 22
Registered: July 2009
Junior Member
Hi Alex (and everyone else),

I am unable to figure out how to accomplish that my compartment would
act as a part of its parent node so that it would be accepted as a
source/target node for connections (current behavior:
http://www.mypicx.com/uploadimg/2116030018_10122009_1.bmp)

I don't even know which EditPolicyRole is responsible for handling the
scenario, where we are attempting to connect a connection as a
source/target node through its compartment. Also I don't know, which
RequestConstant is fired when this event arises (I think that this
should be handled when the mouse is over the compartment of a node).

Is there any way to easily delegate the functionality of the EditPolicy
of the Compartment to its parent i.e., the container Node?

I have searched the mailing list for hints, but have not found anything.
Please help me to figure out the algorithm this task.

Best regards
-----------
T L

Alex Shatalin pravi:
> Hello T,
>
> I suggest you playing with the EditPolicies for child compartment - you
> have to install some special EditPolicy redirecting request to the
> parent node (diargram element) instead of compartment.
>
> -----------------
> Alex Shatalin
>
>
Previous Topic:Validation - diagram element decorator problem
Next Topic:HELP for how to go about GMF
Goto Forum:
  


Current Time: Thu Apr 25 12:53:03 GMT 2024

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

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

Back to the top