Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359907

Summary: New project contains natures from a deleted project with the same name
Product: [Eclipse Project] Platform Reporter: John Eblen <jdeblen1>
Component: ResourcesAssignee: Platform-Resources-Inbox <platform-resources-inbox>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: dj.houghton, jdeblen1, roland, Szymon.Brandys
Version: 4.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description John Eblen CLA 2011-10-04 16:07:02 EDT
To reproduce:

1) Create a new java project.

2) Delete project without checking "Delete project contents on disk."

3) Create a new general project with the same name.

4) Note that this project has the java nature.

This behavior can lead to other bugs, because the new project may have features enabled that are not appropriate for the new project's type.
Comment 1 DJ Houghton CLA 2011-10-04 16:15:17 EDT
I believe this is the expected behaviour. 

As a user you are given the choice to leave the old project's data on disk when you delete the project from the workspace. When you create a new project you are given the opportunity to verify/select the location of the project on disk. (and therefore can create it in a new location if desired) If one already exists then the data from it is used. 

Alternatively if we created a new project at that location and automatically deleted the existing data, it could (and will most likely) lead to loss of data.
Comment 2 Szymon Brandys CLA 2011-10-07 11:22:12 EDT
Dj is right. The current behavior is expected.
Comment 3 Roland Schulz CLA 2011-11-10 15:18:20 EST
Shouldn't a user who wants to reuse the old project (/add it back to the workspace) use File->Import? Why would it ever make sense to create a new project (with potential different natures) but reuse the old project settings. All data besides project settings - e.g. sources in that project - wouldn't be lost either way. 

I think it would make much more sense if creating a new project in the place of an old project either 1) overwrites the project setting (as suggested by John) but with a dialog to verify the user wants to overwrite or 2) gives an error and thus not allowing creating a project in the place of an old project.