From 43cb5aa8747a9143edb0677c6eaf7a5c32a61348 Mon Sep 17 00:00:00 2001 From: Eugene Tarassov Date: Thu, 5 Dec 2013 16:05:59 -0800 Subject: Bug 422825 - suspend trigger is activated on each new execution context --- .../src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java | 5 ++++- .../org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java | 2 +- .../src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeLaunch.java | 2 +- 3 files changed, 6 insertions(+), 3 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 f3a8643eb..4ecf37017 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 @@ -156,6 +156,9 @@ public class TCFModel implements ITCFModel, IElementContentProvider, IElementLab /** The id of a pinned view description presentation context */ public static final String ID_PINNED_VIEW = Activator.PLUGIN_ID + ".pinned_view"; + /** Selection reason in the Debug view - context added */ + public static final String SELECT_ADDED = "Added"; + public static final int UPDATE_POLICY_AUTOMATIC = 0, UPDATE_POLICY_MANUAL = 1, @@ -1696,7 +1699,7 @@ public class TCFModel implements ITCFModel, IElementContentProvider, IElementLab assert Protocol.isDispatchThread(); if (node == null) return; if (node.isDisposed()) return; - runSuspendTrigger(node); + if (!SELECT_ADDED.equals(reason)) runSuspendTrigger(node); if (initial_selection != null) Protocol.invokeLater(initial_selection); if (reason == null) return; for (TCFModelProxy proxy : model_proxies) { diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java index bb4099cb3..1d2f0aef8 100644 --- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java +++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java @@ -1377,7 +1377,7 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner, ITCFExe } void onContextAdded(IRunControl.RunControlContext context) { - model.setDebugViewSelection(this, IRunControl.REASON_USER_REQUEST); + model.setDebugViewSelection(this, TCFModel.SELECT_ADDED); children_exec.onContextAdded(context); } diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeLaunch.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeLaunch.java index 8c3cc7707..1b0d81f85 100644 --- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeLaunch.java +++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeLaunch.java @@ -142,7 +142,7 @@ public class TCFNodeLaunch extends TCFNode implements ISymbolOwner { } } } - model.setDebugViewSelection(this, IRunControl.REASON_USER_REQUEST); + model.setDebugViewSelection(this, TCFModel.SELECT_ADDED); children.onContextAdded(context); } -- cgit v1.2.3