how to create a connection? [message #202803] |
Sun, 13 November 2005 03:34 |
Eclipse User |
|
|
|
Originally posted by: hopeshared.tom.com
In gef editor, we use a connection to connect two nodes, the relationship
can descript as
<Node name="node1">
<Connection source="node1" target="node2">
</Node>
<Node name="node2"/>
But the model relationship I defined is:
<Node name="node1" next="node2"/>
<Node name="node2">
I want to show the relation "next" in GEF editor as a connection, what
shall I do?
I can draw Node in the editor, and can set the "next" attribute when the
CreateConnectionCommand excute, but the connection never appear in the
editor.
|
|
|
Re: how to create a connection? [message #203183 is a reply to message #202803] |
Fri, 18 November 2005 20:06 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
Your node editpart can create some bogus model and return that in its
getModelSourceConnections(). Node2's editpart can then return that same
model via its getModelTargetConnections(). If, in your model, you can get
to the previous node, then node2's editpart can find node1's editpart via
the editpart registry. Alternatively, node1's editpart can set the bogus
model on node2's editpart.
"hopeshared" <hopeshared@tom.com> wrote in message
news:aa51eb99069622fa2b24817f94333cc8$1@www.eclipse.org...
> In gef editor, we use a connection to connect two nodes, the relationship
> can descript as
> <Node name="node1">
> <Connection source="node1" target="node2">
> </Node>
> <Node name="node2"/>
>
> But the model relationship I defined is:
> <Node name="node1" next="node2"/>
> <Node name="node2">
>
> I want to show the relation "next" in GEF editor as a connection, what
> shall I do?
>
> I can draw Node in the editor, and can set the "next" attribute when the
> CreateConnectionCommand excute, but the connection never appear in the
> editor.
>
|
|
|
Powered by
FUDForum. Page generated in 0.03477 seconds