diff options
author | Andrey Loskutov | 2017-03-19 06:45:58 +0000 |
---|---|---|
committer | Andrey Loskutov | 2017-03-19 06:45:58 +0000 |
commit | dc90c09f030a8347a715054261d62b973fdb3d92 (patch) | |
tree | 1b242766f9db3cb88b5c3b93e0ba801d09a65c81 /org.eclipse.debug.ui/ui | |
parent | 93e5519e2a2843812684004760006f71f64454af (diff) | |
download | eclipse.platform.debug-dc90c09f030a8347a715054261d62b973fdb3d92.tar.gz eclipse.platform.debug-dc90c09f030a8347a715054261d62b973fdb3d92.tar.xz eclipse.platform.debug-dc90c09f030a8347a715054261d62b973fdb3d92.zip |
Bug 513790 - Compiler warnings in I20170316-2000 after moving to M6Y20170406-1000Y20170330-1000Y20170321-2315Y20170321-0120I20170412-2000I20170411-2000I20170411-0500I20170410-2000I20170409-2000I20170408-2000I20170407-2000I20170406-2000I20170405-2000I20170405-0300I20170405-0200I20170405-0130I20170404-2000I20170404-0840I20170404-0245I20170403-2000I20170402-2000I20170401-2000I20170331-2000I20170330-2000I20170329-2000I20170328-2000I20170327-2000I20170326-2000I20170325-2000I20170324-2000I20170323-2000I20170322-2000I20170321-2000I20170320-2000I20170319-2000
compiler
Change-Id: I8ed4bf58d11c23d054a950577add87415f3c910a
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'org.eclipse.debug.ui/ui')
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java index 33fd45f6f..9db8d18b8 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java @@ -722,19 +722,18 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici * @since 3.3 */ public String[] getApplicableConfigurationTypes(IResource resource) { - List<String> types = new ArrayList<String>(); List<LaunchShortcutExtension> exts = getLaunchShortcuts(); List<IResource> list = new ArrayList<IResource>(); list.add(resource); IEvaluationContext context = DebugUIPlugin.createEvaluationContext(list); context.setAllowPluginActivation(true); context.addVariable("selection", list); //$NON-NLS-1$ - HashSet<String> set = new HashSet<String>(); + HashSet<String> contributedTypeIds = new HashSet<String>(); for (Iterator<LaunchShortcutExtension> iter = exts.listIterator(); iter.hasNext();) { LaunchShortcutExtension ext = iter.next(); try { if(ext.evalEnablementExpression(context, ext.getContextualLaunchEnablementExpression())) { - set.addAll(ext.getAssociatedConfigurationTypes()); + contributedTypeIds.addAll(ext.getAssociatedConfigurationTypes()); } } catch(CoreException ce) { @@ -743,17 +742,18 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici iter.remove(); } } + List<String> typeIds = new ArrayList<String>(); LaunchManager lm = (LaunchManager) DebugPlugin.getDefault().getLaunchManager(); - ILaunchConfigurationType type = null; - for (String id : set) { - type = lm.getLaunchConfigurationType(id); + for (String id : contributedTypeIds) { + ILaunchConfigurationType type = lm.getLaunchConfigurationType(id); if(type != null) { - if(!types.contains(type) && type.isPublic() && !"org.eclipse.ui.externaltools.builder".equals(type.getCategory())) { //$NON-NLS-1$ - types.add(type.getIdentifier()); + String identifier = type.getIdentifier(); + if (!typeIds.contains(identifier) && type.isPublic() && !"org.eclipse.ui.externaltools.builder".equals(type.getCategory())) { //$NON-NLS-1$ + typeIds.add(identifier); } } } - return types.toArray(new String[types.size()]); + return typeIds.toArray(new String[typeIds.size()]); } /** |