Package org.eclipse.cdt.utils.envvar
Class PrefsStorableEnvironment
java.lang.Object
org.eclipse.cdt.utils.envvar.StorableEnvironment
org.eclipse.cdt.utils.envvar.PrefsStorableEnvironment
This class represents the set of environment variables that could be loaded
 and stored from a IEclipsePreferences store.  It acts like an OverlayStore caching
 outstanding changes while not yet serialized, as well as responding to change
 in the Preference store itself.
 fCachedSerialEnv is a cache of the contents of the preference store
 fVariables (in parent) contains runtime added / changed variables
 fDeleteVaraibles contains delete variable names
 When serialize is called, all changes in Variables / Delete are serialized to the
 ISerializeInfo store, Cached is updated, and fVariables and fDeletedVariables cleared.
 StorableEnvironment stores the Preferences in a single XML encoded String in
    ISerializeInfo.getNode().get(ISerializeInfo.getName())
 This class defaults to storing the environment as 'Raw' items in the Preferences
 under:
    ISerializeInfo.getNode().node(ISerializeInfo.getName())
- Since:
- 5.2
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionSet of 'deleted' variables (to be removed from the backing store)Fields inherited from class org.eclipse.cdt.utils.envvar.StorableEnvironmentENVIRONMENT_ELEMENT_NAME
- 
Method SummaryModifier and TypeMethodDescriptioncreateVariable(String name, String value, int op, String delimiter) booleandeleteVariable(String name) protected voidfinalize()getVariable(String name) booleanisDirty()Returns the "dirty" state of the environment.voidAdds a listener that will be notified of changes in environment variables.voidvoidserialize(ICStorageElement element) Deprecated.voidsetAppendContributedEnvironment(boolean append) voidsetAppendEnvironment(boolean append) voidRemoves an environment variables change listener.Methods inherited from class org.eclipse.cdt.utils.envvar.StorableEnvironmentappendContributedEnvironment, appendEnvironment, checkVariable, createVariable, createVariable, createVariable, createVriables, getVariables, isChanged, isReadOnly, setChanged, setDirty, setVariales
- 
Field Details- 
fDeletedVariablesSet of 'deleted' variables (to be removed from the backing store)
 
- 
- 
Method Details- 
serializeDeprecated.Serialize the Storable environment into the ICStorageElement NB assumes that any variables part of the ISerializeInfo will continue to be serialized Use #serialize instead for persisting into the Preference store- Overrides:
- serializein class- StorableEnvironment
- Parameters:
- element-
 
- 
createVariable- Overrides:
- createVariablein class- StorableEnvironment
 
- 
getVariable- Overrides:
- getVariablein class- StorableEnvironment
- Parameters:
- name-
- Returns:
- the environment variable with the given name, or null
 
- 
deleteVariable- Overrides:
- deleteVariablein class- StorableEnvironment
 
- 
deleteAllpublic boolean deleteAll()- Overrides:
- deleteAllin class- StorableEnvironment
 
- 
setAppendEnvironmentpublic void setAppendEnvironment(boolean append) - Overrides:
- setAppendEnvironmentin class- StorableEnvironment
 
- 
setAppendContributedEnvironmentpublic void setAppendContributedEnvironment(boolean append) - Overrides:
- setAppendContributedEnvironmentin class- StorableEnvironment
 
- 
restoreDefaultspublic void restoreDefaults()- Overrides:
- restoreDefaultsin class- StorableEnvironment
 
- 
isDirtypublic boolean isDirty()Description copied from class:StorableEnvironmentReturns the "dirty" state of the environment. If the dirty state istrue, that means that the environment is out of synch with the repository and the environment needs to be serialized.
 The dirty state is automatically set tofalsewhen the environment is serialized by calling the serialize() method- Overrides:
- isDirtyin class- StorableEnvironment
- Returns:
- boolean
 
- 
registerEnvironmentChangeListenerAdds a listener that will be notified of changes in environment variables.- Parameters:
- listener- - the listener to add
- Since:
- 5.5
 
- 
unregisterEnvironmentChangeListenerRemoves an environment variables change listener.- Parameters:
- listener- - the listener to remove.
- Since:
- 5.5
 
- 
finalize
 
-