Package org.eclipse.cdt.utils.envvar
Class StorableEnvironmentLoader
java.lang.Object
org.eclipse.cdt.utils.envvar.StorableEnvironmentLoader
This class implements the common functionality that allows
storing and loading environment variable settings from eclipse properties
- Since:
- 3.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
this interface represents the preference node and the preference name that are used for holding the environment data -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncloneEnvironmentWithContext
(Object context, StorableEnvironment base, boolean isReadOnly) Creates the StorableEnvironment clone for a new configuration, say, based on an existing configurationprotected abstract StorableEnvironmentLoader.ISerializeInfo
getSerializeInfo
(Object context) this method should return the ISerializeInfo representing the information of where the variable should be stored and loaded If the given context is not supported this method should return nullprotected StorableEnvironment
loadEnvironment
(Object context, boolean readOnly) Loads the environment from the context'sStorableEnvironmentLoader.ISerializeInfo
.protected void
storeEnvironment
(StorableEnvironment env, Object context, boolean force, boolean flush)
-
Constructor Details
-
StorableEnvironmentLoader
public StorableEnvironmentLoader()
-
-
Method Details
-
cloneEnvironmentWithContext
public StorableEnvironment cloneEnvironmentWithContext(Object context, StorableEnvironment base, boolean isReadOnly) Creates the StorableEnvironment clone for a new configuration, say, based on an existing configuration- Parameters:
context
- the configuration / workspace context the configuration is to be cloned forbase
- the base environment to copy- Returns:
- a StorableEnvironment clone of the configuration's environment
- Since:
- 5.2
-
getSerializeInfo
this method should return the ISerializeInfo representing the information of where the variable should be stored and loaded If the given context is not supported this method should return null -
loadEnvironment
Loads the environment from the context'sStorableEnvironmentLoader.ISerializeInfo
. NB the environment in theStorableEnvironmentLoader.ISerializeInfo
need not be available yet. TheStorableEnvironmentLoader.ISerializeInfo
may be held by theStorableEnvironment
to pick up any external changes in the environment.- Parameters:
context
-readOnly
-- Returns:
- StorableEnvironment
-
storeEnvironment
protected void storeEnvironment(StorableEnvironment env, Object context, boolean force, boolean flush) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-