Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchActionDelegate.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchActionDelegate.java
index b6023c016..50b65c125 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/RelaunchActionDelegate.java
@@ -70,7 +70,17 @@ public class RelaunchActionDelegate extends ControlActionDelegate {
* @see ControlActionDelegate
*/
public boolean isEnabledFor(Object element) {
- return element instanceof ILaunch || element instanceof IDebugElement || element instanceof IProcess;
+ ILaunch launch= null;
+
+ if (element instanceof ILaunch) {
+ launch= (ILaunch)element;
+ } else if (element instanceof IDebugElement) {
+ launch= ((IDebugElement)element).getLaunch();
+ } else if (element instanceof IProcess) {
+ launch= ((IProcess)element).getLaunch();
+ }
+
+ return launch != null && DebugUIPlugin.getDefault().isVisible(launch.getLauncher());
}
/**

Back to the top