Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2008-02-01 21:47:41 +0000
committerDarin Wright2008-02-01 21:47:41 +0000
commitabeaaec8c949f0897cbf4fc755cf4891845f5315 (patch)
treee7bf6a570e20c9efe477db75f94691ed3f9d55da /org.eclipse.debug.ui
parent5fa30d6552916d2d488586a6b591f93850b7d1b9 (diff)
downloadeclipse.platform.debug-abeaaec8c949f0897cbf4fc755cf4891845f5315.tar.gz
eclipse.platform.debug-abeaaec8c949f0897cbf4fc755cf4891845f5315.tar.xz
eclipse.platform.debug-abeaaec8c949f0897cbf4fc755cf4891845f5315.zip
Bug 208062 - First context menu has mysterious Run As/Debug As/Profile As menu entries
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/plugin.xml6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java24
2 files changed, 5 insertions, 25 deletions
diff --git a/org.eclipse.debug.ui/plugin.xml b/org.eclipse.debug.ui/plugin.xml
index f52220fd2..5531c542a 100644
--- a/org.eclipse.debug.ui/plugin.xml
+++ b/org.eclipse.debug.ui/plugin.xml
@@ -883,7 +883,7 @@
id="org.eclipse.debug.ui.contextualLaunch.profile.submenu">
</action>
<enablement>
- <test property="org.eclipse.debug.ui.launchable" value="profile"/>
+ <test property="org.eclipse.debug.core.launchable" value="profile"/>
</enablement>
</objectContribution>
<objectContribution
@@ -898,7 +898,7 @@
id="org.eclipse.debug.ui.contextualLaunch.debug.submenu">
</action>
<enablement>
- <test property="org.eclipse.debug.ui.launchable" value="debug"/>
+ <test property="org.eclipse.debug.core.launchable" value="debug"/>
</enablement>
</objectContribution>
<objectContribution
@@ -913,7 +913,7 @@
id="org.eclipse.debug.ui.contextualLaunch.run.submenu">
</action>
<enablement>
- <test property="org.eclipse.debug.ui.launchable" value="run"/>
+ <test property="org.eclipse.debug.core.launchable" value="run"/>
</enablement>
</objectContribution>
<!-- console additions -->
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 7338eca88..0bbc12b24 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -53,7 +53,6 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchDelegate;
import org.eclipse.debug.core.ILaunchListener;
import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.ILaunchMode;
import org.eclipse.debug.internal.core.IConfigurationElementConstants;
import org.eclipse.debug.internal.core.LaunchManager;
import org.eclipse.debug.internal.ui.DebugPluginImages;
@@ -180,12 +179,6 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
* true when restoring launch history
*/
protected boolean fRestoring = false;
-
- /**
- * A set containing the launch modes supported by
- * current configurations.
- */
- private Set fLoadedModes = null;
/**
* The name of the file used to persist the launch history.
@@ -213,20 +206,7 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
* @return whether any launch config supports the given mode
*/
public boolean launchModeAvailable(String mode) {
- if (fLoadedModes == null) {
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType[] types = launchManager.getLaunchConfigurationTypes();
- ILaunchMode[] modes = launchManager.getLaunchModes();
- fLoadedModes = new HashSet(3);
- for (int i = 0; i < types.length; i++) {
- for (int j = 0; j < modes.length; j++) {
- if (types[i].supportsMode(modes[j].getIdentifier())) {
- fLoadedModes.add(modes[j].getIdentifier());
- }
- }
- }
- }
- return fLoadedModes.contains(mode);
+ return ((LaunchManager)DebugPlugin.getDefault().getLaunchManager()).launchModeAvailable(mode);
}
/**

Back to the top