Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-09-08 07:12:28 +0000
committerAlexander Kurtakov2017-09-08 07:12:51 +0000
commitb3c56b7f12d085ef7a40b169876746c16871d8c6 (patch)
tree05d941656f31ec643c278002abf8518f37466a41 /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions
parentfa2b847f155ce5cc60fac6a40a39aae766823467 (diff)
downloadeclipse.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"
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ExecuteActionRequest.java49
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/TerminateAndRelaunchAction.java31
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() {

Back to the top