Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Drag&Drop with unknown source
Drag&Drop with unknown source [message #490461] Thu, 08 October 2009 17:32 Go to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

I want to add DnD in my RCP app for a specific view as drop target. But
as you can imagine there can be several other views containing objects I
of the same type which I want to let dropped into my view. So I don't
know the drag source. But if I drag an object from another view, for
example from a SVN repository view, the mouse pointer changes what let's
me believe that 'anonymous' dragging is possible. So I have to check in
my drop target anyhow if the type of the dragged object is correct and
if true it can be dropped. Is it possible anyhow?
Re: Drag&Drop with unknown source [message #490637 is a reply to message #490461] Fri, 09 October 2009 14:18 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2151
Registered: July 2009
Senior Member
Hi,

I think the DropListener in
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet185.java?view=co
demonstrates what you want to do. If I'm wrong then please follow up here.

Grant


"Gilbert Mirenque" <formatzeh@gmx.de> wrote in message
news:hal7mr$uod$1@build.eclipse.org...
> I want to add DnD in my RCP app for a specific view as drop target. But
> as you can imagine there can be several other views containing objects I
> of the same type which I want to let dropped into my view. So I don't
> know the drag source. But if I drag an object from another view, for
> example from a SVN repository view, the mouse pointer changes what let's
> me believe that 'anonymous' dragging is possible. So I have to check in
> my drop target anyhow if the type of the dragged object is correct and
> if true it can be dropped. Is it possible anyhow?
Re: Drag&Drop with unknown source [message #491729 is a reply to message #490637] Thu, 15 October 2009 15:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

I think I have to tell something more about my structure. My drop target
should be a view which is a org.eclipse.ui.navigator.CommonNavigator.
And this view should act as drop target for elements dragged from other
views. With the extension point org.eclipse.ui.navigator.viewer I
referenced a viewerContentBinding. In this contentBinding - specified at
the extension point org.eclipse.ui.navigator.navigatorContent - I set
java.lang.Object as triggerPoints, possibleChildren and as
possibleDropTargets in a dropAssistant. But it does not react on dragged
elements from other views (for example an svn repository view). The
point is that if I drag an element from another view my the
CommonNavigator won't be activated when hovering it.

Any ideas?
Re: Drag&Drop with unknown source [message #491943 is a reply to message #491729] Fri, 16 October 2009 15:59 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2151
Registered: July 2009
Senior Member
This is definitely outside of my experience, hopefully someone else can
follow up here (if you don't get a follow-up then you may need to re-post
this).

Grant


"Gilbert Mirenque" <formatzeh@gmx.de> wrote in message
news:hb7dnh$lhb$1@build.eclipse.org...
> I think I have to tell something more about my structure. My drop target
> should be a view which is a org.eclipse.ui.navigator.CommonNavigator.
> And this view should act as drop target for elements dragged from other
> views. With the extension point org.eclipse.ui.navigator.viewer I
> referenced a viewerContentBinding. In this contentBinding - specified at
> the extension point org.eclipse.ui.navigator.navigatorContent - I set
> java.lang.Object as triggerPoints, possibleChildren and as
> possibleDropTargets in a dropAssistant. But it does not react on dragged
> elements from other views (for example an svn repository view). The
> point is that if I drag an element from another view my the
> CommonNavigator won't be activated when hovering it.
>
> Any ideas?
Re: Drag&Drop with unknown source [message #493069 is a reply to message #491729] Thu, 22 October 2009 23:51 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
If you are using 3.5 there is tracing available in the Common Navigator (use the Tracing tab in the launch configuration, and check Enable Tracing, in the org.eclipse.ui.navigator plugin click both the top level debug item and the debug/dnd item. That should show you more about what's going on and why the drop might not be picked up.

Re: Drag&Drop with unknown source [message #494925 is a reply to message #493069] Tue, 03 November 2009 09:55 Go to previous message
Eclipse UserFriend
Originally posted by: formatzeh.gmx.de

I see some logging when starting the app but after that....nothing
special. That doesn't help me.
Previous Topic:Dynamic Menus, Handlers and passing variables application context
Next Topic:I get the wrong service reference
Goto Forum:
  


Current Time: Sun Nov 23 01:04:23 GMT 2014

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

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