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

Bug 301187

Summary: [package explorer] support new drag and drop import dialog when dragging from OS shell
Product: [Eclipse Project] JDT Reporter: Serge Beauchamp <serge>
Component: UIAssignee: Dani Megert <daniel_megert>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: daniel_megert, francisu, markus.kell.r, mober.at+eclipse, remy.suen, Szymon.Brandys
Version: 3.6   
Target Milestone: 3.6 M7   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 301144, 301841, 302441, 310089    
Bug Blocks:    
Attachments:
Description Flags
Patch for handling file system drop
none
Patch for handling file system drop
none
Updated patch with latest CVS sources
none
Updated patch with latest CVS sources none

Description Serge Beauchamp CLA 2010-01-28 16:10:24 EST
So to handle creating linked resources and virtual folders automatically, as the o.e.ui.navigator.resources does.
Comment 1 Serge Beauchamp CLA 2010-01-28 16:26:47 EST
More specifically, the JDT Package explorer should either re-use the o.e.ui.navigator.resources.ResourceDropAdapterAssistant implementation or copy its use of the ImportTypeDialog, linked resource and virtual folder support.
Comment 2 Remy Suen CLA 2010-01-28 16:45:55 EST
Serge, should this bug go in JDT's bucket or...? Is there something Platform/UI needs to do?
Comment 3 Serge Beauchamp CLA 2010-01-29 03:12:16 EST
(In reply to comment #2)
> Serge, should this bug go in JDT's bucket or...? Is there something Platform/UI
> needs to do?

Yes, I meant to put it in the JDT category, but couldn't find the component (I guess I selected the wrong product)
Comment 4 Serge Beauchamp CLA 2010-02-04 06:46:40 EST
*** Bug 301809 has been marked as a duplicate of this bug. ***
Comment 5 Martin Oberhuber CLA 2010-02-04 07:03:17 EST
I think that this is important as long as the JDT perspective / package explorer is still the default view that comes up first when firing up Eclipse SDK (see how I just stumbled into bug 301809).
Comment 6 Markus Keller CLA 2010-02-10 10:28:37 EST
We will only work on this after the blocking bugs have been fixed.
Comment 7 Serge Beauchamp CLA 2010-02-24 06:36:39 EST
Created attachment 160048 [details]
Patch for handling file system drop

This is a patch that handles drops from the file system.
Comment 8 Serge Beauchamp CLA 2010-02-24 06:37:08 EST
Created attachment 160049 [details]
Patch for handling file system drop
Comment 9 Serge Beauchamp CLA 2010-04-21 14:58:07 EDT
Created attachment 165622 [details]
Updated patch with latest CVS sources
Comment 10 Serge Beauchamp CLA 2010-04-21 15:01:13 EDT
As far as I can see, this bug does not depend on 302441, and can be independently addressed (and vice versa).

With the patch, the dropOperation changes according to whether the target is a virtual folder or not (changes to DROP_LINK in that case), but not according to the ImportTypeDialog.  For that,  we'd require some API addition in ImportTypeDialog.
Comment 11 Serge Beauchamp CLA 2010-04-21 15:42:51 EDT
Created attachment 165627 [details]
Updated patch with latest CVS sources

Fix issue with performing drop when operation is DND_LINK
Comment 12 Dani Megert CLA 2010-04-22 07:10:53 EDT
I tried the patch and found two issues with it:
1. The patch has 2 copies of the same code and that code is already at 2 other
   places in the SDK.
2. Calling dialog.open() to gather preferences without opening a dialog is not OK.
3. LINK feedback not working.

==> I've filed bug 310089 to address issues 1 + 2 plus a fix for this bug here.

Regarding 3: The longer I look at the code and think about it I think we should wait with adding LINK feedback because this has consequences to the existing code paths. So for 3.6 I think it's best we stick to the existing code/feedback.
Comment 13 Dani Megert CLA 2010-04-23 09:30:45 EDT
Fixed in HEAD (with patch attached to bug 310089).