Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/context/AbstractDebugContextAction.java12
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/context/ToggleStepFiltersAction.java9
2 files changed, 20 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/context/AbstractDebugContextAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/context/AbstractDebugContextAction.java
index 9569d166e..942f8ecfd 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/context/AbstractDebugContextAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/context/AbstractDebugContextAction.java
@@ -139,9 +139,19 @@ public abstract class AbstractDebugContextAction extends Action implements IDebu
if (activeContext != null) {
contextActivated(activeContext, null);
} else {
- setEnabled(false);
+ setEnabled(getInitialEnablement());
}
}
+
+ /**
+ * Returns whether this action should be enabled when initialized
+ * and there is no active debug context.
+ *
+ * @return false, by default
+ */
+ protected boolean getInitialEnablement() {
+ return false;
+ }
protected void setWindow(IWorkbenchWindow window) {
fWindow = window;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/context/ToggleStepFiltersAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/context/ToggleStepFiltersAction.java
index f21997893..ba9eeb3b1 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/context/ToggleStepFiltersAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/context/ToggleStepFiltersAction.java
@@ -102,4 +102,13 @@ public class ToggleStepFiltersAction extends AbstractDebugContextAction {
}
}
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.actions.context.AbstractDebugContextAction#getInitialEnablement()
+ */
+ protected boolean getInitialEnablement() {
+ return true;
+ }
+
+
+
}

Back to the top