Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2014-02-10 08:24:54 -0500
committerUwe Stieber2014-02-10 08:24:54 -0500
commitcb01858e1bd99f8ac4c7f13a1663ebe42a8619dc (patch)
tree55805eef607cfe9c91864ad488be97765c107704
parentbd6fd8cec1338e197981bd8f791aa4dec6a057cb (diff)
downloadorg.eclipse.tcf-cb01858e1bd99f8ac4c7f13a1663ebe42a8619dc.tar.gz
org.eclipse.tcf-cb01858e1bd99f8ac4c7f13a1663ebe42a8619dc.tar.xz
org.eclipse.tcf-cb01858e1bd99f8ac4c7f13a1663ebe42a8619dc.zip
Target Explorer: Fix debug service implementation to call disconnect() and the TCFLaunch instead of terminate(). Terminate is implemented empty.
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/internal/services/DebugService.java5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelTraceListener.java2
2 files changed, 4 insertions, 3 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 77c67b364..5c7de0599 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
@@ -21,6 +21,7 @@ import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchListener;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.ILaunchesListener;
+import org.eclipse.debug.core.model.IDisconnect;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.te.launch.core.lm.LaunchManager;
@@ -185,10 +186,10 @@ public class DebugService extends AbstractService implements IDebugService {
ILaunch[] launches = DebugPlugin.getDefault().getLaunchManager().getLaunches();
for (ILaunch launch : launches) {
try {
- if (launch.getLaunchConfiguration().getType().getIdentifier().equals(ILaunchTypes.ATTACH) && !launch.isTerminated()) {
+ if (launch.getLaunchConfiguration().getType().getIdentifier().equals(ILaunchTypes.ATTACH) && launch instanceof IDisconnect && !((IDisconnect)launch).isDisconnected()) {
IModelNode[] contexts = LaunchContextsPersistenceDelegate.getLaunchContexts(launch.getLaunchConfiguration());
if (contexts != null && contexts.length == 1 && contexts[0].equals(context)) {
- launch.terminate();
+ ((IDisconnect)launch).disconnect();
}
}
} catch (Exception e) {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelTraceListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelTraceListener.java
index 8b540330d..919ca3d17 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelTraceListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.log.core/src/org/eclipse/tcf/te/tcf/log/core/internal/listener/ChannelTraceListener.java
@@ -55,7 +55,7 @@ public class ChannelTraceListener implements TraceListener {
Assert.isNotNull(channel);
this.channel = channel;
- reverseReceived = channel.getRemotePeer().getName().endsWith("Command Server"); //$NON-NLS-1$
+ reverseReceived = channel.getRemotePeer().getName() != null && channel.getRemotePeer().getName().endsWith("Command Server"); //$NON-NLS-1$
}
/**

Back to the top