public interface IFormattingContext
IFormattingStrategyExtension.IFormattingStrategyExtension| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Dispose of the formatting context.
|
String[] |
getPreferenceKeys()
Returns the preference keys used for the retrieval of formatting
preferences.
|
Object |
getProperty(Object key)
Retrieves the property
key from the formatting context |
boolean |
isBooleanPreference(String key)
Is this preference key for a boolean preference?
|
boolean |
isDoublePreference(String key)
Is this preference key for a double preference?
|
boolean |
isFloatPreference(String key)
Is this preference key for a float preference?
|
boolean |
isIntegerPreference(String key)
Is this preference key for an integer preference?
|
boolean |
isLongPreference(String key)
Is this preference key for a long preference?
|
boolean |
isStringPreference(String key)
Is this preference key for a string preference?
|
void |
mapToStore(Map map,
IPreferenceStore store)
Stores the preferences from a map to a preference store.
|
void |
setProperty(Object key,
Object property)
Stores the property
key in the formatting context. |
void |
storeToMap(IPreferenceStore store,
Map map,
boolean useDefault)
Retrieves the preferences from a preference store in a map.
|
void dispose()
Must be called after the formatting context has been used in a formatting process.
String[] getPreferenceKeys()
Object getProperty(Object key)
key from the formatting contextkey - Key of the property to store in the contextkey if available, null
otherwiseboolean isBooleanPreference(String key)
key - The preference key to query its typetrue iff this key is for a boolean preference,
false otherwise.boolean isDoublePreference(String key)
key - The preference key to query its typetrue iff this key is for a double preference,
false otherwise.boolean isFloatPreference(String key)
key - The preference key to query its typetrue iff this key is for a float preference,
false otherwise.boolean isIntegerPreference(String key)
key - The preference key to query its typetrue iff this key is for an integer preference,
false otherwise.boolean isLongPreference(String key)
key - The preference key to query its typetrue iff this key is for a long preference,
false otherwise.boolean isStringPreference(String key)
key - The preference key to query its typetrue iff this key is for a string preference,
false otherwise.void mapToStore(Map map, IPreferenceStore store)
Note that the preference keys returned by
getPreferenceKeys() must not be used in the preference store.
Otherwise the preferences are overwritten.
map - Map to retrieve the preferences fromstore - Preference store to store the preferences invoid setProperty(Object key, Object property)
key in the formatting context.key - Key of the property to store in the contextproperty - Property to store in the context. If already present, the new
property overwrites the present one.void storeToMap(IPreferenceStore store, Map map, boolean useDefault)
Note that the preference keys returned by
getPreferenceKeys() must not be used in the map. Otherwise the
preferences are overwritten.
store - Preference store to retrieve the preferences frommap - Map to store the preferences inuseDefault - true if the default preferences should be
used, false otherwiseGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.