Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2010-11-24 19:21:18 +0000
committereutarass2010-11-24 19:21:18 +0000
commit5bb0f4c07d845151cc9bec1a000ce88a7f16994b (patch)
treef89fefdfe8e9e45f02088cd81a737750c485e7c8
parent8fcfd37151b777c10b51220bc75d78f9edea1ebf (diff)
downloadorg.eclipse.tcf-5bb0f4c07d845151cc9bec1a000ce88a7f16994b.tar.gz
org.eclipse.tcf-5bb0f4c07d845151cc9bec1a000ce88a7f16994b.tar.xz
org.eclipse.tcf-5bb0f4c07d845151cc9bec1a000ce88a7f16994b.zip
TCF Debug: added more code to filter out unneeded debug model deltas
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java11
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java32
2 files changed, 19 insertions, 24 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java
index ca4031ddc..6e21a56b1 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelProxy.java
@@ -25,10 +25,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ModelDelta;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.tm.internal.tcf.debug.model.TCFContextState;
import org.eclipse.tm.tcf.protocol.Protocol;
-import org.eclipse.tm.tcf.services.IRunControl;
-import org.eclipse.tm.tcf.util.TCFDataCache;
/**
* A model proxy represents a model for a specific presentation context and
@@ -348,14 +345,6 @@ public class TCFModelProxy extends AbstractModelProxy implements IModelProxy, Ru
last_update_time = System.currentTimeMillis();
while (!selection.isEmpty()) {
TCFNode node = selection.getFirst();
- String s = null;
- if (node instanceof TCFNodeExecContext) {
- TCFNodeExecContext exe = (TCFNodeExecContext)node;
- TCFDataCache<TCFContextState> cache = exe.getState();
- if (!cache.validate(this)) return;
- TCFContextState state = cache.getData();
- if (state != null) s = state.suspend_reason;
- }
node2flags.put(node, IModelDelta.SELECT);
root = new ModelDelta(input, IModelDelta.NO_CHANGE);
makeDelta(root, node, true);
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 0d8ab1fbb..9f1999bfd 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
@@ -631,32 +631,42 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
}
void postAllChangedDelta() {
- for (TCFModelProxy p : model.getModelProxies()) {
- p.addDelta(this, IModelDelta.STATE | IModelDelta.CONTENT);
- }
+ postContentChangedDelta();
+ postStateChangedDelta();
}
void postContextAddedDelta() {
for (TCFModelProxy p : model.getModelProxies()) {
- p.addDelta(this, IModelDelta.ADDED);
+ if (IDebugUIConstants.ID_DEBUG_VIEW.equals(p.getPresentationContext().getId())) {
+ p.addDelta(this, IModelDelta.ADDED);
+ }
}
}
private void postContextRemovedDelta() {
for (TCFModelProxy p : model.getModelProxies()) {
- p.addDelta(this, IModelDelta.REMOVED);
+ if (IDebugUIConstants.ID_DEBUG_VIEW.equals(p.getPresentationContext().getId())) {
+ p.addDelta(this, IModelDelta.REMOVED);
+ }
}
}
private void postContentChangedDelta() {
for (TCFModelProxy p : model.getModelProxies()) {
- p.addDelta(this, IModelDelta.CONTENT);
+ String id = p.getPresentationContext().getId();
+ if (IDebugUIConstants.ID_DEBUG_VIEW.equals(id) ||
+ IDebugUIConstants.ID_REGISTER_VIEW.equals(id) ||
+ IDebugUIConstants.ID_EXPRESSION_VIEW.equals(id)) {
+ p.addDelta(this, IModelDelta.CONTENT);
+ }
}
}
private void postStateChangedDelta() {
for (TCFModelProxy p : model.getModelProxies()) {
- p.addDelta(this, IModelDelta.STATE);
+ if (IDebugUIConstants.ID_DEBUG_VIEW.equals(p.getPresentationContext().getId())) {
+ p.addDelta(this, IModelDelta.STATE);
+ }
}
}
@@ -715,12 +725,8 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
if (run_context.isValid()) {
IRunControl.RunControlContext ctx = run_context.getData();
if (ctx != null && !ctx.hasState()) return;
- onContextResumed();
- }
- else {
- state.reset();
- postAllChangedDelta();
}
+ onContextResumed();
}
void onContextSuspended(String pc, String reason, Map<String,Object> params) {
@@ -753,7 +759,7 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
postStateChangedDelta();
final int cnt = ++resumed_cnt;
resume_pending = true;
- Protocol.invokeLater(250, new Runnable() {
+ Protocol.invokeLater(400, new Runnable() {
public void run() {
if (cnt != resumed_cnt) return;
if (disposed) return;

Back to the top