Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 90807

Summary: [DND] Allow to drag-n-drop to accept drop targets on View tabs
Product: [Eclipse Project] Platform Reporter: Eugene Kuleshov <ekuleshov>
Component: UIAssignee: Eric Moffatt <emoffatt>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: duongn, js102, markus.kell.r, n.a.edgar
Version: 3.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Eugene Kuleshov CLA 2005-04-08 10:43:13 EDT
In many cases it will be convenient to be able to drop dragged thing to the tab
of nonactive view in some tabgroup. This should activate this view and have the
same effect as if drop happens on the active view content.
Comment 1 Eugene Kuleshov CLA 2005-07-21 10:57:08 EDT
Perhaps easier and probably more consistent option would be to activate view
when mouse roll over to the view tab when dragging something.

Anyway, I wonder if this issue is planned to be addressed in 3.1 or 3.2 versions? 

Otherwise if somebody can give me some pointers where to look at this I can try
to implement a patch for this.

Thank you.
Comment 2 Eric Moffatt CLA 2007-06-21 12:23:54 EDT
Eugene, the 'hover to activate' scenarios are being reviewed but hte expectation is that they'll only come as part of a more comprehensive DnD update. (extending drop target handling...).
Comment 3 James Shaw CLA 2007-09-20 10:23:33 EDT
I think that two behaviours might be desirable: 1) dropping onto the tab instead, and 2) hovering on an inactive tab should make it the active tab.

For example, I have two tabs, Call Heirarchy and Ant, in a tab group.  With 'Call Heirarchy' as the active tab, dragging a 'build.xml' file and hovering over the 'Ant' tab should make it active, allowing me to drop it into the view.  Alternatively, just dropping the file onto the Ant table itself could have the same effect.
Comment 4 Eric Moffatt CLA 2007-09-20 13:44:00 EDT
Of the two the most useful would be the 'activate on hover'; dropping onto the tab directly is technically tough (it's a different control than the tree or whatever that the actual view uses) and would only be useful where the view doesn't need a 'target' for the drop.

On the other hand I'd like to be able to drop a file (resource?) onto a tab in the editor area and have it 'reuse' that tab to show the dropped file (closing the original editor...;-).
Comment 5 Eric Moffatt CLA 2007-11-14 16:01:55 EST
I've looked into this and we're somewhat stuck in that, while the DnD is happening the system doesn't even send the mouze move events (i.e. the eventing mechanism is completely over-ridden by DnD. This means that adding a mouseMove hook won't work.

I've also looked at registering the CTabFolder as a drop listener and using the 'dragOver' event to gain access to the mouse position but no dice; I won't get -any- events unless my registered listener's set of valid TransferTypes intersects the actual types being transferred (which is correct). Unfortunately I have absolutely no way of knowing a priori what those types are and there's no 'global' flag I can use to say "I'll take anything".

Doung, we had talked about this but I've forgotten whether we decided we were dead in the water or if there might be some route to do this, do you remember?
Comment 6 Dani Megert CLA 2013-06-05 10:42:33 EDT
Removing outdated target milestone.
Comment 7 Markus Keller CLA 2013-06-13 09:14:53 EDT
*** Bug 162765 has been marked as a duplicate of this bug. ***
Comment 8 Markus Keller CLA 2013-06-13 09:17:00 EDT

*** This bug has been marked as a duplicate of bug 37595 ***