Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337240 - [CommonNavigator] Mac OSX: Dragging file in Project Explorer creates backwards animation
Summary: [CommonNavigator] Mac OSX: Dragging file in Project Explorer creates backward...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Francis Upton IV CLA
QA Contact: Prakash Rangaraj CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-15 14:05 EST by Megan Mickelson CLA
Modified: 2011-04-21 03:27 EDT (History)
4 users (show)

See Also:


Attachments
Patch (973 bytes, patch)
2011-04-21 03:06 EDT, 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 Megan Mickelson CLA 2011-02-15 14:05:20 EST
Build Identifier: I20110127-2034

Dragging a file from one project folder to another will create an animation (of a semi-transparent image of the file) to move from the destination location to the source location, which is the opposite of the file move.  This animation is counter-intuitive and appears that the drag operation failed.

In Package Explorer no animation exists, this would probably the easiest fix for the Project Explorer.

Reproducible: Always

Steps to Reproduce:
1. In Project Explorer: Create two project folders, A and B.
2. Create a file in A. 
3. Drag file to B.
4. Animation appears of a file moving from B to A, opposite of what you did.
Comment 1 Francis Upton IV CLA 2011-02-15 14:53:40 EST
Hmm, this could be a CNF problem. Especially since the Package Explorer behaves differently.
Comment 2 Tom Crockett CLA 2011-02-15 15:03:26 EST
It is definitely a CNF problem.
Comment 3 Prakash Rangaraj CLA 2011-02-18 02:55:18 EST
As per Lakshmi, this feedback happens when the drop operation fails. In SWT terms DropTargetEvent.detail field is set to  DND.DROP_NONE inside the DropTargetListener.drop() method.

ResourceDropAdapterAssistant.handleDrop() method does that at line no 218. Commenting that fixes this bug. 

Francis, 

    Is that the right solution?
Comment 4 Francis Upton IV CLA 2011-04-20 23:24:32 EDT
(In reply to comment #3)
> As per Lakshmi, this feedback happens when the drop operation fails. In SWT
> terms DropTargetEvent.detail field is set to  DND.DROP_NONE inside the
> DropTargetListener.drop() method.
> 
> ResourceDropAdapterAssistant.handleDrop() method does that at line no 218.
> Commenting that fixes this bug. 
> 
> Francis, 
> 
>     Is that the right solution?

It seems right to me. In looking at the code I can't understand why that line is there, and I put it there in response to fixing bug 258017. 

I will remove it and retest DnD everywhere tomorrow so we can have this fixed for M7. I can test on Linux, Mac and Windows so that should cover it. If that works, I will go ahead and commit the change.
Comment 5 Francis Upton IV CLA 2011-04-21 03:06:19 EDT
Created attachment 193780 [details]
Patch

Here is the patch you propose (in case we want to backport this)
Comment 6 Francis Upton IV CLA 2011-04-21 03:27:03 EDT
Tested on Windows, Mac OSX, Linux

Released to HEAD 3.7M7

Thanks to Prakash for the fix.