Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2006-04-19 17:51:44 +0000
committerDarin Wright2006-04-19 17:51:44 +0000
commit5a513679934dc8e1d499de52268f980093e7e7c0 (patch)
treeed19e9b8e1f1ea63b0728bde6298560518baa13e
parent0e50d930c9391f58abf9c1735c2ed0fc8710cf5d (diff)
downloadeclipse.platform.debug-5a513679934dc8e1d499de52268f980093e7e7c0.tar.gz
eclipse.platform.debug-5a513679934dc8e1d499de52268f980093e7e7c0.tar.xz
eclipse.platform.debug-5a513679934dc8e1d499de52268f980093e7e7c0.zip
Bug 124274 - debug keybindings not active on first launch
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/context/AbstractDebugContextActionDelegate.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/context/AbstractDebugContextActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/context/AbstractDebugContextActionDelegate.java
index 2a905b423..fe8bb5311 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/context/AbstractDebugContextActionDelegate.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/context/AbstractDebugContextActionDelegate.java
@@ -29,6 +29,12 @@ public abstract class AbstractDebugContextActionDelegate implements IWorkbenchWi
* The underlying action for this delegate
*/
private IAction fWindowAction;
+
+ /**
+ * Whether this action has been initialized before it has been run
+ * (ensures enablement state is up to date when lazily instantiated)
+ */
+ private boolean fInitialized = false;
public AbstractDebugContextActionDelegate() {
}
@@ -64,6 +70,12 @@ public abstract class AbstractDebugContextActionDelegate implements IWorkbenchWi
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
public synchronized void run(IAction action) {
+ if (!fInitialized) {
+ try {
+ wait();
+ } catch (InterruptedException e) {
+ }
+ }
fDebugAction.run();
}
@@ -101,7 +113,11 @@ public abstract class AbstractDebugContextActionDelegate implements IWorkbenchWi
fDebugAction.setWindow(window);
}
- public void setEnabled(boolean enabled) {
+ public synchronized void setEnabled(boolean enabled) {
+ if (!fInitialized) {
+ fInitialized = true;
+ notifyAll();
+ }
fWindowAction.setEnabled(enabled);
}

Back to the top