mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 12:03:16 +02:00
Fix for bug 206931 which cleans up IFormattedValues
This commit is contained in:
parent
732160a2a5
commit
4e553d3250
8 changed files with 23 additions and 26 deletions
|
@ -402,7 +402,7 @@ public class DetailPane implements IDetailPane, IAdaptable, IPropertyChangeListe
|
|||
/*
|
||||
* Format has been validated. Get the formatted value.
|
||||
*/
|
||||
final FormattedValueDMContext valueDmc = finalService.getFormattedValue(finalDmc, str);
|
||||
final FormattedValueDMContext valueDmc = finalService.getFormattedValueContext(finalDmc, str);
|
||||
finalService.getModelData(
|
||||
valueDmc,
|
||||
new DataRequestMonitor<FormattedValueDMData>(finalService.getSession().getExecutor(), null) {
|
||||
|
@ -443,7 +443,7 @@ public class DetailPane implements IDetailPane, IAdaptable, IPropertyChangeListe
|
|||
*/
|
||||
finalService.getExecutor().submit(new Runnable() {
|
||||
public void run() {
|
||||
finalService.getAvailableFormattedValues(finalDmc, getAvailableFormatsDone);
|
||||
finalService.getAvailableFormats(finalDmc, getAvailableFormatsDone);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
@ -188,7 +188,7 @@ public class RegisterBitFieldLayoutNode extends AbstractExpressionLayoutNode<IBi
|
|||
final IPresentationContext context = update.getPresentationContext();
|
||||
final String preferencePageFormatId = fFormattedPrefStore.getCurrentNumericFormat(context) ;
|
||||
|
||||
regService.getAvailableFormattedValues(
|
||||
regService.getAvailableFormats(
|
||||
dmc,
|
||||
new DataRequestMonitor<String[]>(getSession().getExecutor(), null) {
|
||||
@Override
|
||||
|
@ -236,7 +236,7 @@ public class RegisterBitFieldLayoutNode extends AbstractExpressionLayoutNode<IBi
|
|||
/*
|
||||
* Format has been validated. Get the formatted value.
|
||||
*/
|
||||
FormattedValueDMContext valueDmc = regService.getFormattedValue(dmc, finalFormatId);
|
||||
FormattedValueDMContext valueDmc = regService.getFormattedValueContext(dmc, finalFormatId);
|
||||
|
||||
VMCacheManager.getVMCacheManager().getCache(update.getPresentationContext())
|
||||
.getModelData(regService,
|
||||
|
|
|
@ -187,7 +187,7 @@ public class RegisterLayoutNode extends AbstractExpressionLayoutNode<IRegisterDM
|
|||
final IPresentationContext context = update.getPresentationContext();
|
||||
final String preferencePageFormatId = fFormattedPrefStore.getCurrentNumericFormat(context) ;
|
||||
|
||||
regService.getAvailableFormattedValues(
|
||||
regService.getAvailableFormats(
|
||||
dmc,
|
||||
new DataRequestMonitor<String[]>(getSession().getExecutor(), null) {
|
||||
@Override
|
||||
|
@ -235,7 +235,7 @@ public class RegisterLayoutNode extends AbstractExpressionLayoutNode<IRegisterDM
|
|||
/*
|
||||
* Format has been validated. Get the formatted value.
|
||||
*/
|
||||
final FormattedValueDMContext valueDmc = regService.getFormattedValue(dmc, finalFormatId);
|
||||
final FormattedValueDMContext valueDmc = regService.getFormattedValueContext(dmc, finalFormatId);
|
||||
|
||||
VMCacheManager.getVMCacheManager().getCache( context ).getModelData(regService,
|
||||
valueDmc,
|
||||
|
|
|
@ -744,7 +744,7 @@ public class SyncRegisterDataAccess {
|
|||
/*
|
||||
* Write the bit field using a string/format style.
|
||||
*/
|
||||
service.getAvailableFormattedValues(
|
||||
service.getAvailableFormats(
|
||||
fDmc,
|
||||
new DataRequestMonitor<String[]>(session.getExecutor(), rm) {
|
||||
@Override
|
||||
|
@ -850,7 +850,7 @@ public class SyncRegisterDataAccess {
|
|||
* Convert to the proper formatting DMC then go get the formatted value.
|
||||
*/
|
||||
|
||||
FormattedValueDMContext formDmc = service.getFormattedValue(fDmc, fFormatId);
|
||||
FormattedValueDMContext formDmc = service.getFormattedValueContext(fDmc, fFormatId);
|
||||
|
||||
service.getModelData(formDmc, new DataRequestMonitor<FormattedValueDMData>( session.getExecutor(), rm) {
|
||||
@Override
|
||||
|
|
|
@ -323,7 +323,7 @@ public class SyncVariableDataAccess {
|
|||
/*
|
||||
* Write the bit field using a string/format style.
|
||||
*/
|
||||
service.getAvailableFormattedValues(
|
||||
service.getAvailableFormats(
|
||||
fDmc,
|
||||
new DataRequestMonitor<String[]>(session.getExecutor(), rm) {
|
||||
@Override
|
||||
|
@ -423,7 +423,7 @@ public class SyncVariableDataAccess {
|
|||
* Convert to the proper formatting DMC then go get the formatted value.
|
||||
*/
|
||||
|
||||
FormattedValueDMContext formDmc = service.getFormattedValue(fDmc, fFormatId);
|
||||
FormattedValueDMContext formDmc = service.getFormattedValueContext(fDmc, fFormatId);
|
||||
|
||||
service.getModelData(formDmc, new DataRequestMonitor<FormattedValueDMData>(session.getExecutor(), rm) {
|
||||
@Override
|
||||
|
|
|
@ -327,7 +327,7 @@ public class VariableLayoutNode extends AbstractExpressionLayoutNode<IExpression
|
|||
final IPresentationContext context = update.getPresentationContext();
|
||||
final String preferencePageFormatId = fFormattedPrefStore.getCurrentNumericFormat(context) ;
|
||||
|
||||
expressionService.getAvailableFormattedValues(
|
||||
expressionService.getAvailableFormats(
|
||||
dmc,
|
||||
new DataRequestMonitor<String[]>(getSession().getExecutor(), null) {
|
||||
@Override
|
||||
|
@ -373,7 +373,7 @@ public class VariableLayoutNode extends AbstractExpressionLayoutNode<IExpression
|
|||
/*
|
||||
* Format has been validated. Get the formatted value.
|
||||
*/
|
||||
final FormattedValueDMContext valueDmc = expressionService.getFormattedValue(dmc, finalFormatId);
|
||||
final FormattedValueDMContext valueDmc = expressionService.getFormattedValueContext(dmc, finalFormatId);
|
||||
|
||||
VMCacheManager.getVMCacheManager().getCache(update.getPresentationContext())
|
||||
.getModelData(expressionService,
|
||||
|
|
|
@ -309,7 +309,7 @@ public class DsfMemoryBlockRetrieval extends PlatformObject implements IMemoryBl
|
|||
protected void handleOK() {
|
||||
// Evaluate the expression - request HEX since it works in every case
|
||||
String formatId = IFormattedValues.HEX_FORMAT;
|
||||
FormattedValueDMContext valueDmc = expressionService.getFormattedValue(expressionDMC, formatId);
|
||||
FormattedValueDMContext valueDmc = expressionService.getFormattedValueContext(expressionDMC, formatId);
|
||||
expressionService.getModelData(
|
||||
valueDmc,
|
||||
new DataRequestMonitor<FormattedValueDMData>(getExecutor(), null) {
|
||||
|
|
|
@ -23,9 +23,9 @@ public interface IFormattedValues extends IDMService {
|
|||
public interface IFormattedDataDMContext<V extends IDMData> extends IDMContext<V> {}
|
||||
|
||||
/**
|
||||
* These strings represent the standard known formats for any bit stream
|
||||
* These strings represent the standard known formats for any bit stream
|
||||
* which needs to be formatted. These ID's as well as others which may be
|
||||
* specifically available from the backend are what is returned from the
|
||||
* specifically available from the backend are what is returned from the
|
||||
* getID() method.
|
||||
*/
|
||||
public final static String HEX_FORMAT = "HEX.Format" ; //$NON-NLS-1$
|
||||
|
@ -35,26 +35,23 @@ public interface IFormattedValues extends IDMService {
|
|||
public final static String DECIMAL_FORMAT = "DECIMAL.Format" ; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Retrieves the available formats that the given data is available in.
|
||||
* Retrieves the formats that the given data is available in.
|
||||
* This method is asynchronous because the service may need to retrieve
|
||||
* information from the back end in order to determine what formats are
|
||||
* information from the backend in order to determine what formats are
|
||||
* available for the given data context.
|
||||
*
|
||||
* @param dmc Context for which to retrieve available formatted values.
|
||||
* @param dmc Context for which to retrieve available formats.
|
||||
* @param rm Completion monitor returns an array of support formatIds.
|
||||
*/
|
||||
public void getAvailableFormattedValues(IFormattedDataDMContext<?> dmc, DataRequestMonitor<String[]> rm);
|
||||
public void getAvailableFormats(IFormattedDataDMContext<?> dmc, DataRequestMonitor<String[]> rm);
|
||||
|
||||
/**
|
||||
* Retrieves the available formats that the given data is available in.
|
||||
* This method is asynchronous because the service may need to retrieve
|
||||
* information from the back end in order to determine what formats are
|
||||
* available for the given data context.
|
||||
* Creates a FormattedValueDMContext representing the given formatId.
|
||||
*
|
||||
* @param dmc Context for which to retrieve a IValueDMContext.
|
||||
* @param formatId Defines format to be supplied from the returned context.
|
||||
* @param dmc Parent context for the context that is being created
|
||||
* @param formatId Defines format to be used for the returned context.
|
||||
*/
|
||||
public FormattedValueDMContext getFormattedValue(IFormattedDataDMContext<?> dmc, String formatId);
|
||||
public FormattedValueDMContext getFormattedValueContext(IFormattedDataDMContext<?> dmc, String formatId);
|
||||
|
||||
/**
|
||||
* DMC that represents a value with specific format. The format ID can be
|
||||
|
|
Loading…
Add table
Reference in a new issue