From c4db17aa342f7d7cf76bdb1c3efed73b2d822ca9 Mon Sep 17 00:00:00 2001 From: David Inglis Date: Wed, 11 Aug 2004 17:40:49 +0000 Subject: [PATCH] handle case when initializer extension is missconfigured. --- .../cdt/internal/core/model/PathEntryManager.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java index 2a34b77dab1..dc84fe54133 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/PathEntryManager.java @@ -566,8 +566,8 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange if (runInitializer) { // remove the lock. final PathEntryContainerInitializer initializer = getPathEntryContainerInitializer(containerPath.segment(0)); + final boolean[] ok = {false}; if (initializer != null) { - final boolean[] ok = {true}; // wrap initializer call with Safe runnable in case // initializer would be // causing some grief @@ -577,16 +577,16 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange IStatus status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, IStatus.ERROR, "Exception occurred in container initializer: "+initializer, exception); //$NON-NLS-1$ CCorePlugin.log(status); - ok[0] = false; } public void run() throws Exception { initializer.initialize(containerPath, project); + ok[0] = true; } }); - if (!ok[0]) { - containerPut(project, containerPath, null); // flush and notify - } + } + if (!ok[0]) { + containerPut(project, containerPath, null); // flush and notify } } // retrieve new value