Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2015-06-29 13:50:42 +0000
committerAnton Leherbauer2015-06-29 13:50:49 +0000
commit06840b04d77e53e61c934b6cf985024ebd01a056 (patch)
treef920aaaf0061da42b42febe0f484301a26719e5e /target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt
parentbaf8263c078fe2020f4caf85c5545e6424d9a4b3 (diff)
downloadorg.eclipse.tcf-06840b04d77e53e61c934b6cf985024ebd01a056.tar.gz
org.eclipse.tcf-06840b04d77e53e61c934b6cf985024ebd01a056.tar.xz
org.eclipse.tcf-06840b04d77e53e61c934b6cf985024ebd01a056.zip
Target Explorer: Fix terminate of stopped process
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TERunProcess.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TERunProcess.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TERunProcess.java
index 35985155f..7c221f425 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TERunProcess.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/utils/TERunProcess.java
@@ -55,7 +55,6 @@ public class TERunProcess extends PlatformObject implements IProcess,
prName = remoteExePath;
terminated = false;
launch.addProcess(this);
- fireCreationEvent();
EventManager.getInstance().addEventListener(this,
ProcessStateChangeEvent.class);
try {
@@ -70,8 +69,7 @@ public class TERunProcess extends PlatformObject implements IProcess,
reason = "Unknown Reason"; //$NON-NLS-1$
prName += " (Failed to start: " + reason + ')'; //$NON-NLS-1$
}
- if (prLauncher == null)
- fireTerminateEvent();
+ fireCreationEvent();
}
@Override
@@ -113,8 +111,6 @@ public class TERunProcess extends PlatformObject implements IProcess,
public void terminate() throws DebugException {
if (!isTerminated()) {
prLauncher.terminate();
- terminated = true;
- fireTerminateEvent();
}
}
@@ -167,7 +163,8 @@ public class TERunProcess extends PlatformObject implements IProcess,
if (pscEvent.getEventId().equals(
ProcessStateChangeEvent.EVENT_PROCESS_CREATED)) {
if ((pscEvent.getSource() instanceof ProcessContext)) {
- context = (ProcessContext) pscEvent.getSource();
+ if (prLauncher != null && prLauncher.getAdapter(ProcessContext.class) == pscEvent.getSource())
+ context = (ProcessContext) pscEvent.getSource();
}
} else if (pscEvent.getEventId().equals(
ProcessStateChangeEvent.EVENT_PROCESS_TERMINATED)) {

Back to the top