Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2014-02-19 09:38:38 +0000
committerTobias Schwarz2014-02-19 09:38:38 +0000
commit78d21d19353495c7c387405d181bf19f77ea2a65 (patch)
treec0d66a7594a1bfb9ecd2065f27de9cc06315eef0 /target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui
parent84f8bf518148c1958727fa59faa302c21594dc53 (diff)
downloadorg.eclipse.tcf-78d21d19353495c7c387405d181bf19f77ea2a65.tar.gz
org.eclipse.tcf-78d21d19353495c7c387405d181bf19f77ea2a65.tar.xz
org.eclipse.tcf-78d21d19353495c7c387405d181bf19f77ea2a65.zip
Target Explorer: fix launch cancel handling
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/services/DebugService.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/services/DebugService.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/services/DebugService.java
index 5c7de0599..559c0e34c 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/services/DebugService.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/services/DebugService.java
@@ -126,7 +126,7 @@ public class DebugService extends AbstractService implements IDebugService {
delegate.validate(ILaunchManager.DEBUG_MODE, finConfig);
- DebugPlugin.getDefault().getLaunchManager().addLaunchListener(new ILaunchListener() {
+ final ILaunchListener listener = new ILaunchListener() {
@Override
public void launchAdded(ILaunch launch) {
if (launch != null && finConfig.equals(launch.getLaunchConfiguration())) {
@@ -147,8 +147,12 @@ public class DebugService extends AbstractService implements IDebugService {
@Override
public void launchRemoved(ILaunch launch) {
+ DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this);
+ callback.done(this, Status.CANCEL_STATUS);
}
- });
+ };
+
+ DebugPlugin.getDefault().getLaunchManager().addLaunchListener(listener);
// DebugUITools.launch(...) must be called from within the UI thread.
DisplayUtil.safeAsyncExec(new Runnable() {

Back to the top