Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Duft2012-01-25 07:54:02 +0000
committerDariusz Luksza2012-02-19 13:22:02 +0000
commit180829089957e15329bc36f84dbaa0449ba1b650 (patch)
tree152490e0f9649c9c0614234b22d448fa3152f479
parentdefea52bd986248c596c6489cd23ac8e84153a7e (diff)
downloadegit-180829089957e15329bc36f84dbaa0449ba1b650.tar.gz
egit-180829089957e15329bc36f84dbaa0449ba1b650.tar.xz
egit-180829089957e15329bc36f84dbaa0449ba1b650.zip
guard against missing projects
it seems that sometimes when switching branches where projects are missing, this job still sees the missing projects, and tries to refresh them. guard against an exception when trying to do so. Change-Id: Id5acd776d2ea3b806eebb4edb21d51d3205ae16f
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java3
1 files changed, 2 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 2c23ba20cf..3d3751de7b 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java
@@ -331,7 +331,8 @@ public class Activator extends AbstractUIPlugin implements DebugOptionsListener
ISchedulingRule rule = p.getWorkspace().getRuleFactory().refreshRule(p);
try {
getJobManager().beginRule(rule, monitor);
- p.refreshLocal(IResource.DEPTH_INFINITE, new SubProgressMonitor(monitor, 1));
+ if(p.exists()) // handle missing projects after branch switch
+ p.refreshLocal(IResource.DEPTH_INFINITE, new SubProgressMonitor(monitor, 1));
} catch (CoreException e) {
handleError(UIText.Activator_refreshFailed, e, false);
return new Status(IStatus.ERROR, getPluginId(), e.getMessage());

Back to the top