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

Bug 363128

Summary: EGit prevents deletion of projects
Product: [Technology] EGit Reporter: Lars Vogel <Lars.Vogel>
Component: CoreAssignee: Project Inbox <egit.core-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ekke, Lars.Vogel, remy.suen
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Screenshot none

Description Lars Vogel CLA 2011-11-08 03:22:02 EST
It appears that if a project is under version control from EGit that Eclipse cannot delete the project. 

To test:

1.) Create repo with serveral projects
2.) Select one and delete
3.) Make you select "Delete project content on disk" flag

You get an error that deletion is not possible.
Comment 1 Kevin Sawicki CLA 2011-11-16 18:40:27 EST
Could you please attach a screenshot of the error or the text of it?
Comment 2 Lars Vogel CLA 2011-11-17 05:15:40 EST
Created attachment 207134 [details]
Screenshot

@Kevin: You should be able to reproduce this easily. I seems that you also need to have at least one file of the project in an editor to get the error.
Comment 3 Lars Vogel CLA 2011-11-17 05:20:43 EST
Error:

org.eclipse.core.internal.resources.ResourceException: Problems encountered while deleting resources.
	at org.eclipse.core.internal.localstore.FileSystemResourceManager.delete(FileSystemResourceManager.java:352)
	at org.eclipse.core.internal.resources.ResourceTree.internalDeleteFolder(ResourceTree.java:352)
	at org.eclipse.core.internal.resources.ResourceTree.internalDeleteProject(ResourceTree.java:387)
	at org.eclipse.core.internal.resources.ResourceTree.standardDeleteProject(ResourceTree.java:837)
	at org.eclipse.core.internal.resources.Resource.unprotectedDelete(Resource.java:1939)
	at org.eclipse.core.internal.resources.Resource.delete(Resource.java:780)
	at org.eclipse.core.internal.resources.Project.delete(Project.java:344)
	at org.eclipse.ltk.core.refactoring.resource.DeleteResourceChange.perform(DeleteResourceChange.java:132)
	at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
	at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
	at org.eclipse.ltk.core.refactoring.PerformChangeOperation$1.run(PerformChangeOperation.java:258)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:306)
	at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(UIPerformChangeOperation.java:92)
	at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:218)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Contains: Problems encountered while deleting files.
Contains: Could not delete: C:\Users\vogella\workspace\devoxx\devoxx.test\res\layout\main.xml.
Contains: Could not delete: C:\Users\vogella\workspace\devoxx\devoxx.test\res\layout.
Contains: Could not delete: C:\Users\vogella\workspace\devoxx\devoxx.test\res.
Comment 4 Kevin Sawicki CLA 2011-11-17 12:42:55 EST
Are there any other cause exceptions listed in the log?
Comment 5 Lars Vogel CLA 2011-11-17 14:33:28 EST
@Kevin: Were you able to reproduce? Should be easy and then you could have a look at the message directly.
Comment 6 Kevin Sawicki CLA 2011-11-17 14:38:38 EST
I was not able too, what version are you running of EGit?
Comment 7 Lars Vogel CLA 2011-11-17 14:40:00 EST
The official release with EGit with Indigo SP2. Did you have a file open from the project which should get deleted and a git repo with several projects?
Comment 8 Lars Vogel CLA 2012-10-03 00:40:40 EDT
Haven't seen that in a while. Closing as fixed (in Eclipse 4.2).