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

Bug 108047

Summary: [Operations] 'Replace with...' deletes .project, .classpath
Product: [Eclipse Project] Platform Reporter: Andrew Hayden <andrew.hayden>
Component: CVSAssignee: platform-cvs-inbox <platform-cvs-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P5 CC: max.gilead, remy.suen
Version: 3.1Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard: stalebug

Description Andrew Hayden CLA 2005-08-25 16:14:49 EDT
When you right-click on a shared project and use "Replace with...", the
replacement operation silently deletes the .project and .classpath files for the
project.

It seems that Eclipse should be *much* smarter about this: if the .project and
.classpath files are indeed source-controlled (bad idea, in general), then they
probably should be replaced; otherwise; if they aren't source controlled, they
definitely should NOT be deleted!

I would propose adding a check when deleting files: if deleting a project's
.project or .classpath, maybe Eclipse should prompt the user with something akin to:

"Warning: you are about to delete one of your project's configuration files. 
Are you certain you wish to delete this file?"
Comment 1 Michael Valenta CLA 2005-08-25 16:36:56 EDT
I wouldn't say that adding the .project and .classpath to source control is a 
bad idea in general. I would actually say that doing so simplifies things but 
I understand that some projects do not want to pollute their modules with IDE 
specific files. In those cases, they will usually allow you to add 
the .project and .classpath to the .cvsignore file and doing so will fix your 
problem.

However, I agree that we should probably prompt if any file whose names starts 
with a dot is not under version control and the user performs a Replace With 
on the project. Unfortunatley, given our workload, it is not something we will 
be able to address but patches will be accepted.
Comment 2 Remy Suen CLA 2007-05-28 23:00:34 EDT
I think either this needs to be marked as a duplicate of bug 135718 or that of this.
Comment 3 Michael Valenta CLA 2007-05-29 09:15:33 EDT
*** Bug 135718 has been marked as a duplicate of this bug. ***
Comment 4 Eclipse Webmaster CLA 2019-09-06 15:35:53 EDT
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.
Comment 5 Eclipse Genie CLA 2022-03-04 07:36:42 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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.

--
The automated Eclipse Genie.