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

Bug 438414 - Fix NPEs in new launch toolbar

Fixed NPEs occuring from improper initialization/function in
CDTLaunchConfigProvider and LaunchBarManager

Change-Id: I84b70d25dc0d9787e0b45ceb3f79bf4258e06744

Change-Id: I1ee942e73af383a8e691d7d4e8308a099d715fbd
Signed-off-by: jonwilliams@qnx.com
Reviewed-on: https://git.eclipse.org/r/29130
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
Tested-by: Doug Schaefer <dschaefer@qnx.com>
This commit is contained in:
Jonathan Williams 2014-06-26 14:21:58 -04:00 committed by Doug Schaefer
parent fbca073d79
commit 48496423ab
2 changed files with 4 additions and 2 deletions

View file

@ -18,7 +18,7 @@ public class CDTLaunchConfigProvider implements ILaunchConfigurationsProvider {
@Override
public ILaunchConfigurationDescriptor filterDescriptor(ILaunchConfigurationDescriptor descriptor) {
return null;
return descriptor;
}
}

View file

@ -46,7 +46,7 @@ public class LaunchBarManager extends PlatformObject implements ILaunchBarManage
private List<ProviderExtensionDescriptor> providers = new ArrayList<>();
private Map<String, ILaunchConfigurationDescriptor> configDescs = new HashMap<>();
private ILaunchConfigurationDescriptor lastConfigDesc, activeConfigDesc;
private ILaunchMode[] launchModes;
private ILaunchMode[] launchModes = new ILaunchMode[0];
private ILaunchMode activeLaunchMode;
private final LocalTargetType localTargetType = new LocalTargetType();
@ -112,6 +112,8 @@ public class LaunchBarManager extends PlatformObject implements ILaunchBarManage
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
for (ILaunchConfiguration configuration : launchManager.getLaunchConfigurations()) {
ILaunchConfigurationDescriptor configDesc = new DefaultLaunchConfigurationDescriptor(configuration);
for (ProviderExtensionDescriptor provider : providers) {
configDesc = provider.getProvider().filterDescriptor(configDesc);
}