Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2011-05-13 19:18:24 -0400
committereutarass2011-05-13 19:18:24 -0400
commit45eb91327c359b0ea98d89ffd69d92012f88602c (patch)
tree6337eb8718fe535f01f6d927441a009f6ed9d130
parent9d37c209c61e34a50ad1e76bfc842beb7f80cd7a (diff)
downloadorg.eclipse.tcf-45eb91327c359b0ea98d89ffd69d92012f88602c.tar.gz
org.eclipse.tcf-45eb91327c359b0ea98d89ffd69d92012f88602c.tar.xz
org.eclipse.tcf-45eb91327c359b0ea98d89ffd69d92012f88602c.zip
TCF Debugger: improved Debug view update logic - less flicker in the view.
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java8
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java45
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java8
3 files changed, 34 insertions, 27 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java
index acab154dd..ce9b2e882 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java
@@ -43,10 +43,6 @@ public class TCFChildrenStackTrace extends TCFChildren {
reset();
}
- void onContextActionDone() {
- for (TCFNode n : getNodes()) ((TCFNodeStackFrame)n).onContextActionDone();
- }
-
void onRegistersChanged() {
for (TCFNode n : getNodes()) ((TCFNodeStackFrame)n).onRegistersChanged();
reset();
@@ -66,6 +62,10 @@ public class TCFChildrenStackTrace extends TCFChildren {
reset(null);
}
+ void postAllChangedDelta() {
+ for (TCFNode n : getNodes()) ((TCFNodeStackFrame)n).postAllChangedDelta();
+ }
+
public TCFNodeStackFrame getTopFrame() {
assert isValid();
return (TCFNodeStackFrame)node.model.getNode(top_frame_id);
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
index 8949bc8d0..bc7fc4f2d 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
@@ -1025,6 +1025,15 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
}
}
+ private void postAllAndParentsChangedDelta() {
+ postContentChangedDelta();
+ TCFNode n = this;
+ while (n instanceof TCFNodeExecContext) {
+ ((TCFNodeExecContext)n).postStateChangedDelta();
+ n = n.parent;
+ }
+ }
+
private void postStateChangedDelta() {
for (TCFModelProxy p : model.getModelProxies()) {
if (IDebugUIConstants.ID_DEBUG_VIEW.equals(p.getPresentationContext().getId())) {
@@ -1117,23 +1126,30 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
}
address.reset();
signal_mask.reset();
- if (resume_pending && model.getActiveAction(id) == null) {
- resumed_cnt++;
- resume_pending = false;
- resumed_by_action = false;
- }
children_stack.onSuspended();
children_regs.onSuspended();
children_exps.onSuspended();
children_hover_exps.onSuspended();
for (TCFNodeSymbol s : symbols.values()) s.onExeStateChange();
if (model.getActiveAction(id) == null) {
- TCFNode n = this;
- while (n instanceof TCFNodeExecContext) {
- ((TCFNodeExecContext)n).postStateChangedDelta();
- n = n.parent;
+ resumed_cnt++;
+ resume_pending = false;
+ resumed_by_action = false;
+ if (pc != null) {
+ children_stack.postAllChangedDelta();
+ postAllAndParentsChangedDelta();
+ }
+ else {
+ final int cnt = ++resumed_cnt;
+ Protocol.invokeLater(500, new Runnable() {
+ public void run() {
+ if (cnt != resumed_cnt) return;
+ if (isDisposed()) return;
+ children_stack.postAllChangedDelta();
+ postAllAndParentsChangedDelta();
+ }
+ });
}
- postContentChangedDelta();
}
}
@@ -1152,12 +1168,7 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
children_stack.onResumed();
resume_pending = false;
resumed_by_action = false;
- postContentChangedDelta();
- TCFNode n = TCFNodeExecContext.this;
- while (n instanceof TCFNodeExecContext) {
- ((TCFNodeExecContext)n).postStateChangedDelta();
- n = n.parent;
- }
+ postAllAndParentsChangedDelta();
}
});
}
@@ -1170,7 +1181,7 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
resumed_by_action = false;
}
postAllChangedDelta();
- children_stack.onContextActionDone();
+ children_stack.postAllChangedDelta();
}
void onContextException(String msg) {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java
index 7e0f8ac1b..0a6ac5882 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java
@@ -391,7 +391,7 @@ public class TCFNodeStackFrame extends TCFNode {
return "0x0000000000000000".substring(0, 2 + l) + s;
}
- private void postAllChangedDelta() {
+ void postAllChangedDelta() {
for (TCFModelProxy p : model.getModelProxies()) {
int flags = 0;
String id = p.getPresentationContext().getId();
@@ -431,11 +431,7 @@ public class TCFNodeStackFrame extends TCFNode {
children_vars.onSuspended();
children_exps.onSuspended();
children_hover_exps.onSuspended();
- if (model.getActiveAction(parent.id) == null) postAllChangedDelta();
- }
-
- void onContextActionDone() {
- postAllChangedDelta();
+ // delta is posted by the parent node
}
void onMemoryMapChanged() {

Back to the top