1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00
Bugzilla 198422.
This commit is contained in:
Randy Rohrbach 2007-07-31 15:48:37 +00:00
parent ac6017aeb9
commit 1c13dd4b56

View file

@ -328,21 +328,27 @@ public class DetailPane implements IDetailPane, IAdaptable, IPropertyChangeListe
*
* So here we specifically look for the service which knows how to deal
* 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());
IRegisterDMContext regDmc = DMContexts.getAncestorOfType(((DMVMContext) element).getDMC(), IRegisterDMContext.class);
if ( regDmc != null ) {
dmc = regDmc ;
IBitFieldDMContext bitfieldDmc = DMContexts.getAncestorOfType(((DMVMContext) element).getDMC(), IBitFieldDMContext.class);
if ( bitfieldDmc != null ) {
dmc = bitfieldDmc ;
service = tracker.getService(IRegisters.class);
}
else {
IBitFieldDMContext bitfieldDmc = DMContexts.getAncestorOfType(((DMVMContext) element).getDMC(), IBitFieldDMContext.class);
IRegisterDMContext regDmc = DMContexts.getAncestorOfType(((DMVMContext) element).getDMC(), IRegisterDMContext.class);
if ( bitfieldDmc != null ) {
dmc = bitfieldDmc ;
if ( regDmc != null ) {
dmc = regDmc ;
service = tracker.getService(IRegisters.class);
}
else {