1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Fix loading of the active descriptor in the launchbar.

This commit is contained in:
Doug Schaefer 2014-07-13 20:38:58 -04:00
parent 283a3f1bd7
commit d9013538b8

View file

@ -137,6 +137,10 @@ public class LaunchBarManager extends PlatformObject implements ILaunchBarManage
}
});
// Load up the active from the preferences before loading the descriptors
IEclipsePreferences store = InstanceScope.INSTANCE.getNode(Activator.PLUGIN_ID);
String activeConfigDescName = store.get(PREF_ACTIVE_CONFIG_DESC, null);
for (ILaunchDescriptorType descriptorType : descriptorTypes) {
descriptorType.init(this);
}
@ -162,9 +166,7 @@ public class LaunchBarManager extends PlatformObject implements ILaunchBarManage
}
launchManager.addLaunchConfigurationListener(this);
// Load up the active from the preferences or pick reasonable defaults
IEclipsePreferences store = InstanceScope.INSTANCE.getNode(Activator.PLUGIN_ID);
String activeConfigDescName = store.get(PREF_ACTIVE_CONFIG_DESC, null);
// Now that all the descriptors are loaded, set the one
if (activeConfigDescName == null && !descriptors.isEmpty()) {
activeConfigDescName = descriptors.values().iterator().next().getName();
}