Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2013-03-27 18:15:08 -0400
committerEugene Tarassov2013-03-27 18:15:08 -0400
commit47953ad492844481c55776d72892a0f9d3705ef4 (patch)
treebff31ce0f57e704710e7704fa81e67d5f685a9dd /plugins
parent47fc9f3ece29fc1a8e2b5cfbc79574baf2004503 (diff)
downloadorg.eclipse.tcf-47953ad492844481c55776d72892a0f9d3705ef4.tar.gz
org.eclipse.tcf-47953ad492844481c55776d72892a0f9d3705ef4.tar.xz
org.eclipse.tcf-47953ad492844481c55776d72892a0f9d3705ef4.zip
TCF Debugger: initial selection logic of the Debug view changed to wait until there is something to select in the view, e.g. until first "context suspended" event
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java
index ef00368a5..6e34a250a 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java
@@ -198,6 +198,8 @@ public class TCFModel implements ITCFModel, IElementContentProvider, IElementLab
private final IExpressionManager expr_manager;
private final TCFAnnotationManager annotation_manager;
+ private InitialSelection initial_selection;
+
private final List<ISuspendTriggerListener> suspend_trigger_listeners =
new LinkedList<ISuspendTriggerListener>();
@@ -636,14 +638,18 @@ public class TCFModel implements ITCFModel, IElementContentProvider, IElementLab
boolean done;
InitialSelection(TCFModelProxy proxy) {
this.proxy = proxy;
+ initial_selection = this;
}
public void run() {
if (done) return;
+ if (initial_selection != this) return;
if (launch_node != null) {
ArrayList<TCFNodeExecContext> nodes = new ArrayList<TCFNodeExecContext>();
if (!searchSuspendedThreads(launch_node.getFilteredChildren(), nodes)) return;
if (nodes.size() == 0) {
setDebugViewSelectionForProxy(proxy, launch_node, "Launch");
+ // No usable selection. Re-run when a context is suspended.
+ return;
}
else if (nodes.size() == 1) {
TCFNodeExecContext n = nodes.get(0);
@@ -656,6 +662,7 @@ public class TCFModel implements ITCFModel, IElementContentProvider, IElementLab
}
}
}
+ initial_selection = null;
done = true;
}
private boolean searchSuspendedThreads(TCFChildren c, ArrayList<TCFNodeExecContext> nodes) {
@@ -1607,6 +1614,7 @@ public class TCFModel implements ITCFModel, IElementContentProvider, IElementLab
if (node == null) return;
if (node.isDisposed()) return;
runSuspendTrigger(node);
+ if (initial_selection != null) Protocol.invokeLater(initial_selection);
if (reason == null) return;
for (TCFModelProxy proxy : model_proxies) {
if (proxy.getPresentationContext().getId().equals(IDebugUIConstants.ID_DEBUG_VIEW)) {

Back to the top