Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2008-07-02 00:55:17 +0000
committereutarass2008-07-02 00:55:17 +0000
commitc8c0ed7ca6d7b071b5937da6557655b478033d19 (patch)
tree20d4d3508b60a9b9a5cb23d00575df102afd889c /plugins/org.eclipse.tm.tcf.debug.ui
parent4197d7dde1857b07d118d109d6e5a0495d76c2fe (diff)
downloadorg.eclipse.tcf-c8c0ed7ca6d7b071b5937da6557655b478033d19.tar.gz
org.eclipse.tcf-c8c0ed7ca6d7b071b5937da6557655b478033d19.tar.xz
org.eclipse.tcf-c8c0ed7ca6d7b071b5937da6557655b478033d19.zip
1. Workaround of deadlock condition in DSF
2. Removed unused interface TCFLaunch.TerminateListener
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug.ui')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java1
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/TerminateCommand.java46
2 files changed, 14 insertions, 33 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java
index f7ec48a99..1fadeea27 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/adapters/TCFLaunchLabelProvider.java
@@ -26,7 +26,6 @@ class TCFLaunchLabelProvider implements IElementLabelProvider {
String status = "";
if (launch.isConnecting()) status = "Connecting";
else if (launch.isExited()) status = "Exited";
- else if (launch.isTerminated()) status = "Terminated";
else if (launch.isDisconnected()) status = "Disconnected";
Throwable error = launch.getError();
if (error != null) {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/TerminateCommand.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/TerminateCommand.java
index 31bea2198..1f5e9b241 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/TerminateCommand.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/commands/TerminateCommand.java
@@ -49,12 +49,9 @@ public class TerminateCommand implements ITerminateHandler {
IRunControl.RunControlContext ctx = node.getRunContext();
if (ctx != null && ctx.canTerminate()) {
res = true;
- node = null;
- }
- else {
- node = node.getParent();
- if (node == null && model.getLaunch().canTerminate()) res = true;
+ break;
}
+ node = node.getParent();
}
}
monitor.setEnabled(res);
@@ -78,40 +75,25 @@ public class TerminateCommand implements ITerminateHandler {
IRunControl.RunControlContext ctx = node.getRunContext();
if (ctx != null && ctx.canTerminate()) {
set.add(ctx);
- node = null;
- }
- else {
- node = node.getParent();
- if (node == null) set.add(null);
+ break;
}
+ node = node.getParent();
}
}
final Set<IToken> cmds = new HashSet<IToken>();
for (Iterator<IRunControl.RunControlContext> i = set.iterator(); i.hasNext();) {
IRunControl.RunControlContext ctx = i.next();
- if (ctx == null) {
- cmds.add(null);
- model.getLaunch().terminate(new Runnable() {
- public void run() {
- assert cmds.contains(null);
- cmds.remove(null);
- if (cmds.isEmpty()) done();
- }
- });
- }
- else {
- cmds.add(ctx.terminate(new IRunControl.DoneCommand() {
- public void doneCommand(IToken token, Exception error) {
- assert cmds.contains(token);
- cmds.remove(token);
- if (error != null) {
- monitor.setStatus(new Status(IStatus.ERROR,
- Activator.PLUGIN_ID, IStatus.OK, "Cannot resume", error));
- }
- if (cmds.isEmpty()) done();
+ cmds.add(ctx.terminate(new IRunControl.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ assert cmds.contains(token);
+ cmds.remove(token);
+ if (error != null) {
+ monitor.setStatus(new Status(IStatus.ERROR,
+ Activator.PLUGIN_ID, IStatus.OK, "Cannot resume", error));
}
- }));
- }
+ if (cmds.isEmpty()) done();
+ }
+ }));
}
}
};

Back to the top