Interface ICdtVariableManager
-
public interface ICdtVariableManager
- 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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
checkVariableIntegrity(ICConfigurationDescription cfg)
checks the integrity of the Macros If there are inconsistencies, such as when a macro value refers to a nonexistent macro or when two macros refer to each other, this method will throw the BuildMacroException exception The BuildMacroException will contain the human-readable string describing the inconsistency and the array of the IBuildMacro interfaces that will represent the macros that caused the inconsistency.String
convertStringListToString(String[] value, String listDelimiter)
converts StringList value into String of the following format: "< listDelimiter > < listDelimiter > ... ICdtVariable
getVariable(String name, ICConfigurationDescription cfg)
Returns reference to the IBuildMacro interface representing Macro of the specified name or null if there is there is no such macroICdtVariable[]
getVariables(ICConfigurationDescription cfg)
boolean
isEnvironmentVariable(ICdtVariable variable, ICConfigurationDescription cfg)
boolean
isStringListValue(String value, ICConfigurationDescription cfg)
boolean
isUserVariable(ICdtVariable variable, ICConfigurationDescription cfg)
String[]
resolveStringListValue(String value, String nonexistentMacrosValue, String listDelimiter, ICConfigurationDescription cfg)
if the string contains a value that can be treated as a StringList resolves it to arrays of strings otherwise throws the BuildMacroException exceptionString[]
resolveStringListValues(String[] value, String nonexistentMacrosValue, String listDelimiter, ICConfigurationDescription cfg)
resolves macros in the array of string-list valuesString
resolveValue(String value, String nonexistentMacrosValue, String listDelimiter, ICConfigurationDescription cfg)
resolves all macros in the string.org.eclipse.core.variables.IStringVariable
toEclipseVariable(ICdtVariable variable, ICConfigurationDescription cfg)
-
-
-
Method Detail
-
getVariable
ICdtVariable getVariable(String name, ICConfigurationDescription cfg)
Returns reference to the IBuildMacro interface representing Macro of the specified name or null if there is there is no such macro- Parameters:
name
- macro name
-
getVariables
ICdtVariable[] getVariables(ICConfigurationDescription cfg)
- Returns:
- the array of the IBuildMacro representing all available macros
-
convertStringListToString
String convertStringListToString(String[] value, String listDelimiter)
converts StringList value into String of the following format: "< listDelimiter > < listDelimiter > ... "
-
resolveValue
String resolveValue(String value, String nonexistentMacrosValue, String listDelimiter, ICConfigurationDescription cfg) throws CdtVariableException
resolves all macros in the string.- Parameters:
value
- the value to be resolvednonexistentMacrosValue
- specifies the value that inexistent macro references will be expanded to. If null the BuildMacroException is thrown in case the string to be resolved references inexistent macroslistDelimiter
- if not null, StringList macros are expanded as "< listDelimiter > < listDelimiter > ... " otherwise the BuildMacroException is thrown in case the string to be resolved references string-list macros - Throws:
CdtVariableException
-
resolveStringListValue
String[] resolveStringListValue(String value, String nonexistentMacrosValue, String listDelimiter, ICConfigurationDescription cfg) throws CdtVariableException
if the string contains a value that can be treated as a StringList resolves it to arrays of strings otherwise throws the BuildMacroException exception- Throws:
CdtVariableException
-
resolveStringListValues
String[] resolveStringListValues(String[] value, String nonexistentMacrosValue, String listDelimiter, ICConfigurationDescription cfg) throws CdtVariableException
resolves macros in the array of string-list values
-
isStringListValue
boolean isStringListValue(String value, ICConfigurationDescription cfg) throws CdtVariableException
- Returns:
- true if the specified expression can be treated as StringList
1. The string value is "${
}" - Throws:
CdtVariableException
-
checkVariableIntegrity
void checkVariableIntegrity(ICConfigurationDescription cfg) throws CdtVariableException
checks the integrity of the Macros If there are inconsistencies, such as when a macro value refers to a nonexistent macro or when two macros refer to each other, this method will throw the BuildMacroException exception The BuildMacroException will contain the human-readable string describing the inconsistency and the array of the IBuildMacro interfaces that will represent the macros that caused the inconsistency. This information will be used in the UI to notify the user about the macro inconsistencies (see also the "User interface for viewing and editing Build Macros" section of this design)- Throws:
CdtVariableException
-
isEnvironmentVariable
boolean isEnvironmentVariable(ICdtVariable variable, ICConfigurationDescription cfg)
-
isUserVariable
boolean isUserVariable(ICdtVariable variable, ICConfigurationDescription cfg)
-
toEclipseVariable
org.eclipse.core.variables.IStringVariable toEclipseVariable(ICdtVariable variable, ICConfigurationDescription cfg)
-
-