From be0f1bcf2cad7d37319de3f0846e45d2dec81965 Mon Sep 17 00:00:00 2001 From: Randy Rohrbach Date: Sun, 2 Sep 2007 04:07:54 +0000 Subject: [PATCH] Bugzilla 201996 --- .../register/RegisterBitFieldLayoutNode.java | 36 +++++++++++++---- .../register/RegisterLayoutNode.java | 39 ++++++++++++++----- 2 files changed, 58 insertions(+), 17 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 34d3095e54d..ee413c11160 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 @@ -398,20 +398,42 @@ public class RegisterBitFieldLayoutNode extends AbstractExpressionLayoutNode e) { - if (e instanceof IRunControl.ISuspendedDMEvent) { - return IModelDelta.CONTENT; - } else if (e instanceof IRegisters.IBitFieldChangedDMEvent) { + // In theory we want each node to act independently in terms of events. It might be + // the case that we would only have elements of this type at the root level. It is + // the case that the current layout model always starts with the GROUPS followed by + // REGISTERS followed by BITFIELDS. But if we do this when a run-control event has + // occured we generate a DELTA for every element, which can create a massive list + // of entries all of which say update the entire view. So for now we will just have + // the GROUP LAYOUT node do this. Later we need to revisit the logic and make sure + // there is a way for the nodes to operate independently and efficiently. + // + //if (e instanceof IRunControl.ISuspendedDMEvent) { + // return IModelDelta.CONTENT; + //} + + if (e instanceof IRegisters.IBitFieldChangedDMEvent) { return IModelDelta.STATE; } + return IModelDelta.NO_CHANGE; } @Override protected void buildDeltaForDMEvent(IDMEvent e, VMDelta parent, int nodeOffset, RequestMonitor rm) { - if (e instanceof IRunControl.ISuspendedDMEvent) { - // Create a delta that the whole register group has changed. - parent.addFlags(IModelDelta.CONTENT); - } + // In theory we want each node to act independently in terms of events. It might be + // the case that we would only have elements of this type at the root level. It is + // the case that the current layout model always starts with the GROUPS followed by + // REGISTERS followed by BITFIELDS. But if we do this when a run-control event has + // occured we generate a DELTA for every element, which can create a massive list + // of entries all of which say update the entire view. So for now we will just have + // the GROUP LAYOUT node do this. Later we need to revisit the logic and make sure + // there is a way for the nodes to operate independently and efficiently. + // + // if (e instanceof IRunControl.ISuspendedDMEvent) { + // // Create a delta that the whole register group has changed. + // parent.addFlags(IModelDelta.CONTENT); + // } + if (e instanceof IRegisters.IBitFieldChangedDMEvent) { /* * Flush the cache. diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterLayoutNode.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterLayoutNode.java index 2d8e4e33b37..5c93622eaa4 100644 --- a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterLayoutNode.java +++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/register/RegisterLayoutNode.java @@ -400,10 +400,20 @@ public class RegisterLayoutNode extends AbstractExpressionLayoutNode e) { - if (e instanceof IRunControl.ISuspendedDMEvent) { - return IModelDelta.CONTENT; - } - else if (e instanceof IRegisters.IRegistersChangedDMEvent) { + // In theory we want each node to act independently in terms of events. It might be + // the case that we would only have elements of this type at the root level. It is + // the case that the current layout model always starts with the GROUPS followed by + // REGISTERS followed by BITFIELDS. But if we do this when a run-control event has + // occured we generate a DELTA for every element, which can create a massive list + // of entries all of which say update the entire view. So for now we will just have + // the GROUP LAYOUT node do this. Later we need to revisit the logic and make sure + // there is a way for the nodes to operate independently and efficiently. + // + // if (e instanceof IRunControl.ISuspendedDMEvent) { + // return IModelDelta.CONTENT; + // } + + if (e instanceof IRegisters.IRegistersChangedDMEvent) { /* * Flush the cache. */ @@ -411,7 +421,8 @@ public class RegisterLayoutNode extends AbstractExpressionLayoutNode e, VMDelta parent, int nodeOffset, RequestMonitor rm) { - - if (e instanceof IRunControl.ISuspendedDMEvent) { - // Create a delta that the whole register group has changed. - parent.addFlags(IModelDelta.CONTENT); - } + // In theory we want each node to act independently in terms of events. It might be + // the case that we would only have elements of this type at the root level. It is + // the case that the current layout model always starts with the GROUPS followed by + // REGISTERS followed by BITFIELDS. But if we do this when a run-control event has + // occured we generate a DELTA for every element, which can create a massive list + // of entries all of which say update the entire view. So for now we will just have + // the GROUP LAYOUT node do this. Later we need to revisit the logic and make sure + // there is a way for the nodes to operate independently and efficiently. + // + // if (e instanceof IRunControl.ISuspendedDMEvent) { + // // Create a delta that the whole register group has changed. + // parent.addFlags(IModelDelta.CONTENT); + // } if (e instanceof IRegisters.IRegistersChangedDMEvent) { parent.addFlags(IModelDelta.CONTENT);;