Bug 20422 - Deleting a source folder always deletes resources [ccp]
Summary: Deleting a source folder always deletes resources [ccp]
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-17 04:38 EDT by Tim Ellison CLA
Modified: 2006-06-15 02:50 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 Tim Ellison CLA 2002-06-17 04:38:35 EDT
Build 20020612 (F3)

When deleting a _project_, the user is prompted to save or delete the 
underlying resources; however, when deleting a source folder within a project 
the underlying resources are always deleted -- I had expected to be prompted.
Comment 1 Dirk Baeumer CLA 2002-06-17 11:41:37 EDT
The reason why we prompt for projects is that they can lie outside the workspace
(not using default location when creating the project). Source folders always 
lie inside the workspace therefore we only ask if you want to delete the 
element. 
Comment 2 Tim Ellison CLA 2002-06-18 04:12:20 EDT
Not sure what you mean by "projects can lie outside the workspace".

It's ok to mark this as a wontfix, but I entered it as a usability issue (since 
I guessed the behaviour wrongly and lost data).

Maybe a different term is appropriate for deleting from the workspace rather 
than deleting the resource (c.f. the old notion of closing a project).
Comment 3 Dirk Baeumer CLA 2002-07-31 09:47:46 EDT
The difference is as follows:

- source folders are always "owned" by a project. That means on a file system
  the source folder is always a subfolder of the folder representing the
  project.

- this is different for projects. Assume your workspace is at c:\workspace
  You can create a project Test inside that workspace (e.g. c:\workspace\Test)
  or as a project that references and already existing folder outside the
  c:\workspace (for exmaple M:\code\junit). This can be controlled by the 
  Project content option in the new project wizard.

If you now delete a project the user must have the possibility to either delete 
the reference to that project without actually deleting its content since it 
can be external. Since we don't have meta information about source folders and 
a source folder is always hosted inside a projects folder we don't offer the 
same functionality for source folders. The workbench does the same.

I hope this makes it clearer.
Comment 4 Adam Kiezun CLA 2002-09-18 04:13:54 EDT
this is an enhancement really
i see 2 possible courses of action here:
1. remove the folder from the classpath (doable)
2. hide the folder (not doable without additional platform support)
Comment 5 Ben Bucksch CLA 2003-01-06 10:11:06 EST
Dirk, I didn't really understand your explanation what the difference is (what,
if I create a project with a non-default location, i.e. not below
"~/workspace/", and then create sources within that project location? does that
could as "outside the workspace" or within?) nor do I think that you should have
to explain it in the first place. We are talking about deletion of source files,
which may contain lots of man hours of work. What you describe cannot be
guessed, or at least people can easily guess wrong, so you have to make the UI
in a way that the user is totally aware what is about to happen.

Compare bug 28995 (the same or similar iissue, I don't know).
Comment 6 Martin Aeschlimann CLA 2006-06-15 02:50:56 EDT
In 3.2 you get conformation dialogs for all kin of removals (folders/files)

To just remove a source folder from the build path we have a menu entry in the Build Path submenu.