Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319405 - Create linked resources using drag-and-drop within project explorer
Summary: Create linked resources using drag-and-drop within project explorer
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 7.0   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Anton Leherbauer CLA
QA Contact: Doug Schaefer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-09 11:25 EDT by James Blackburn CLA
Modified: 2010-08-24 08:23 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Blackburn CLA 2010-07-09 11:25:16 EDT
In e4 it used to be possible to create linked resources using drag-and-drop within the project explorer itself.  This doesn't seem to be the case in 3.6 proper.

In Windows > Preferences > General > Workspace > Linked Resources
I've enabled linked resources and have selected prompt for darg and drop items on folder / project.

I've tried pressing every combination of meta keys I can think of, to no avail...

Is this functionality no longer supported for some reason, or have I just not figured out how to enable it?
Comment 1 Serge Beauchamp CLA 2010-07-09 15:25:17 EDT
In 3.6, you can use CNTL while dragging files within the Project Explorer to have the 'File Operation' dialog appear, and effectively have the option to create link resources.

You can also drag and drop files on a virtual folder, which will create linked resources automatically.

Those 2 features didn't make it in the JDT Package Explorer for 3.6, though.
Comment 2 Serge Beauchamp CLA 2010-07-09 15:26:49 EDT
reassigning to JDT/UI
Comment 3 James Blackburn CLA 2010-07-09 16:28:37 EDT
Hmmm. We were doing this in the project explorer (CDT base product without jdt installed). Ctrl just created a copy without popping up the choice dialog we used to get... 
Will have to dig a bit deeper -- is it possible for other CNF contributors to affect this? There are a few other features -- subclipsr, pydev, epic, ccrc installed too.
Comment 4 James Blackburn CLA 2010-07-12 04:26:31 EDT
Ok it seems to be something to do with the content contributed to the view by CDT.

Steps to reproduces:
- Create CDT Helloworld project
- In Project explorer: ctrl-drag helloworld/src/helloworld.c to helloworld/.

File is copied, no dialog presented.

Interestingly if you create a project without the CDT nature, the above works. Also dragging from a no-nature project to the CDT project works too.  
The only thing that doesn't work is ctrl-dragging within or between CDT projects.  Disabling the 'CDT Elements' content provider makes ctrl-drag behave as expected.

Given that this works between non-CDT and CDT project, I wonder whether this is a CDT problem or a CNF problem?
Comment 5 James Blackburn CLA 2010-07-12 05:12:16 EDT
Moving to CDT: its CNavigatorDropAdapterAssistant getting invoked (rather than  ResourceDropAdapterAssistant).
Comment 6 Anton Leherbauer CLA 2010-08-24 07:29:57 EDT
Fixed in HEAD.  Works in the same way as ResourceDropAdapterAssistant now.
Comment 7 CDT Genie CLA 2010-08-24 08:23:03 EDT
*** cdt cvs genie on behalf of aleherbau ***
Bug 319405 - Create linked resources using drag-and-drop within project explorer

[*] CNavigatorDropAdapterAssistant.java 1.14 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorDropAdapterAssistant.java?root=Tools_Project&r1=1.13&r2=1.14