public class FormattingContext extends Object implements IFormattingContext
IFormattingContext.| Constructor and Description |
|---|
FormattingContext() |
| 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<Object,Object> 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<Object,Object> map,
boolean useDefault)
Retrieves the preferences from a preference store in a map.
|
public void dispose()
IFormattingContextMust be called after the formatting context has been used in a formatting process.
dispose in interface IFormattingContextpublic String[] getPreferenceKeys()
IFormattingContextgetPreferenceKeys in interface IFormattingContextpublic Object getProperty(Object key)
IFormattingContextkey from the formatting contextgetProperty in interface IFormattingContextkey - the key of the property to store in the context. Must be a String.key if available, null otherwisepublic boolean isBooleanPreference(String key)
IFormattingContextisBooleanPreference in interface IFormattingContextkey - the preference key to query its typetrue iff this key is for a boolean preference, false
otherwise.public boolean isDoublePreference(String key)
IFormattingContextisDoublePreference in interface IFormattingContextkey - the preference key to query its typetrue iff this key is for a double preference, false
otherwise.public boolean isFloatPreference(String key)
IFormattingContextisFloatPreference in interface IFormattingContextkey - The preference key to query its typetrue iff this key is for a float preference, false
otherwise.public boolean isIntegerPreference(String key)
IFormattingContextisIntegerPreference in interface IFormattingContextkey - The preference key to query its typetrue iff this key is for an integer preference, false
otherwise.public boolean isLongPreference(String key)
IFormattingContextisLongPreference in interface IFormattingContextkey - The preference key to query its typetrue iff this key is for a long preference, false
otherwise.public boolean isStringPreference(String key)
IFormattingContextisStringPreference in interface IFormattingContextkey - The preference key to query its typetrue iff this key is for a string preference, false
otherwise.public void mapToStore(Map<Object,Object> map, IPreferenceStore store)
IFormattingContext
Note that the preference keys returned by IFormattingContext.getPreferenceKeys() must not be used in
the preference store. Otherwise the preferences are overwritten.
mapToStore in interface IFormattingContextmap - Map to retrieve the preferences fromstore - Preference store to store the preferences inpublic void setProperty(Object key, Object property)
IFormattingContextkey in the formatting context.setProperty in interface IFormattingContextkey - Key of the property to store in the context. Must be a String.property - Property to store in the context. If already present, the new property
overwrites the present one.public void storeToMap(IPreferenceStore store, Map<Object,Object> map, boolean useDefault)
IFormattingContext
Note that the preference keys returned by IFormattingContext.getPreferenceKeys() must not be used in
the map. Otherwise the preferences are overwritten.
storeToMap in interface IFormattingContextstore - Preference store to retrieve the preferences frommap - Map to store the preferences inuseDefault - true if the default preferences should be used,
false otherwise
Copyright (c) 2000, 2017 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.