mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 400840 - Update 'Registers' view values when modified.
Change-Id: I9539496e4a368721b0bb9b34789461cbd8167f6e Reviewed-on: https://git.eclipse.org/r/13084 Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com> IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com> Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
parent
ef7967342a
commit
f116c7235d
1 changed files with 19 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
|||
* Contributors:
|
||||
* Wind River Systems - initial API and implementation
|
||||
* Ericsson - Modified for additional features in DSF Reference Implementation
|
||||
* Roland Grunberg (RedHat) - Refresh all registers once one is changed (Bug 400840)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.dsf.mi.service;
|
||||
|
||||
|
@ -449,8 +450,25 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach
|
|||
fRegisterValueCache.reset();
|
||||
}
|
||||
|
||||
private void generateRegisterChangedEvent(IRegisterDMContext dmc ) {
|
||||
private void generateRegisterChangedEvent(final IRegisterDMContext dmc ) {
|
||||
getSession().dispatchEvent(new RegisterChangedDMEvent(dmc), getProperties());
|
||||
|
||||
// Temporary fix for Bug 400840
|
||||
// When one register is modified, it could affect other registers.
|
||||
// To properly reflect that, we send a change for all registers.
|
||||
// We cheat since we know there is currently only one group. Once we handle
|
||||
// more groups, this may not work properly.
|
||||
final IRegisterGroupDMContext groupDmc = DMContexts.getAncestorOfType(dmc, IRegisterGroupDMContext.class);
|
||||
if (groupDmc != null) {
|
||||
IRegistersChangedDMEvent event = new IRegistersChangedDMEvent() {
|
||||
@Override
|
||||
public IRegisterGroupDMContext getDMContext() {
|
||||
return groupDmc;
|
||||
}
|
||||
};
|
||||
getSession().dispatchEvent(event, getProperties());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue