Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2016-02-12 18:20:15 +0000
committerEugene Tarassov2016-02-12 18:20:46 +0000
commite0b3f0153328497ff7c9a69c71f04f043df68673 (patch)
treec66e56b17c62907e04876e267a39d22d8664682b /plugins
parent542702aca60cfa77a277a788203f303f5f0b8bdd (diff)
downloadorg.eclipse.tcf-e0b3f0153328497ff7c9a69c71f04f043df68673.tar.gz
org.eclipse.tcf-e0b3f0153328497ff7c9a69c71f04f043df68673.tar.xz
org.eclipse.tcf-e0b3f0153328497ff7c9a69c71f04f043df68673.zip
TCF Debugger: fixed: TCF launch should disconnect itself from the target if it is removed from the launch manager
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFLaunch.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFLaunch.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFLaunch.java
index 039b7611d..4c833776d 100644
--- a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFLaunch.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/model/TCFLaunch.java
@@ -30,6 +30,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.variables.VariablesPlugin;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.Launch;
@@ -1095,6 +1096,20 @@ public class TCFLaunch extends Launch {
}
}
+ @Override
+ public void launchRemoved(ILaunch launch) {
+ if (this != launch) return;
+ super.launchRemoved(launch);
+ Protocol.invokeAndWait(new Runnable() {
+ @Override
+ public void run() {
+ if (channel != null && channel.getState() != IChannel.STATE_CLOSED) {
+ channel.close();
+ }
+ }
+ });
+ }
+
/**
* Get TCF communication channel that is used by the launch.
* Thread safe method.

Back to the top