1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-08 02:53:12 +02:00

crecoskie June 28, 2005

- fixing Bugzilla 102072 (custom wizard pages are only displayed the first time the wizard is invoked)
This commit is contained in:
Chris Recoskie 2005-06-28 19:32:55 +00:00
parent 2829a3708b
commit 6edaf6ef3c

View file

@ -102,15 +102,11 @@ public final class MBSCustomPageManager
*/ */
private static Set pageSet = null; private static Set pageSet = null;
private static boolean extensionsLoaded = false;
/** /**
* Maps page IDs to the properties that page has set. * Maps page IDs to the properties that page has set.
*/ */
private static java.util.Map pageIDtoPagePropertiesMap = null; private static java.util.Map pageIDtoPagePropertiesMap = null;
private static boolean initialized = false;
private static final String EXTENSION_POINT_ID = "org.eclipse.cdt.managedbuilder.ui.newWizardPages"; //$NON-NLS-1$ private static final String EXTENSION_POINT_ID = "org.eclipse.cdt.managedbuilder.ui.newWizardPages"; //$NON-NLS-1$
/** /**
@ -121,20 +117,12 @@ public final class MBSCustomPageManager
*/ */
public static void loadExtensions() throws BuildException public static void loadExtensions() throws BuildException
{ {
if (extensionsLoaded)
return;
loadExtensionsSynchronized(); loadExtensionsSynchronized();
} }
private synchronized static void loadExtensionsSynchronized() private synchronized static void loadExtensionsSynchronized()
throws BuildException throws BuildException
{ {
// Do this once
if (extensionsLoaded)
return;
extensionsLoaded = true;
// Get the extensions // Get the extensions
IExtensionPoint extensionPoint = Platform.getExtensionRegistry() IExtensionPoint extensionPoint = Platform.getExtensionRegistry()
.getExtensionPoint(EXTENSION_POINT_ID); .getExtensionPoint(EXTENSION_POINT_ID);
@ -716,21 +704,16 @@ public final class MBSCustomPageManager
/** /**
* Initializes the manager. * Initializes the manager.
* *
* This method should be called before any other operations are performed using this class. * This method should be called before any other operations are performed using this class, and should
* * be called every time pages are added to the wizard.
* Initialization is only performed once.
* *
* @since 3.0 * @since 3.0
*/ */
public static void init() public static void init()
{ {
if(!initialized)
{
initialized = true;
idToPageDataMap = new TreeMap(); idToPageDataMap = new TreeMap();
pageIDtoPagePropertiesMap = new TreeMap(); pageIDtoPagePropertiesMap = new TreeMap();
pageSet = new LinkedHashSet(); pageSet = new LinkedHashSet();
}
} }
// singleton class - do not use // singleton class - do not use