Bug 224016 - [DND][CommonNavigator] Drag to Project Explorer ignored after Drag from it
Summary: [DND][CommonNavigator] Drag to Project Explorer ignored after Drag from it
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Francis Upton IV CLA
QA Contact:
URL:
Whiteboard: dnd
Keywords:
Depends on: 261060
Blocks:
  Show dependency tree
 
Reported: 2008-03-25 21:28 EDT by Francis Upton IV CLA
Modified: 2009-02-04 15:47 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francis Upton IV CLA 2008-03-25 21:28:36 EDT
Build ID: I20080325-0100

Steps To Reproduce:
1. Create 2 java projects, with a class in each.
2. Drag a class from one project to another, from the Project Explorer to the Package Explorer.  It will successfully move.
3. Now drag that (or a different class) from the Package Explorer to the Project Explorer.  You will see the outlined selection as your drag selects nodes in the Project Explorer, yet it will do nothing on the drop.


More information:
The reverse of this works fine.

This might be Linux only; there are known drag/drop problems with the CNF that are specific to Linux.  This needs to be checked on Windows.
Comment 1 Eric Moffatt CLA 2008-03-26 14:10:31 EDT
Hmmm, I'm not sure what to make of this. I went to try to test it and found that my DnD looked to be completely inoperative in the Project Explorer! No response to -any- drop...

I closed the view and re-opened it and now everything seems to be back to 'normal'.

I've just re-tried the scenario and (for me) when I dragged the class from the package explorer to the Project Explorer I got an exception (an assertion failure in "jdt.internal.ui.dnd.BasicSelectionTransferDragAdapter
            .dragFinished(BasicSelectionTransferDragAdapter.java:81"

Now all Dnd is gone again...sheesh.

I'll take a look at this right away...

Comment 2 Francis Upton IV CLA 2008-03-26 15:27:36 EDT
The NPE is bug 207817 (reported by you in fact).  

I was able to make this happen (after a fresh start, and without any test plugins in my self hosting) by:

1) drag java file from Navigator to Project Exp
2) drag that file to Package Exp
3) drag another java file from Package Exp to Project Expr

Doing this sequence does not hit bug 207817.  I can understand hitting that bug will kill drag/drop, but this seems to be something else.
Comment 3 Francis Upton IV CLA 2008-05-06 10:37:15 EDT
Eric, this seems pretty important for 3.4, do you want me to investigate and work on a patch?
Comment 4 Eric Moffatt CLA 2008-05-06 13:37:23 EDT
Francis, I'd be glad to take a look but perhaps Michael Elder would be better since he knows the code best.

Is this related to Bug 157506 ??
Comment 5 Francis Upton IV CLA 2008-05-06 13:57:29 EDT
(In reply to comment #4)
> Francis, I'd be glad to take a look but perhaps Michael Elder would be better
> since he knows the code best.
> 
> Is this related to Bug 157506 ??
> 

No this has nothing to do with bug 157506 (as far as I know), since that's related to dragging external things to the CN and this bug is related to DnD between the explorers.  Let me have a look at this a little and see if I can figure out what's going on and perhaps come up with a patch.  I mainly wanted to ask because I don't want to duplicate effort if someone else is concurrently working on it.
Comment 6 Francis Upton IV CLA 2009-02-04 06:26:11 EST
The patch in bug 261060 takes care of this problem.
Comment 7 Francis Upton IV CLA 2009-02-04 15:47:12 EST
Released to HEAD 3.5M6