Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2017-03-19 02:45:58 -0400
committerAndrey Loskutov2017-03-19 02:45:58 -0400
commitdc90c09f030a8347a715054261d62b973fdb3d92 (patch)
tree1b242766f9db3cb88b5c3b93e0ba801d09a65c81 /org.eclipse.debug.ui/ui
parent93e5519e2a2843812684004760006f71f64454af (diff)
downloadeclipse.platform.debug-dc90c09f030a8347a715054261d62b973fdb3d92.tar.gz
eclipse.platform.debug-dc90c09f030a8347a715054261d62b973fdb3d92.tar.xz
eclipse.platform.debug-dc90c09f030a8347a715054261d62b973fdb3d92.zip
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.java18
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()]);
}
/**

Back to the top