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
Modifier and TypeMethodDescriptionvoid
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.convertStringListToString
(String[] value, String listDelimiter) converts StringList value into String of the following format: "<value_1>< listDelimiter ><value_2>< listDelimiter > ...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 macroboolean
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 valuesresolveValue
(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 Details
-
getVariable
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
- Returns:
- the array of the IBuildMacro representing all available macros
-
convertStringListToString
converts StringList value into String of the following format: "<value_1>< listDelimiter ><value_2>< listDelimiter > ... <value_n>" -
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 "<value_1>< listDelimiter ><value_2>< listDelimiter > ... <value_n>" 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
- Returns:
- true if the specified expression can be treated as StringList
1. The string value is "${
}" - Throws:
CdtVariableException
-
checkVariableIntegrity
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
-
isUserVariable
-
toEclipseVariable
org.eclipse.core.variables.IStringVariable toEclipseVariable(ICdtVariable variable, ICConfigurationDescription cfg)
-