Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Drag onto connection
Drag onto connection [message #182709] Thu, 26 May 2005 15:04 Go to next message
Jason Kealey is currently offline Jason KealeyFriend
Messages: 22
Registered: July 2009
Junior Member
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] Tue, 31 May 2005 03:32 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
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 15:49 Go to previous messageGo to next message
Jason Kealey is currently offline Jason KealeyFriend
Messages: 22
Registered: July 2009
Junior Member
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 17:26 Go to previous messageGo to next message
Martin Schwörer is currently offline Martin SchwörerFriend
Messages: 2
Registered: December 2012
Junior Member
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 09:19 Go to previous messageGo to next message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
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 11:20 Go to previous message
Martin Schwörer is currently offline Martin SchwörerFriend
Messages: 2
Registered: December 2012
Junior Member
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: Sat Nov 29 07:56:08 GMT 2014

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

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