public class DefaultPreferences extends EclipsePreferences
IEclipsePreferences.INodeChangeListener, IEclipsePreferences.IPreferenceChangeListener, IEclipsePreferences.NodeChangeEvent, IEclipsePreferences.PreferenceChangeEvent| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
pluginCustomizationFile |
children, DEBUG_PREFERENCE_GENERAL, DEBUG_PREFERENCE_GET, DEBUG_PREFERENCE_SET, debugPluginName, DEFAULT_PREFERENCES_DIRNAME, dirty, DOUBLE_SLASH, EMPTY_NODE_ARRAY, EMPTY_STRING, EMPTY_STRING_ARRAY, loading, name, parent, PATH_SEPARATOR, PREFS_FILE_EXTENSION, properties, removed, VERSION_KEY, VERSION_VALUE| Constructor and Description |
|---|
DefaultPreferences()
Default constructor for this class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
Forces any changes in the contents of this node and its descendants to
the persistent store.
|
protected IEclipsePreferences |
getLoadLevel() |
protected static java.lang.String |
getScopeRelativePath(java.lang.String absolutePath) |
protected EclipsePreferences |
internalCreate(EclipsePreferences nodeParent,
java.lang.String nodeName,
java.lang.Object context) |
protected java.lang.String |
internalPut(java.lang.String key,
java.lang.String newValue)
Stores the given (key,value) pair, performing lazy initialization of the
properties field if necessary.
|
protected boolean |
isAlreadyLoaded(IEclipsePreferences node) |
protected void |
load()
Loads the preference node.
|
protected void |
loaded() |
IEclipsePreferences |
node(java.lang.String childName,
java.lang.Object context) |
boolean |
nodeExists(java.lang.String path)
Returns true if the named node exists.
|
void |
sync()
Ensures that future reads from this node and its descendants reflect any
changes that were committed to the persistent store (from any VM) prior
to the
sync invocation. |
absolutePath, accept, addChild, addNodeChangeListener, addPreferenceChangeListener, checkRemoved, childExists, childrenNames, clear, computeChildren, computeLocation, convertFromProperties, convertToProperties, create, create, decodePath, encodePath, fireNodeEvent, firePreferenceEvent, get, getBoolean, getByteArray, getChild, getChildren, getDouble, getFloat, getInt, getLocation, getLong, getSegment, getSegmentCount, internalChildNames, internalFlush, internalGet, internalNode, isDirty, isLoading, keys, load, loadLegacy, log, makeDirty, makeRelative, name, node, parent, put, putBoolean, putByteArray, putDouble, putFloat, putInt, putLong, remove, removeNode, removeNode, removeNode, removeNodeChangeListener, removePreferenceChangeListener, removeTimestampFromTable, save, save, setLoading, shareStrings, toDeepDebugString, toString, writepublic DefaultPreferences()
public IEclipsePreferences node(java.lang.String childName, java.lang.Object context)
public boolean nodeExists(java.lang.String path)
throws BackingStoreException
Preferences'/') are
interpreted relative to the root of this node. Relative pathnames (which
begin with any character other than '/') are interpreted
relative to this node itself. The pathname "" is valid, and
refers to this node itself.
If this node (or an ancestor) has already been removed with the
Preferences.removeNode() method, it is legal to invoke this method,
but only with the pathname ""; the invocation will return
false. Thus, the idiom p.nodeExists("") may be
used to test whether p has been removed.
nodeExists in interface PreferencesnodeExists in class EclipsePreferencespath - the path name of the node whose existence is to be
checked.BackingStoreException - if this operation cannot be completed due
to a failure in the backing store, or inability to communicate
with it.public void flush()
PreferencesOnce this method returns successfully, it is safe to assume that all changes made in the subtree rooted at this node prior to the method invocation have become permanent.
Implementations are free to flush changes into the persistent store at any time. They do not need to wait for this method to be called.
When a flush occurs on a newly created node, it is made persistent, as are any ancestors (and descendants) that have yet to be made persistent. Note however that any properties value changes in ancestors are not guaranteed to be made persistent.
flush in interface Preferencesflush in class EclipsePreferencesPreferences.sync()protected IEclipsePreferences getLoadLevel()
getLoadLevel in class EclipsePreferencesprotected EclipsePreferences internalCreate(EclipsePreferences nodeParent, java.lang.String nodeName, java.lang.Object context)
internalCreate in class EclipsePreferencesprotected boolean isAlreadyLoaded(IEclipsePreferences node)
isAlreadyLoaded in class EclipsePreferencesprotected void load()
EclipsePreferencesload in class EclipsePreferencesprotected java.lang.String internalPut(java.lang.String key,
java.lang.String newValue)
EclipsePreferencesinternalPut in class EclipsePreferencesprotected static java.lang.String getScopeRelativePath(java.lang.String absolutePath)
protected void loaded()
loaded in class EclipsePreferencespublic void sync()
Preferencessync invocation. As a side-effect, forces any changes
in the contents of this node and its descendants to the persistent store,
as if the flush method had been invoked on this node.sync in interface Preferencessync in class EclipsePreferencesPreferences.flush()