Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Specify what to use as Link containers
Specify what to use as Link containers [message #58022] Mon, 02 October 2006 07:38 Go to next message
Eclipse UserFriend
Originally posted by: tobk.gmx.de

Hello,

is there a way to specify in GMF where to create links in, when both the
links source and the source's container provide the necessary feature?

Example:
-Composite
+-nodes: Nodes
+-connections: Connection
-Node -> Composite
-Connection
+-source:Node
+-target:Node

Node extends Composite, and by this it can hold nodes and connections again
(e.g. like state machines). Im the GMF mapping I specified a link mapping
with containment feature set to 'connections' and source and target to
'source' and 'target'. Now, when I create two Nodes on the and a connection
between them, the connection in stored in the source node's connections
feature, instead of the source node's container's connections feature.

I'd prefer to hold the connections in the composite, so I can more easily
iterate over them.

I was able to fix this manually by adapting the getElementToEdit method
inside of
NodeItemSemanticEditPolicy.getCreateCompleteIncomingConnecti onCommand, but
when there's a way to configure this better in GMF, please tell me.

tobias

btw., I thought about creating a seperate diagram class to hold the
connections, but then I'd have that well-known duplicate connections
problem again...
-Diagram -> Composite
+-connections
Re: Specify what to use as Link containers [message #58289 is a reply to message #58022] Mon, 02 October 2006 09:57 Go to previous messageGo to next message
Eclipse UserFriend
Hello Tobias,

Currently there is no way to specify where to put connections explicitly.

-----------------
Alex Shatalin
Re: Specify what to use as Link containers [message #58382 is a reply to message #58289] Mon, 02 October 2006 10:04 Go to previous message
Eclipse UserFriend
Originally posted by: tobk.gmx.de

Alex Shatalin wrote:

> Hello Tobias,
>
> Currently there is no way to specify where to put connections explicitly.
>
> -----------------
> Alex Shatalin

No problem. Meanwhile I even prefer having my connections stored in the
node's outgoing-feature, since this effectivley prevents that duplicate
connections bug from happening. And iteration won't be too much of a
problem either.

However, thanks for your reply.

tobias
Previous Topic:Adding a listener to a diagram after opening it in an edtor
Next Topic:ClassCastException 'Compartment Mapping'
Goto Forum:
  


Current Time: Wed May 07 01:01:44 EDT 2025

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

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

Back to the top