mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bugzilla 198422.
This commit is contained in:
parent
ac6017aeb9
commit
1c13dd4b56
1 changed files with 13 additions and 7 deletions
|
@ -328,23 +328,29 @@ public class DetailPane implements IDetailPane, IAdaptable, IPropertyChangeListe
|
||||||
*
|
*
|
||||||
* So here we specifically look for the service which knows how to deal
|
* So here we specifically look for the service which knows how to deal
|
||||||
* with the formatted data.
|
* with the formatted data.
|
||||||
|
*
|
||||||
|
* Please note that the order or searching for the ancestor is important.
|
||||||
|
* A BitField Data Model Context will have a Register Data Model Context
|
||||||
|
* as its parent so if we search for a Register DMC first when we actually
|
||||||
|
* have a BitField DMC we will get the register and show the value of the
|
||||||
|
* register not the bit field.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DsfServicesTracker tracker = new DsfServicesTracker(DsfDebugUIPlugin.getBundleContext(), ((DMVMContext) element).getDMC().getSessionId());
|
DsfServicesTracker tracker = new DsfServicesTracker(DsfDebugUIPlugin.getBundleContext(), ((DMVMContext) element).getDMC().getSessionId());
|
||||||
|
|
||||||
IRegisterDMContext regDmc = DMContexts.getAncestorOfType(((DMVMContext) element).getDMC(), IRegisterDMContext.class);
|
|
||||||
|
|
||||||
if ( regDmc != null ) {
|
|
||||||
dmc = regDmc ;
|
|
||||||
service = tracker.getService(IRegisters.class);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
IBitFieldDMContext bitfieldDmc = DMContexts.getAncestorOfType(((DMVMContext) element).getDMC(), IBitFieldDMContext.class);
|
IBitFieldDMContext bitfieldDmc = DMContexts.getAncestorOfType(((DMVMContext) element).getDMC(), IBitFieldDMContext.class);
|
||||||
|
|
||||||
if ( bitfieldDmc != null ) {
|
if ( bitfieldDmc != null ) {
|
||||||
dmc = bitfieldDmc ;
|
dmc = bitfieldDmc ;
|
||||||
service = tracker.getService(IRegisters.class);
|
service = tracker.getService(IRegisters.class);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
IRegisterDMContext regDmc = DMContexts.getAncestorOfType(((DMVMContext) element).getDMC(), IRegisterDMContext.class);
|
||||||
|
|
||||||
|
if ( regDmc != null ) {
|
||||||
|
dmc = regDmc ;
|
||||||
|
service = tracker.getService(IRegisters.class);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
IExpressionDMContext exprDmc = DMContexts.getAncestorOfType(((DMVMContext) element).getDMC(), IExpressionDMContext.class);
|
IExpressionDMContext exprDmc = DMContexts.getAncestorOfType(((DMVMContext) element).getDMC(), IExpressionDMContext.class);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue