Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2018-09-10 07:58:45 +0000
committerMatthias Sohn2018-09-10 19:44:27 +0000
commit7f37ec7cb9729db5ef8db83fdb2cf684c3155dcb (patch)
treef6fd54191e15cfc1684afdd5a0c24ed6f3bf6103
parent1d36a956728021cc6a8eb00e095fb710a4a0fe37 (diff)
downloadegit-7f37ec7cb9729db5ef8db83fdb2cf684c3155dcb.tar.gz
egit-7f37ec7cb9729db5ef8db83fdb2cf684c3155dcb.tar.xz
egit-7f37ec7cb9729db5ef8db83fdb2cf684c3155dcb.zip
Don't auto-refresh projects with missing .project file
Doing so results in a ResourceException. Auto-closing such projects doesn't seem to be right; it would remain closed after the .project file re-appeared due to some other git operation. Not refreshing appears to be the best bet in this case. Bug: 538846 Change-Id: Icf01ec0f467bbcc5f7b13ab3b5914779c16b8a2a Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rwxr-xr-xorg.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java
index d618df5a95..fa0404ca92 100755
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java
@@ -35,6 +35,7 @@ import java.util.stream.Stream;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRunnable;
@@ -653,7 +654,11 @@ public class Activator extends AbstractUIPlugin implements DebugOptionsListener
if (project.isAccessible()) {
IPath path = project.getLocation();
if (path != null) {
- result.put(path, project);
+ IPath projectFilePath = path.append(
+ IProjectDescription.DESCRIPTION_FILE_NAME);
+ if (projectFilePath.toFile().exists()) {
+ result.put(path, project);
+ }
}
}
}

Back to the top