Bug 263757 - [CommonNavigator] DnD: dropping folder on folder allowed - but old selection used
Summary: [CommonNavigator] DnD: dropping folder on folder allowed - but old selection ...
Status: RESOLVED DUPLICATE of bug 209537
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Francis Upton IV CLA
QA Contact:
URL:
Whiteboard: dnd
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-05 04:46 EST by Dani Megert CLA
Modified: 2009-02-09 11:58 EST (History)
1 user (show)

See Also:


Attachments
Put PluginTransfer last (1.04 KB, patch)
2009-02-06 06:34 EST, Anton Leherbauer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2009-02-05 04:46:18 EST
I20090203-1200.

0. open Project Explorer
1. create simple project 'p'
2. create file 'f' in 'p'
3. create folder 'd' in 'p'
4. select f and try to move it onto 'p' ==> not allowed, OK
5. now select folder 'd' and drop it onto itself
==> the file is moved into 'd'!

There seems to be some caching issue.
Comment 1 Francis Upton IV CLA 2009-02-05 14:59:44 EST
I tried this in HEAD as of about 2000 UTC and can't get the same result.  I tried lots of different combinations of this and it seems fine.
Comment 2 Dani Megert CLA 2009-02-06 02:58:49 EST
Sorry, but I can easily reproduce this using new workspace with N20090205-2000 on WindowsXP. The only difference compared to I20090203-1200 is that I now get a [+] in step 4.

I think it is important how you do step 4 from comment 0:
1. select 'f' via left mouse down (keep it down)
2. slowly drag it upwards over 'd' and then on 'p' (don't release button)
3. on keyboard press 'Esc' and release the mouse button to abort DnD
4. select 'd' via left mouse down (keep it down)
5. move a little bit to the right so that move feedback appears
6. release the mouse button
Comment 3 Francis Upton IV CLA 2009-02-06 06:01:55 EST
The stale object is in the fElements field in the JavaDropAdapterAssistant, which is the same issue as the bug this is duped against.

I could not dup it before because I tried it on Linux (the bug report said all platforms).  When I tried it on Windows I was able to duplicate it.

*** This bug has been marked as a duplicate of bug 209537 ***
Comment 4 Anton Leherbauer CLA 2009-02-06 06:34:20 EST
Created attachment 124947 [details]
Put PluginTransfer last

The problem seems to come from the PluginTransfer being the first in the list of supported transfer types. Putting it last fixes this problem.
This fixes also bug 263618 (which is not a dup of bug 263845).
Comment 5 Francis Upton IV CLA 2009-02-06 06:41:52 EST
(In reply to comment #4)
> Created an attachment (id=124947) [details]
> Put PluginTransfer last
> 
> The problem seems to come from the PluginTransfer being the first in the list
> of supported transfer types. Putting it last fixes this problem.
> This fixes also bug 263618 (which is not a dup of bug 263845).
> 

Anton, thank you for your patch!

As much as I like the idea of the PluginTransfer being last, it actually does not fix 263618 (which I agree is not a dup, as you see from my comments on it) (I just tried the patch).  If you turn on the CNF DnD tracing, it will show when it considers the drop valid because of the plugin transfer, and this is not the case.

I also don't think it fixes this issue either, there is something wrong in the JavaDropAdapterAssistant that it uses stale data.
Comment 6 Anton Leherbauer CLA 2009-02-09 11:45:33 EST
(In reply to comment #5)
> (In reply to comment #4)
> > Created an attachment (id=124947) [details] [details]
> > Put PluginTransfer last
> > 
> > The problem seems to come from the PluginTransfer being the first in the list
> > of supported transfer types. Putting it last fixes this problem.
> > This fixes also bug 263618 (which is not a dup of bug 263845).
> > 
> Anton, thank you for your patch!
> As much as I like the idea of the PluginTransfer being last, it actually does
> not fix 263618 (which I agree is not a dup, as you see from my comments on it)
> (I just tried the patch).  If you turn on the CNF DnD tracing, it will show
> when it considers the drop valid because of the plugin transfer, and this is
> not the case.
> I also don't think it fixes this issue either, there is something wrong in the
> JavaDropAdapterAssistant that it uses stale data.

You are right, the move of the wrong resource is not fixed by that, but it fixes the fact that a move of folder 'd' on itself is allowed (comment 0 point 5), esp. when you drag only a few pixels horizontally.
Regarding bug 236618, I still see both issues reported there (with current HEAD), but not when I apply my patch.
Comment 7 Francis Upton IV CLA 2009-02-09 11:50:18 EST
(In reply to comment #6)
 
> You are right, the move of the wrong resource is not fixed by that, but it
> fixes the fact that a move of folder 'd' on itself is allowed (comment 0 point
> 5), esp. when you drag only a few pixels horizontally.
> Regarding bug 236618, I still see both issues reported there (with current
> HEAD), but not when I apply my patch.
> 
Yes, I noticed this case myself, I will open a new bug about that (the self drag) and apply your patch for that.  I think with bug 263318, the problem should be fixed in JDT.
Comment 8 Francis Upton IV CLA 2009-02-09 11:58:09 EST
(In reply to comment #7)
 > 
> Yes, I noticed this case myself, I will open a new bug about that (the self
> drag) and apply your patch for that.  
bug 264216