1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bugzilla 201996

This commit is contained in:
Randy Rohrbach 2007-09-02 04:07:54 +00:00
parent f09b8034f8
commit be0f1bcf2c
2 changed files with 58 additions and 17 deletions

View file

@ -398,20 +398,42 @@ public class RegisterBitFieldLayoutNode extends AbstractExpressionLayoutNode<IBi
@Override @Override
protected int getNodeDeltaFlagsForDMEvent(IDMEvent<?> e) { protected int getNodeDeltaFlagsForDMEvent(IDMEvent<?> e) {
if (e instanceof IRunControl.ISuspendedDMEvent) { // In theory we want each node to act independently in terms of events. It might be
return IModelDelta.CONTENT; // the case that we would only have elements of this type at the root level. It is
} else if (e instanceof IRegisters.IBitFieldChangedDMEvent) { // 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.STATE;
} }
return IModelDelta.NO_CHANGE; return IModelDelta.NO_CHANGE;
} }
@Override @Override
protected void buildDeltaForDMEvent(IDMEvent<?> e, VMDelta parent, int nodeOffset, RequestMonitor rm) { protected void buildDeltaForDMEvent(IDMEvent<?> e, VMDelta parent, int nodeOffset, RequestMonitor rm) {
if (e instanceof IRunControl.ISuspendedDMEvent) { // In theory we want each node to act independently in terms of events. It might be
// Create a delta that the whole register group has changed. // the case that we would only have elements of this type at the root level. It is
parent.addFlags(IModelDelta.CONTENT); // 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) { if (e instanceof IRegisters.IBitFieldChangedDMEvent) {
/* /*
* Flush the cache. * Flush the cache.

View file

@ -400,10 +400,20 @@ public class RegisterLayoutNode extends AbstractExpressionLayoutNode<IRegisterDM
@Override @Override
protected int getNodeDeltaFlagsForDMEvent(IDMEvent<?> e) { protected int getNodeDeltaFlagsForDMEvent(IDMEvent<?> e) {
if (e instanceof IRunControl.ISuspendedDMEvent) { // In theory we want each node to act independently in terms of events. It might be
return IModelDelta.CONTENT; // 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
else if (e instanceof IRegisters.IRegistersChangedDMEvent) { // 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. * Flush the cache.
*/ */
@ -411,7 +421,8 @@ public class RegisterLayoutNode extends AbstractExpressionLayoutNode<IRegisterDM
return IModelDelta.CONTENT; return IModelDelta.CONTENT;
} }
else if (e instanceof IRegisters.IRegisterChangedDMEvent) {
if (e instanceof IRegisters.IRegisterChangedDMEvent) {
/* /*
* Flush the cache. * Flush the cache.
*/ */
@ -429,11 +440,19 @@ public class RegisterLayoutNode extends AbstractExpressionLayoutNode<IRegisterDM
@Override @Override
protected void buildDeltaForDMEvent(IDMEvent<?> e, VMDelta parent, int nodeOffset, RequestMonitor rm) { protected void buildDeltaForDMEvent(IDMEvent<?> e, VMDelta parent, int nodeOffset, RequestMonitor rm) {
// In theory we want each node to act independently in terms of events. It might be
if (e instanceof IRunControl.ISuspendedDMEvent) { // the case that we would only have elements of this type at the root level. It is
// Create a delta that the whole register group has changed. // the case that the current layout model always starts with the GROUPS followed by
parent.addFlags(IModelDelta.CONTENT); // 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) { if (e instanceof IRegisters.IRegistersChangedDMEvent) {
parent.addFlags(IModelDelta.CONTENT);; parent.addFlags(IModelDelta.CONTENT);;