Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Schwarz2014-10-02 11:07:19 +0000
committerTobias Schwarz2014-10-02 11:07:19 +0000
commit8caf3c1794b0ab57f4f14ee8946c411c8592e325 (patch)
tree18bcf63a93ded4894e15548a3106393c9b1ab10a /target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui
parent320910c7c1d421a28e55c640124a75e0279f2743 (diff)
downloadorg.eclipse.tcf-8caf3c1794b0ab57f4f14ee8946c411c8592e325.tar.gz
org.eclipse.tcf-8caf3c1794b0ab57f4f14ee8946c411c8592e325.tar.xz
org.eclipse.tcf-8caf3c1794b0ab57f4f14ee8946c411c8592e325.zip
Target Explorer: enable reattach on connection recovered
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.java11
1 files changed, 8 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 f50aef0fa..b220bbd75 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
@@ -197,12 +197,17 @@ 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 instanceof IDisconnect && !((IDisconnect)launch).isDisconnected()) {
+ if (launch.getLaunchConfiguration().getType().getIdentifier().equals(ILaunchTypes.ATTACH)) {
IModelNode[] contexts = LaunchContextsPersistenceDelegate.getLaunchContexts(launch.getLaunchConfiguration());
if (contexts != null && contexts.length == 1 && contexts[0].equals(context)) {
- ((IDisconnect)launch).disconnect();
+ if (launch instanceof IDisconnect && !((IDisconnect)launch).isDisconnected()) {
+ ((IDisconnect)launch).disconnect();
+ data.setProperty(PROPERTY_DEBUGGER_DETACHED, true);
+ }
+ else if (launch instanceof Launch) {
+ data.setProperty(PROPERTY_DEBUGGER_DETACHED, !((Launch)launch).isManualDisconnected());
+ }
}
- data.setProperty(PROPERTY_DEBUGGER_DETACHED, true);
}
} catch (Exception e) {
if (e instanceof ExecutionException && "TCF task aborted".equals(e.getMessage()) //$NON-NLS-1$

Back to the top