mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bugzilla 195291
Added GroupEvent changed for values as opposed to contents in IRegisters.java and changed the Group and Register layout nodes to properly deal with all of the defined events.
This commit is contained in:
parent
6a33c3118c
commit
85c4ae5f24
3 changed files with 35 additions and 7 deletions
|
@ -20,6 +20,7 @@ import org.eclipse.dd.dsf.datamodel.IDMContext;
|
|||
import org.eclipse.dd.dsf.datamodel.IDMEvent;
|
||||
import org.eclipse.dd.dsf.debug.service.IRegisters;
|
||||
import org.eclipse.dd.dsf.debug.service.IRunControl;
|
||||
import org.eclipse.dd.dsf.debug.service.IRegisters.IGroupChangedDMEvent;
|
||||
import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterGroupDMContext;
|
||||
import org.eclipse.dd.dsf.debug.service.IRegisters.IRegisterGroupDMData;
|
||||
import org.eclipse.dd.dsf.debug.service.IRunControl.IExecutionDMContext;
|
||||
|
@ -204,21 +205,30 @@ public class RegisterGroupLayoutNode extends AbstractExpressionLayoutNode<IRegis
|
|||
protected int getNodeDeltaFlagsForDMEvent(IDMEvent<?> e) {
|
||||
if (e instanceof IRunControl.ISuspendedDMEvent) {
|
||||
return IModelDelta.CONTENT;
|
||||
}else if (e instanceof IRegisters.IRegistersChangedDMEvent) {
|
||||
}
|
||||
else if (e instanceof IRegisters.IGroupsChangedDMEvent) {
|
||||
return IModelDelta.CONTENT;
|
||||
}
|
||||
else if (e instanceof IRegisters.IGroupChangedDMEvent) {
|
||||
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.
|
||||
// Create a delta that indicates all groups have changed
|
||||
parent.addFlags(IModelDelta.CONTENT);
|
||||
}
|
||||
if (e instanceof IRegisters.IRegistersChangedDMEvent) {
|
||||
parent.addNode( createVMContext(((IRegisters.IRegistersChangedDMEvent)e).getDMContext()), IModelDelta.STATE );
|
||||
else if (e instanceof IRegisters.IGroupsChangedDMEvent) {
|
||||
// Create a delta that indicates all groups have changed
|
||||
parent.addFlags(IModelDelta.CONTENT);
|
||||
}
|
||||
else if (e instanceof IRegisters.IGroupChangedDMEvent) {
|
||||
// Create a delta that indicates that specific group changed
|
||||
parent.addNode( createVMContext(((IGroupChangedDMEvent)e).getDMContext()), IModelDelta.STATE );
|
||||
}
|
||||
|
||||
super.buildDeltaForDMEvent(e, parent, nodeOffset, rm);
|
||||
}
|
||||
|
|
|
@ -386,20 +386,35 @@ public class RegisterLayoutNode extends AbstractExpressionLayoutNode<IRegisterDM
|
|||
protected int getNodeDeltaFlagsForDMEvent(IDMEvent<?> e) {
|
||||
if (e instanceof IRunControl.ISuspendedDMEvent) {
|
||||
return IModelDelta.CONTENT;
|
||||
} else if (e instanceof IRegisters.IRegisterChangedDMEvent) {
|
||||
return IModelDelta.STATE;
|
||||
}
|
||||
else if (e instanceof IRegisters.IRegistersChangedDMEvent) {
|
||||
return IModelDelta.CONTENT;
|
||||
}
|
||||
else if (e instanceof IRegisters.IRegisterChangedDMEvent) {
|
||||
/*
|
||||
* Logically one would think that STATE should be specified here. But we specifiy CONTENT
|
||||
* as well so that if there are subregisters ( BIT FIELDS ) they will be forced to update
|
||||
* and show new values when the total register changes.
|
||||
*/
|
||||
return IModelDelta.CONTENT | 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);
|
||||
}
|
||||
|
||||
if (e instanceof IRegisters.IRegistersChangedDMEvent) {
|
||||
parent.addFlags(IModelDelta.CONTENT);;
|
||||
}
|
||||
|
||||
if (e instanceof IRegisters.IRegisterChangedDMEvent) {
|
||||
parent.addNode( createVMContext(((IRegisterChangedDMEvent)e).getDMContext()), IModelDelta.STATE );
|
||||
parent.addNode( createVMContext(((IRegisterChangedDMEvent)e).getDMContext()), IModelDelta.CONTENT | IModelDelta.STATE );
|
||||
}
|
||||
|
||||
super.buildDeltaForDMEvent(e, parent, nodeOffset, rm);
|
||||
|
|
|
@ -29,6 +29,9 @@ public interface IRegisters extends IFormattedValues {
|
|||
public String getName();
|
||||
}
|
||||
|
||||
/** Event indicating values for the group have changed. */
|
||||
public interface IGroupChangedDMEvent extends IDMEvent<IRegisterGroupDMContext> {}
|
||||
|
||||
/** Event indicating registers in a group have changed. */
|
||||
public interface IRegistersChangedDMEvent extends IDMEvent<IRegisterGroupDMContext> {}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue