Skip to main content



      Home
Home » Eclipse Projects » GEF » Drag onto connection
Drag onto connection [message #182709] Thu, 26 May 2005 11:04 Go to next message
Eclipse UserFriend
We're creating an editor for a visual notation. As a simplified view,
assume nodes and connections.

In the editpart for our node, we've installed a component_role and
layout_role. (also, probably irrelevant: selection_feedback_role)

When dragging a node onto another, thanks to the xylayouteditpolicy we
have, createAddCommand() is called and we can perform some graph
manipulation when a user drops a node onto another.

I've been unable to replicate this behaviour when nodes are dropped on
connections and I was wondering if there is something I don't quite
understand.

(Or maybe I am doing it all wrong)
Thanks!
Re: Drag onto connection [message #183049 is a reply to message #182709] Mon, 30 May 2005 23:32 Go to previous messageGo to next message
Eclipse UserFriend
Connections aren't targetted for dragging. The parts that can be dragged
onto connections should override getDragTracker() and return a custom
DragEditPartsTracker that would target connection parts.


"Jason Kealey" <jkealey@shade.ca> wrote in message
news:af2fca8d15676ea8564370f638138b79$1@www.eclipse.org...
> We're creating an editor for a visual notation. As a simplified view,
> assume nodes and connections.
>
> In the editpart for our node, we've installed a component_role and
> layout_role. (also, probably irrelevant: selection_feedback_role)
>
> When dragging a node onto another, thanks to the xylayouteditpolicy we
> have, createAddCommand() is called and we can perform some graph
> manipulation when a user drops a node onto another.
>
> I've been unable to replicate this behaviour when nodes are dropped on
> connections and I was wondering if there is something I don't quite
> understand.
>
> (Or maybe I am doing it all wrong)
> Thanks!
>
Re: Drag onto connection [message #183135 is a reply to message #183049] Tue, 31 May 2005 11:49 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for your help. Removed the CONNECTION_LAYER specific code in
getExclusionSet() and now everything works perfectly.

Jason
Re: Drag onto connection [message #995295 is a reply to message #182709] Sat, 29 December 2012 12:26 Go to previous messageGo to next message
Eclipse UserFriend
hello,
i have the same problem. I want to drag a connection and drop it on another connection. But I only get a "add children request", but there are no EditParts in the request. I ve modified the DragEditPartsTracker, so its getExclusionSet()-Method returns an EMPTY_LIST. But still a createAddCommand is never called.
Did you do something else?
Re: Drag onto connection [message #997174 is a reply to message #995295] Fri, 04 January 2013 04:19 Go to previous messageGo to next message
Eclipse UserFriend
I think your problem is different from the Jason's. He drags nodes and drops them on connections.

You would like to reconnect a connection from a node to a connection, right? I have never done this but, it could works just as with standard nodes.

From the ConnectionEditPart interface javadoc:
Similarly, a ConnectionEditPart can also be a "node", meaning it can serve as the source or target of some other ConnectionEditPart. This makes connection to connection possible.

So if you know, how connection between nodes works, connection between connection and node or between two connections should work similar.
Re: Drag onto connection [message #997191 is a reply to message #182709] Fri, 04 January 2013 06:20 Go to previous message
Eclipse UserFriend
Thanks a lot for your reply!
I already solved the problem. Didn't thought about handling a connection as a Node. For that reason, a NonResizableEditPolicy can be installed for the connection. Then the requests are send.

Martin
Previous Topic:how do I drag an object from my outline view and drop it into GEF editor?
Next Topic:performance issues on GEF
Goto Forum:
  


Current Time: Fri Jul 04 02:49:22 EDT 2025

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

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

Back to the top