diff options
author | Eugene Tarassov | 2015-05-26 19:46:36 +0000 |
---|---|---|
committer | Eugene Tarassov | 2015-05-26 19:46:36 +0000 |
commit | ea9255d8dcd43c89b7ec462fb6625b05c295b3a6 (patch) | |
tree | 87a7b0b492036defef8b86b30eab06832d933175 | |
parent | 6b5c00fb0ea8560a99c3b030477ecf72c3a49d2f (diff) | |
download | org.eclipse.tcf-ea9255d8dcd43c89b7ec462fb6625b05c295b3a6.tar.gz org.eclipse.tcf-ea9255d8dcd43c89b7ec462fb6625b05c295b3a6.tar.xz org.eclipse.tcf-ea9255d8dcd43c89b7ec462fb6625b05c295b3a6.zip |
TCF Debugger: fixed: initial selection in the Debug view does not work if remote debug context takes some time to get suspended
-rw-r--r-- | plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java | 8 |
1 files changed, 6 insertions, 2 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 5510e95c2..29fc6b25f 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 @@ -650,6 +650,7 @@ public class TCFModel implements ITCFModel, IElementContentProvider, IElementLab private class InitialSelection implements Runnable { final TCFModelProxy proxy; + boolean launch_selected; boolean done; InitialSelection(TCFModelProxy proxy) { this.proxy = proxy; @@ -662,7 +663,10 @@ public class TCFModel implements ITCFModel, IElementContentProvider, IElementLab ArrayList<TCFNodeExecContext> nodes = new ArrayList<TCFNodeExecContext>(); if (!searchSuspendedThreads(launch_node.getFilteredChildren(), nodes)) return; if (nodes.size() == 0) { - setDebugViewSelectionForProxy(proxy, launch_node, SELECT_INITIAL); + if (!launch_selected) { + setDebugViewSelectionForProxy(proxy, launch_node, SELECT_INITIAL); + launch_selected = true; + } // No usable selection. Re-run when a context is suspended. return; } @@ -1784,8 +1788,8 @@ public class TCFModel implements ITCFModel, IElementContentProvider, IElementLab reason.equals(IRunControl.REASON_CONTAINER) || delay_stack_update_until_last_step && launch.getContextActionsCount(node.id) != 0; if (proxy.getAutoExpandNode(node, user_request)) proxy.expand(node); - if (initial_selection != null && !reason.equals(SELECT_INITIAL)) initial_selection = null; if (reason.equals(IRunControl.REASON_USER_REQUEST) || reason.equals(TCFModel.SELECT_ADDED)) return false; + if (initial_selection != null && !reason.equals(SELECT_INITIAL)) initial_selection = null; proxy.setSelection(node); return true; } |