From 84b98695779c049fc222c9420f86934a2cc591df Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Tue, 30 Apr 2013 17:46:22 -0400 Subject: [PATCH] Avoid updating non-existing project. Problem reported by JUnit. --- .../cdt/internal/core/model/SetPathEntriesOperation.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SetPathEntriesOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SetPathEntriesOperation.java index 7aa2dfa93a0..dd4d9512654 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SetPathEntriesOperation.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/SetPathEntriesOperation.java @@ -63,8 +63,11 @@ public class SetPathEntriesOperation extends CModelOperation { try { IProject projectResource = cproject.getProject(); - IProjectDescription description = projectResource.getDescription(); + if (!projectResource.isAccessible()) { + return; + } + IProjectDescription description = projectResource.getDescription(); IProject[] projectReferences = description.getReferencedProjects(); HashSet oldReferences = new HashSet(projectReferences.length);