Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336643 - Removing a file from a project deletes it from disk.
Summary: Removing a file from a project deletes it from disk.
Status: CLOSED DUPLICATE of bug 28995
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.6.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-08 14:12 EST by cliff.wallach CLA
Modified: 2011-02-09 01:18 EST (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 cliff.wallach CLA 2011-02-08 14:12:06 EST
Build Identifier:  20100917-0705

The IDE "Delete" command must be used in order to remove a file from a project.  This is wrong because it also deletes the file from the disk!  Obviously wrong.  This gets really annoying when trying different image files for an Android project.



Reproducible: Always

Steps to Reproduce:
1. Open an Android project.
2. Select a file.
3. Right click and choose delete.
Comment 1 Remy Suen CLA 2011-02-08 14:31:17 EST
(In reply to comment #0)
> The IDE "Delete" command must be used in order to remove a file from a project.
>  This is wrong because it also deletes the file from the disk!  Obviously
> wrong.

Not sure I follow. It is called 'Delete'. When you use it, the file is indeed deleted. How is this "obviously wrong"?
Comment 2 cliff.wallach CLA 2011-02-08 14:39:21 EST
(In reply to comment #1)
> (In reply to comment #0)
> > The IDE "Delete" command must be used in order to remove a file from a project.
> >  This is wrong because it also deletes the file from the disk!  Obviously
> > wrong.
> Not sure I follow. It is called 'Delete'. When you use it, the file is indeed
> deleted. How is this "obviously wrong"?


The desired function is to exclude a file from a project.  That is, make the file not a part of the project. Not delete it from the disk.
Comment 3 Remy Suen CLA 2011-02-08 14:47:21 EST
(In reply to comment #2)
> The desired function is to exclude a file from a project.  That is, make the
> file not a part of the project. Not delete it from the disk.

Exclude in what way? Also note that what you see in the UI may not be reflective of what's on the actual file system (which is probably what the Android runtime will read when an application is actually being run).

You can read up on resource filters perhaps that does what you want.

In any case, the action is called 'Delete' and not 'Remove'.
Comment 4 cliff.wallach CLA 2011-02-08 15:08:30 EST
(In reply to comment #3)
> (In reply to comment #2)
> > The desired function is to exclude a file from a project.  That is, make the
> > file not a part of the project. Not delete it from the disk.
> Exclude in what way? Also note that what you see in the UI may not be
> reflective of what's on the actual file system (which is probably what the
> Android runtime will read when an application is actually being run).
> You can read up on resource filters perhaps that does what you want.
> In any case, the action is called 'Delete' and not 'Remove'.

There is no function named "Remove" or "Exclude."  The most similar function is "Delete", which does indeed remove the specified file from the project and also deletes it from the disk. I want the "remove file from project" function without the "delete file from disk."

For example, lets say I want to replace the image file cat.jpg with dog.jpg.  Adding dog.jpg to the project is simple and works.  Removing cat.jpg from the project deletes it permanently!  Is that not wrong?  Shouldn't there be a simple "remove file from project" function that doesn't entail the complex procedure of creating and editing a resource filter?
Comment 5 Prakash Rangaraj CLA 2011-02-09 01:18:14 EST

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