Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 273420 - Deleting linked resources from a project does not remove them from .project if .project points to an invalid <location>
Summary: Deleting linked resources from a project does not remove them from .project i...
Status: RESOLVED DUPLICATE of bug 50158
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4.2   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-23 08:09 EDT by Peter van der Vossen CLA
Modified: 2009-04-27 09:05 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter van der Vossen CLA 2009-04-23 08:09:55 EDT
Build ID: M20090211-1700

Steps To Reproduce:
Scenario:
1. Inside Eclipse, open a project that has a linked resource (project.properties.javaBuildPath.Source)
2. Outside Eclipse, remove/rename the directory that the .project file points to for this resource (the <link> value).
3. Inside Eclipse, 'Remove' the linked resource from the project
4. Add a new linked resource to the project whilst reusing the same (logical) Folder name as before.

Error message:
The 'Link Source' dialog box will indicate 'Source Folder: The folder '....' already exists.
(The message is correct because the linked resource is still present in the .project file after it was removed inside Eclipse.)

Cause:
The problem is that the linked resource in not physically removed from the .project file if it points to an invalid location.

Solution:
When Removing a linked resource from a project, ignore the fact that the location is invalid and simply remove the Linkedresource from the .project file

Peter.


More information:
Comment 1 Paul Webster CLA 2009-04-24 11:32:35 EDT
When I add a linked source, it is added to both the classpath and project files.

When I remove a linked source, even if I don't move the underlying file folder, it is only removed from the classpath, it still remains as a linked folder.

PW
Comment 2 Dani Megert CLA 2009-04-27 09:05:34 EDT

*** This bug has been marked as a duplicate of bug 50158 ***