Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/actions/PDATerminateCommand.java')
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/actions/PDATerminateCommand.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/actions/PDATerminateCommand.java b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/actions/PDATerminateCommand.java
index 449eda6d08f..ffa39bce943 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/actions/PDATerminateCommand.java
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/actions/PDATerminateCommand.java
@@ -54,6 +54,7 @@ public class PDATerminateCommand implements ITerminateHandler {
}
// Run control may not be available after a connection is terminated and shut down.
+ @Override
public void canExecute(final IEnabledStateRequest request) {
// Terminate can only operate on a single element.
if (request.getElements().length != 1 || !(request.getElements()[0] instanceof IDMVMContext)) {
@@ -75,6 +76,7 @@ public class PDATerminateCommand implements ITerminateHandler {
try {
fSession.getExecutor().execute(new DsfRunnable() {
+ @Override
public void run() {
// Get the processes service and the exec context.
PDACommandControl commandControl = fTracker.getService(PDACommandControl.class);
@@ -99,12 +101,14 @@ public class PDATerminateCommand implements ITerminateHandler {
}
}
+ @Override
public boolean execute(final IDebugCommandRequest request) {
// Skip the checks and assume that this method is called only if the action
// was enabled.
try {
fSession.getExecutor().submit(new DsfRunnable() {
+ @Override
public void run() {
// If the command control service is available, attempt to terminate the program.
PDACommandControl commandControl = fTracker.getService(PDACommandControl.class);

Back to the top