| org.eclipse.ui.preferences.ScopedPreferenceStore
ScopedPreferenceStore | public class ScopedPreferenceStore extends EventManager implements IPreferenceStore,IPersistentPreferenceStore(Code) | | The ScopedPreferenceStore is an IPreferenceStore that uses the scopes
provided in org.eclipse.core.runtime.preferences.
A ScopedPreferenceStore does the lookup of a preference based on it's search
scopes and sets the value of the preference based on its store scope.
The default scope is always included in the search scopes when searching for
preference values.
See Also: org.eclipse.core.runtime.preferences since: 3.1 |
Field Summary | |
String | defaultQualifier The defaultQualifier is the string used to look up the default node. | String | nodeQualifier The nodeQualifer is the string used to look up the node in the contexts. | IEclipsePreferences.IPreferenceChangeListener | preferencesListener The listener on the IEclipsePreferences. | protected boolean | silentRunning A boolean to indicate the property changes should not be propagated. |
Method Summary | |
public void | addPropertyChangeListener(IPropertyChangeListener listener) | public boolean | contains(String name) | public void | firePropertyChangeEvent(String name, Object oldValue, Object newValue) | public boolean | getBoolean(String name) | Object | getDefault(String key, Object obj) Does its best at determining the default value for the given key. | public boolean | getDefaultBoolean(String name) | public double | getDefaultDouble(String name) | public float | getDefaultFloat(String name) | public int | getDefaultInt(String name) | public long | getDefaultLong(String name) | public String | getDefaultString(String name) | public double | getDouble(String name) | public float | getFloat(String name) | public int | getInt(String name) | public long | getLong(String name) | IEclipsePreferences | getStorePreferences() Return the IEclipsePreferences node associated with this store. | public String | getString(String name) | public boolean | isDefault(String name) | public boolean | needsSaving() | public void | putValue(String name, String value) | public void | removePropertyChangeListener(IPropertyChangeListener listener) | public void | save() | public void | setDefault(String name, double value) | public void | setDefault(String name, float value) | public void | setDefault(String name, int value) | public void | setDefault(String name, long value) | public void | setDefault(String name, String defaultObject) | public void | setDefault(String name, boolean value) | public void | setSearchContexts(IScopeContext[] scopes) Set the search contexts to scopes. | public void | setToDefault(String name) | public void | setValue(String name, double value) | public void | setValue(String name, float value) | public void | setValue(String name, int value) | public void | setValue(String name, long value) | public void | setValue(String name, String value) | public void | setValue(String name, boolean value) |
defaultQualifier | String defaultQualifier(Code) | | The defaultQualifier is the string used to look up the default node.
|
nodeQualifier | String nodeQualifier(Code) | | The nodeQualifer is the string used to look up the node in the contexts.
|
preferencesListener | IEclipsePreferences.IPreferenceChangeListener preferencesListener(Code) | | The listener on the IEclipsePreferences. This is used to forward updates
to the property change listeners on the preference store.
|
silentRunning | protected boolean silentRunning(Code) | | A boolean to indicate the property changes should not be propagated.
|
ScopedPreferenceStore | public ScopedPreferenceStore(IScopeContext context, String qualifier, String defaultQualifierPath)(Code) | | Create a new instance of the receiver. Store the values in context in the
node looked up by qualifier. NOTE: Any instance of
ScopedPreferenceStore should call
Parameters: context - the scope to store to Parameters: qualifier - the qualifier used to look up the preference node Parameters: defaultQualifierPath - the qualifier used when looking up the defaults |
ScopedPreferenceStore | public ScopedPreferenceStore(IScopeContext context, String qualifier)(Code) | | Create a new instance of the receiver. Store the values in context in the
node looked up by qualifier.
Parameters: context - the scope to store to Parameters: qualifier - the qualifer used to look up the preference node |
addPropertyChangeListener | public void addPropertyChangeListener(IPropertyChangeListener listener)(Code) | | |
getDefault | Object getDefault(String key, Object obj)(Code) | | Does its best at determining the default value for the given key. Checks
the given object's type and then looks in the list of defaults to see if
a value exists. If not or if there is a problem converting the value, the
default default value for that type is returned.
Parameters: key - the key to search Parameters: obj - the object who default we are looking for Object or null |
getDefaultBoolean | public boolean getDefaultBoolean(String name)(Code) | | |
getDefaultDouble | public double getDefaultDouble(String name)(Code) | | |
getDefaultFloat | public float getDefaultFloat(String name)(Code) | | |
getStorePreferences | IEclipsePreferences getStorePreferences()(Code) | | Return the IEclipsePreferences node associated with this store.
the preference node for this store |
needsSaving | public boolean needsSaving()(Code) | | |
removePropertyChangeListener | public void removePropertyChangeListener(IPropertyChangeListener listener)(Code) | | |
setDefault | public void setDefault(String name, double value)(Code) | | |
setDefault | public void setDefault(String name, float value)(Code) | | |
setDefault | public void setDefault(String name, int value)(Code) | | |
setDefault | public void setDefault(String name, long value)(Code) | | |
setDefault | public void setDefault(String name, boolean value)(Code) | | |
setSearchContexts | public void setSearchContexts(IScopeContext[] scopes)(Code) | | Set the search contexts to scopes. When searching for a value the seach
will be done in the order of scope contexts and will not search the
storeContext unless it is in this list.
If the given list is null , then clear this store's search
contexts. This means that only this store's scope context and default
scope will be used during preference value searching.
The defaultContext will be added to the end of this list automatically
and MUST NOT be included by the user.
Parameters: scopes - a list of scope contexts to use when searching, ornull |
setValue | public void setValue(String name, double value)(Code) | | |
setValue | public void setValue(String name, float value)(Code) | | |
setValue | public void setValue(String name, boolean value)(Code) | | |
|
|