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:
parent
283a3f1bd7
commit
d9013538b8
1 changed files with 5 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue