From 7d9261861d96a6e7973fb2f364067438ec647d6b Mon Sep 17 00:00:00 2001 From: Randy Rohrbach Date: Thu, 12 Jul 2007 20:47:39 +0000 Subject: [PATCH] Bugzilla 196336 RegisterBitFieldLayoutNode.java RegisterGroupLayoutNode.java RegisterLayoutNode.java VariableLocalsLayoutNode.java Bugzilla 196373 VariableLocalsLayoutNode.java Bugzilla 196381 VariableSubExpressionsLayoutNode.java Also removed odds and ends comments and warnings in these files - general cleanup. --- .../register/RegisterBitFieldLayoutNode.java | 2 +- .../register/RegisterGroupLayoutNode.java | 9 ++++++ .../register/RegisterLayoutNode.java | 2 +- .../variable/VariableLocalsLayoutNode.java | 17 ++++++----- .../VariableSubExpressionsLayoutNode.java | 29 +++++++++++++------ 5 files changed, 40 insertions(+), 19 deletions(-) diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterBitFieldLayoutNode.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterBitFieldLayoutNode.java index ff4fbcac72e..ff4e6c98588 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterBitFieldLayoutNode.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterBitFieldLayoutNode.java @@ -313,7 +313,7 @@ public class RegisterBitFieldLayoutNode extends AbstractExpressionLayoutNode e) { if (e instanceof IRunControl.ISuspendedDMEvent) { return IModelDelta.CONTENT; - // } else if (e instanceof IRegisters.IRegisterChangedDMEvent) { - // return IModelDelta.STATE; } + return IModelDelta.NO_CHANGE; } @@ -453,11 +458,7 @@ public class VariableLocalsLayoutNode extends AbstractExpressionLayoutNode { + @SuppressWarnings("unused") private SyncVariableDataAccess fSyncVariableDataAccess; public VariableSubExpressionsLayoutNode(AbstractVMProvider provider, DsfSession session, SyncVariableDataAccess syncVariableDataAccess) { @@ -59,7 +60,6 @@ public class VariableSubExpressionsLayoutNode extends AbstractDMVMLayoutNode e) { if (e instanceof IRunControl.ISuspendedDMEvent) { return IModelDelta.CONTENT; -// } else if (e instanceof IRegisters.IExpressionsChangedDMEvent) { -// return IModelDelta.STATE; } + else if (e instanceof IExpressions.IExpressionChangedDMEvent) { + /* + * Flush the cache. + */ + VMCacheManager.getVMCacheManager().flush(super.getVMProvider().getPresentationContext()); + + /* + * Logically one would think that STATE should be specified here. But we specifiy CONTENT + * as well so that if there sub expressions which are affected in some way ( such as with + * an expanded union then they will show the changes also. + */ + return IModelDelta.CONTENT | IModelDelta.STATE; + } + return IModelDelta.NO_CHANGE; } @@ -299,9 +309,10 @@ public class VariableSubExpressionsLayoutNode extends AbstractDMVMLayoutNode