Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui.tests.git.framework/src/org/eclipse/emf/compare/ide/ui/tests/git/framework/internal/statements/InternalGitTestSupport.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests.git.framework/src/org/eclipse/emf/compare/ide/ui/tests/git/framework/internal/statements/InternalGitTestSupport.java b/plugins/org.eclipse.emf.compare.ide.ui.tests.git.framework/src/org/eclipse/emf/compare/ide/ui/tests/git/framework/internal/statements/InternalGitTestSupport.java
index 1a129ddf5..560f99fe5 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui.tests.git.framework/src/org/eclipse/emf/compare/ide/ui/tests/git/framework/internal/statements/InternalGitTestSupport.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui.tests.git.framework/src/org/eclipse/emf/compare/ide/ui/tests/git/framework/internal/statements/InternalGitTestSupport.java
@@ -345,8 +345,15 @@ public class InternalGitTestSupport {
}
new DisconnectProviderOperation(disconnectMe).execute(null);
- for (IProject iProject : ResourcesPlugin.getWorkspace().getRoot().getProjects()) {
- iProject.delete(true, new NullProgressMonitor());
+ // Delete sub-projects first
+ List<IProject> allProjects = new ArrayList<>(
+ Arrays.asList(ResourcesPlugin.getWorkspace().getRoot().getProjects()));
+ allProjects.sort((p1, p2) -> p2.getLocation().toString().compareTo(p1.getLocation().toString()));
+
+ for (IProject iProject : allProjects) {
+ if (iProject.isAccessible()) {
+ iProject.delete(true, new NullProgressMonitor());
+ }
}
ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE,
new NullProgressMonitor());

Back to the top