Package org.eclipse.cdt.utils.envvar
Class StorableEnvironmentLoader
- java.lang.Object
-
- org.eclipse.cdt.utils.envvar.StorableEnvironmentLoader
-
public abstract class StorableEnvironmentLoader extends Object
This class implements the common functionality that allows storing and loading environment variable settings from eclipse properties- Since:
- 3.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
StorableEnvironmentLoader.ISerializeInfo
this interface represents the preference node and the preference name that are used for holding the environment data
-
Constructor Summary
Constructors Constructor Description StorableEnvironmentLoader()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StorableEnvironment
cloneEnvironmentWithContext(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)
-
-
-
Method Detail
-
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
protected 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 null
-
loadEnvironment
protected StorableEnvironment loadEnvironment(Object context, boolean readOnly)
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
-
-