Specify what to use as Link containers [message #58022] |
Mon, 02 October 2006 07:38  |
Eclipse User |
|
|
|
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 #58382 is a reply to message #58289] |
Mon, 02 October 2006 10:04  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02481 seconds