Package org.eclipse.cdt.core.envvar
Interface IEnvironmentVariable
-
- All Known Implementing Classes:
EnvironmentVariable
,StorableEnvVar
public interface IEnvironmentVariable
this interface represents the given environment variable- Since:
- 3.0
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
-
Field Summary
Fields Modifier and Type Field Description static int
ENVVAR_APPEND
static int
ENVVAR_PREPEND
static int
ENVVAR_REMOVE
static int
ENVVAR_REPLACE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getDelimiter()
String
getName()
int
getOperation()
String
getValue()
-
-
-
Field Detail
-
ENVVAR_REPLACE
static final int ENVVAR_REPLACE
- See Also:
- Constant Field Values
-
ENVVAR_REMOVE
static final int ENVVAR_REMOVE
- See Also:
- Constant Field Values
-
ENVVAR_PREPEND
static final int ENVVAR_PREPEND
- See Also:
- Constant Field Values
-
ENVVAR_APPEND
static final int ENVVAR_APPEND
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
String getName()
- Returns:
- the variable name
-
getValue
String getValue()
- Returns:
- the variable value
-
getOperation
int getOperation()
- Returns:
- one of the IBuildEnvironmentVariable.ENVVAR_* operation types
-
getDelimiter
String getDelimiter()
- Returns:
- if the variable can hold the list of values this method returns the String representing
the delimiter that is used to separate values. This information is used for the following:
1. in append and prepend operations:
If the variable already exists and contains some value the new
value will be calculated in the following way:
For the "prepend" operation:
= For the "append" operation: = The Environment Variable Provider will also remove the duplicates of "sub-values" in the resulting value. For example: If the current value is "string1:string2:string3", the getDelimiter() method returns ":" and getValue() method returns "string4:string2" the new value will contain: For the "prepend" operation: "string4:string2:string1:string3" For the "append" operation: "string1:string3:string4:string2" 2. Since the environment variables are also treated as build macros the delimiter is also used by the BuildMacroProvider to determine the type of the macro used to represent the given environment variable. If the variable has the delimiter it is treated as the Text-List macro otherwise it is treated as the Text macro. (See Build Macro design for more details) To specify that no delimiter should be used, the getDelimiter() method should return null or an empty string
-
-