Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2007-04-10 20:00:52 +0000
committerDarin Wright2007-04-10 20:00:52 +0000
commitb438c68c4561c89a98b24201689f868cd080e309 (patch)
tree26cbbe502c85497d5264c0f259c07cbe0b721b14
parent7310c3d9b23bf20b50cdbe47598c2dea48b8c0ff (diff)
downloadeclipse.platform.debug-b438c68c4561c89a98b24201689f868cd080e309.tar.gz
eclipse.platform.debug-b438c68c4561c89a98b24201689f868cd080e309.tar.xz
eclipse.platform.debug-b438c68c4561c89a98b24201689f868cd080e309.zip
Bug 178868 run/debug buttons do nothing if exception in shortcut enablement expr
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationManager.java10
1 files changed, 8 insertions, 2 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 e06818ff0..c909b5f98 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
@@ -42,7 +42,9 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
@@ -685,14 +687,18 @@ public class LaunchConfigurationManager implements ILaunchListener, ISavePartici
context.setAllowPluginActivation(true);
context.addVariable("selection", list); //$NON-NLS-1$
HashSet set = new HashSet();
- for(Iterator iter = exts.iterator(); iter.hasNext();) {
+ for(Iterator iter = exts.listIterator(); iter.hasNext();) {
ext = (LaunchShortcutExtension) iter.next();
try {
if(ext.evalEnablementExpression(context, ext.getContextualLaunchEnablementExpression())) {
set.addAll(ext.getAssociatedConfigurationTypes());
}
}
- catch(CoreException ce) {}
+ catch(CoreException ce) {
+ IStatus status = new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), "Launch shortcut '" + ext.getId() + "' enablement expression caused exception. Shortcut was removed.", ce); //$NON-NLS-1$ //$NON-NLS-2$
+ DebugUIPlugin.log(status);
+ iter.remove();
+ }
}
LaunchManager lm = (LaunchManager) DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType type = null;

Back to the top