aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Duft2012-01-25 02:54:02 (EST)
committerDariusz Luksza2012-02-19 08:22:02 (EST)
commit180829089957e15329bc36f84dbaa0449ba1b650 (patch)
tree152490e0f9649c9c0614234b22d448fa3152f479
parentdefea52bd986248c596c6489cd23ac8e84153a7e (diff)
downloadegit-180829089957e15329bc36f84dbaa0449ba1b650.zip
egit-180829089957e15329bc36f84dbaa0449ba1b650.tar.gz
egit-180829089957e15329bc36f84dbaa0449ba1b650.tar.bz2
guard against missing projectsrefs/changes/63/5063/2
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 2c23ba2..3d3751d 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());