Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338383 - Renaming a linked resource does not change name on disk
Summary: Renaming a linked resource does not change name on disk
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 4.1   Edit
Hardware: All All
: P5 enhancement with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted
: 358828 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-02-28 04:54 EST by Philippe Faes CLA
Modified: 2019-11-14 03:30 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Faes CLA 2011-02-28 04:54:06 EST
Build Identifier: 20100917-0705

When renaming a linked resource (such as linked file), the name changes in the project explorer, but the name of the file on disk does not change. From a "rename" operation, users expect the file on disk to rename as well. At least, there should be an option to rename the file on disk.

Reproducible: Always

Steps to Reproduce:
1. Add a linked file to a project (e.g. drag&drop a file from your file browser to the project explorer)
2. Rename the file: right-click > Rename
3. The name of the resource has changed, but the file on disk is not changed. This confuses users.
Comment 1 Serge Beauchamp CLA 2011-02-28 10:48:42 EST
This is by design.  

Linked resources can have a different name than the underlying file they are pointing to.

If you want to have a resource in the workspace that has always the same name as the file system entry, you can use a linked resource folder as its parent, and setup resource filters so that the appropriate file is displayed.

I'm not sure how common is the use case of keeping linked resource's names in sync with their location.  What happens when the user change the location, should the resource be automatically changed?

It seems to be that this can be easily implemented by a 3rd party plugin that listens to resource change notifications, and keep them in sync.
Comment 2 John Arthorne CLA 2011-02-28 13:25:06 EST
(In reply to comment #0)
> From a
> "rename" operation, users expect the file on disk to rename as well. At least,
> there should be an option to rename the file on disk.

I disagree on what the user expects here. Unix Symbolic links and Windows shortcuts for example, don't work this way. 

Giving an option to rename the underlying resource is a possibility.
Comment 3 Dani Megert CLA 2011-09-26 02:22:54 EDT
*** Bug 358828 has been marked as a duplicate of this bug. ***
Comment 4 Robin Rosenberg CLA 2011-09-26 16:24:37 EDT
(In reply to comment #3)
> *** Bug 358828 has been marked as a duplicate of this bug. ***

For what I know, bug 358828 is not about linked resources.
Comment 5 Dani Megert CLA 2011-09-27 02:32:21 EDT
(In reply to comment #4)
> (In reply to comment #3)
> > *** Bug 358828 has been marked as a duplicate of this bug. ***
> 
> For what I know, bug 358828 is not about linked resources.

Said bug says: "If I however create a java project outside the workspace", which means the project is created inside the workspace but links to a location outside the workspace.
Comment 6 Szymon Brandys CLA 2011-10-07 11:32:17 EDT
An option to rename the target too sounds good. Changing to enhancement.
Comment 7 Lars Vogel CLA 2019-11-14 03:30:40 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant, please remove the "stalebug" whiteboard tag.