diff options
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java')
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java index a5d928e23..820a08469 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/AbstractDebugActionDelegate.java @@ -101,22 +101,19 @@ public abstract class AbstractDebugActionDelegate implements IViewActionDelegate fIsShift = isShift; final MultiStatus status= new MultiStatus(DebugUIPlugin.getUniqueIdentifier(), DebugException.REQUEST_FAILED, getStatusMessage(), null); - BusyIndicator.showWhile(Display.getCurrent(), new Runnable() { - @Override - public void run() { - Iterator<?> selectionIter = selection.iterator(); - while (selectionIter.hasNext()) { - Object element= selectionIter.next(); - try { - // Action's enablement could have been changed since - // it was last enabled. Check that the action is still - // enabled before running the action. - if (isEnabledFor(element)) { - doAction(element); - } - } catch (DebugException e) { - status.merge(e.getStatus()); + BusyIndicator.showWhile(Display.getCurrent(), () -> { + Iterator<?> selectionIter = selection.iterator(); + while (selectionIter.hasNext()) { + Object element = selectionIter.next(); + try { + // Action's enablement could have been changed since + // it was last enabled. Check that the action is still + // enabled before running the action. + if (isEnabledFor(element)) { + doAction(element); } + } catch (DebugException e) { + status.merge(e.getStatus()); } } }); |