Bug 209537 - [common navigator][dnd] incorrect drop on current object after previous drop attempt
Summary: [common navigator][dnd] incorrect drop on current object after previous drop ...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P2 major (vote)
Target Milestone: 3.5   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 263757 (view as bug list)
Depends on: 264279
Blocks:
  Show dependency tree
 
Reported: 2007-11-12 14:14 EST by Andrew Mak CLA
Modified: 2009-04-24 08:29 EDT (History)
2 users (show)

See Also:


Attachments
Suggested patch (871 bytes, patch)
2009-02-09 19:15 EST, Francis Upton IV CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Mak CLA 2007-11-12 14:14:12 EST
I'm in the resource perspective, my workspace has the following simple projects and files:

/Project1
   test1.txt
/Project2
   test2.txt

And here are the steps I took:

1) Selected test1.txt, drag it to some white space in the project explorer and then back onto itself and release the mouse button (nothing happens which is as expected).
2) Did the same thing with test2.txt, but when I released the mouse button, test1.txt is moved into /Project2
Comment 1 Eric Moffatt CLA 2007-11-14 14:51:58 EST
Michael, this is specific to the Project Explorer, the Package Explorer does nothing.
Comment 2 Francis Upton IV CLA 2008-08-14 03:37:10 EDT
I was able to make this happen on Windows for 3.4, but not on Linux.
Comment 3 Francis Upton IV CLA 2009-02-04 16:13:36 EST
This problem happens when the JavaDropAdapterAssistant handles the drop.

I have not fully debugged it, but it's very easy to make this happen on Windows.  Set a breakpoint at JavaDropAdapterAssistant.handleDrop.  In handleDropMove, it relies on the value of fElements which is stale (it refers to the other project).
Comment 4 Francis Upton IV CLA 2009-02-06 06:01:55 EST
*** Bug 263757 has been marked as a duplicate of this bug. ***
Comment 5 Francis Upton IV CLA 2009-02-09 19:15:37 EST
Created attachment 125186 [details]
Suggested patch

I don't fully understand the purpose of all of the fields, so this patch might be defeating some optimization or something, but this seems to fix the problem.
Comment 6 Dani Megert CLA 2009-02-10 02:28:22 EST
*** Bug 264279 has been marked as a duplicate of this bug. ***
Comment 7 Dani Megert CLA 2009-04-24 08:29:11 EDT
This has been fixed some time ago.