diff options
author | Alexander Kurtakov | 2017-09-08 07:12:28 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2017-09-08 07:12:51 +0000 |
commit | b3c56b7f12d085ef7a40b169876746c16871d8c6 (patch) | |
tree | 05d941656f31ec643c278002abf8518f37466a41 /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions | |
parent | fa2b847f155ce5cc60fac6a40a39aae766823467 (diff) | |
download | eclipse.platform.debug-b3c56b7f12d085ef7a40b169876746c16871d8c6.tar.gz eclipse.platform.debug-b3c56b7f12d085ef7a40b169876746c16871d8c6.tar.xz eclipse.platform.debug-b3c56b7f12d085ef7a40b169876746c16871d8c6.zip |
Revert "Bug 521038 - Replaced anonymous Runnable classes by lambda expression"
This reverts commit d8621eaf55a1e95ff894dda0a241af08cc6111fe.
Change-Id: I30777d3cf90d9a14f5de5e599b8a0ceefe1c8292
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions')
2 files changed, 49 insertions, 31 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ExecuteActionRequest.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ExecuteActionRequest.java index fefe8cbfd..851b2d4a7 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ExecuteActionRequest.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ExecuteActionRequest.java @@ -30,29 +30,44 @@ public class ExecuteActionRequest extends DebugCommandRequest { super(elements); } - @Override + @Override public void done() { - if (fParticipant != null) { + if (fParticipant != null) { fParticipant.requestDone(this); fParticipant = null; } - final IStatus status = getStatus(); - if (status != null) { - switch (status.getSeverity()) { - case IStatus.ERROR: - DebugUIPlugin.getStandardDisplay().asyncExec(() -> MessageDialog.openError(DebugUIPlugin.getShell(), DebugUIMessages.DebugUITools_Error_1, status.getMessage())); - break; - case IStatus.WARNING: - DebugUIPlugin.getStandardDisplay().asyncExec(() -> MessageDialog.openWarning(DebugUIPlugin.getShell(), DebugUIMessages.DebugUITools_Error_1, status.getMessage())); - break; - case IStatus.INFO: - DebugUIPlugin.getStandardDisplay().asyncExec(() -> MessageDialog.openInformation(DebugUIPlugin.getShell(), DebugUIMessages.DebugUITools_Error_1, status.getMessage())); - break; + final IStatus status = getStatus(); + if (status != null) { + switch (status.getSeverity()) { + case IStatus.ERROR: + DebugUIPlugin.getStandardDisplay().asyncExec(new Runnable() { + @Override + public void run() { + MessageDialog.openError(DebugUIPlugin.getShell(), DebugUIMessages.DebugUITools_Error_1, status.getMessage()); + } + }); + break; + case IStatus.WARNING: + DebugUIPlugin.getStandardDisplay().asyncExec(new Runnable() { + @Override + public void run() { + MessageDialog.openWarning(DebugUIPlugin.getShell(), DebugUIMessages.DebugUITools_Error_1, status.getMessage()); + } + }); + break; + case IStatus.INFO: + DebugUIPlugin.getStandardDisplay().asyncExec(new Runnable() { + @Override + public void run() { + MessageDialog.openInformation(DebugUIPlugin.getShell(), DebugUIMessages.DebugUITools_Error_1, status.getMessage()); + } + }); + break; default: break; - } - } - } + } + } + } public void setCommandParticipant(ICommandParticipant participant) { fParticipant = participant; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java index 3495f7a09..b0d0713bf 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java @@ -36,21 +36,24 @@ import org.eclipse.jface.viewers.StructuredSelection; */ public class TerminateAndRelaunchAction extends DebugCommandAction { - @Override + @Override public void postExecute(IRequest request, final Object[] targets) { - if (request.getStatus() == null || request.getStatus().isOK()) { - DebugUIPlugin.getStandardDisplay().asyncExec(() -> { - // Must be run in the UI thread since the launch can require - // prompting to proceed - for (int i = 0; i < targets.length; i++) { - ILaunch launch = DebugUIPlugin.getLaunch(targets[i]); - if (launch != null) { - RelaunchActionDelegate.relaunch(launch.getLaunchConfiguration(), launch.getLaunchMode()); - } - } - }); - } - } + if (request.getStatus() == null || request.getStatus().isOK()) { + DebugUIPlugin.getStandardDisplay().asyncExec(new Runnable() { + @Override + public void run() { + // Must be run in the UI thread since the launch can require + // prompting to proceed + for (int i = 0; i < targets.length; i++) { + ILaunch launch = DebugUIPlugin.getLaunch(targets[i]); + if (launch != null) { + RelaunchActionDelegate.relaunch(launch.getLaunchConfiguration(), launch.getLaunchMode()); + } + } + } + }); + } + } @Override protected ISelection getContext() { |