From c8b246f97487d0b79245928bbdc9d9ba7a4d1a93 Mon Sep 17 00:00:00 2001 From: Leo Treggiari Date: Thu, 29 Dec 2005 15:10:52 +0000 Subject: [PATCH] Update loadExtensionsSynchronized to handle issue with setting the 'loaded' flag too early --- .../cdt/managedbuilder/core/ManagedBuildManager.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java index aead8e06549..c64bc336e53 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java @@ -138,6 +138,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI private static final PluginVersionIdentifier buildInfoVersion = new PluginVersionIdentifier(3, 0, 0); private static Map depCalculatorsMap; private static boolean projectTypesLoaded = false; + private static boolean projectTypesLoading = false; // Project types defined in the manifest files public static SortedMap projectTypeMap; private static List projectTypes; @@ -1763,7 +1764,11 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI // Do this once if (projectTypesLoaded) return; - projectTypesLoaded = true; + + // This routine gets called recursively. If so, just return + if (projectTypesLoading) + return; + projectTypesLoading = true; // Get the extensions that use the current CDT managed build model IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(EXTENSION_POINT_ID); @@ -2031,6 +2036,8 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI } performAdjustments(); + projectTypesLoading = false; + projectTypesLoaded = true; } private static void performAdjustments(){