diff options
author | Darin Wright | 2006-11-28 17:59:38 +0000 |
---|---|---|
committer | Darin Wright | 2006-11-28 17:59:38 +0000 |
commit | a05585e759c99d8dd915ff18996080797dd436cb (patch) | |
tree | 7d9187c4d320abff8926d6fad8a717dd53a8057c /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands | |
parent | 0ba30c8668d1ceefed65b65aade6b90d8bf98ed5 (diff) | |
download | eclipse.platform.debug-a05585e759c99d8dd915ff18996080797dd436cb.tar.gz eclipse.platform.debug-a05585e759c99d8dd915ff18996080797dd436cb.tar.xz eclipse.platform.debug-a05585e759c99d8dd915ff18996080797dd436cb.zip |
Bug 166065 Deadlock in DebugCommandAction/DebugCommandActionDelegate
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands')
2 files changed, 16 insertions, 12 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandAction.java index 030a08d30..cca367402 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandAction.java @@ -126,7 +126,7 @@ public abstract class DebugCommandAction extends Action implements IDebugContext /** * @see org.eclipse.jface.action.Action#setEnabled(boolean) */ - public synchronized void setEnabled(boolean enabled) { + public void setEnabled(boolean enabled) { super.setEnabled(enabled); if (fDelegate != null) { fDelegate.setEnabled(enabled); @@ -196,7 +196,7 @@ public abstract class DebugCommandAction extends Action implements IDebugContext * (non-Javadoc) * @see org.eclipse.jface.action.Action#run() */ - public synchronized void run() { + public void run() { ISelection selection = getContext(); if (selection instanceof IStructuredSelection && isEnabled()) { IStructuredSelection ss = (IStructuredSelection) selection; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java index 416b0d8b3..0d83a7936 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/DebugCommandActionDelegate.java @@ -73,12 +73,14 @@ public abstract class DebugCommandActionDelegate implements IWorkbenchWindowActi * (non-Javadoc) * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) */ - public synchronized void run(IAction action) { - if (!fInitialized) { - try { - wait(); - } catch (InterruptedException e) { - } + public void run(IAction action) { + synchronized (this) { + if (!fInitialized) { + try { + wait(); + } catch (InterruptedException e) { + } + } } fDebugAction.run(); } @@ -109,10 +111,12 @@ public abstract class DebugCommandActionDelegate implements IWorkbenchWindowActi action.setDelegate(this); } - public synchronized void setEnabled(boolean enabled) { - if (!fInitialized) { - fInitialized = true; - notifyAll(); + public void setEnabled(boolean enabled) { + synchronized (this) { + if (!fInitialized) { + fInitialized = true; + notifyAll(); + } } fWindowAction.setEnabled(enabled); } |