Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » how to create a connection?
how to create a connection? [message #202803] Sun, 13 November 2005 03:34 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
>
Previous Topic:Reset ScrollPane
Next Topic:F3 Action
Goto Forum:
  


Current Time: Tue Dec 10 12:24:58 GMT 2024

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

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

Back to the top