|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IStringVariableManager
Registry for string variables.
| Field Summary | |
|---|---|
static java.lang.String |
EXTENSION_POINT_DYNAMIC_VARIABLES
Simple identifier constant (value "dynamicVariables") for the
dynamic variables extension point. |
static java.lang.String |
EXTENSION_POINT_VALUE_VARIABLES
Simple identifier constant (value "valueVariables") for the
value variables extension point. |
| Method Summary | |
|---|---|
void |
addValueVariableListener(IValueVariableListener listener)
Registers the given listener for value variable notifications. |
void |
addVariables(IValueVariable[] variables)
Adds the given variables to the variable registry. |
java.lang.String |
generateVariableExpression(java.lang.String varName,
java.lang.String arg)
Convenience method that returns an expression referencing the given variable and optional argument. |
java.lang.String |
getContributingPluginId(IStringVariable variable)
Returns the plug-in identifier of the plug-in that contributed the given variable via extension or null if the given
variable wasn't contributed via extension. |
IDynamicVariable |
getDynamicVariable(java.lang.String name)
Returns the dynamic variable with the given name or null
if none. |
IDynamicVariable[] |
getDynamicVariables()
Returns all registered dynamic variables. |
IValueVariable |
getValueVariable(java.lang.String name)
Returns the value variable with the given name, or null
if none. |
IValueVariable[] |
getValueVariables()
Returns all registered value variables. |
IStringVariable[] |
getVariables()
Returns all registered variables. |
IValueVariable |
newValueVariable(java.lang.String name,
java.lang.String description)
Returns a new read-write value variable with the given name and description with a null value. |
IValueVariable |
newValueVariable(java.lang.String name,
java.lang.String description,
boolean readOnly,
java.lang.String value)
Returns a new value variable with the given properties. |
java.lang.String |
performStringSubstitution(java.lang.String expression)
Recursively resolves and replaces all variable references in the given expression with their corresponding values. |
java.lang.String |
performStringSubstitution(java.lang.String expression,
boolean reportUndefinedVariables)
Recursively resolves and replaces all variable references in the given expression with their corresponding values. |
void |
removeValueVariableListener(IValueVariableListener listener)
Removes the given listener from the list of registered value variable listeners. |
void |
removeVariables(IValueVariable[] variables)
Removes the given variables from the registry. |
void |
validateStringVariables(java.lang.String expression)
Validates variables references in the given expression and reports errors for references to undefined variables. |
| Field Detail |
|---|
static final java.lang.String EXTENSION_POINT_DYNAMIC_VARIABLES
"dynamicVariables") for the
dynamic variables extension point.
static final java.lang.String EXTENSION_POINT_VALUE_VARIABLES
"valueVariables") for the
value variables extension point.
| Method Detail |
|---|
IStringVariable[] getVariables()
IValueVariable[] getValueVariables()
IValueVariable getValueVariable(java.lang.String name)
null
if none.
name - variable name
null
if noneIDynamicVariable[] getDynamicVariables()
IDynamicVariable getDynamicVariable(java.lang.String name)
null
if none.
name - variable name
null
if nonejava.lang.String getContributingPluginId(IStringVariable variable)
null if the given
variable wasn't contributed via extension.
variable - the variable
null
java.lang.String performStringSubstitution(java.lang.String expression)
throws CoreException
performStringSubstitution(expression, true)).
expression - expression referencing variables
CoreException - if unable to resolve the value of one or more variables
java.lang.String performStringSubstitution(java.lang.String expression,
boolean reportUndefinedVariables)
throws CoreException
expression - expression referencing variablesreportUndefinedVariables - whether a reference to an undefined variable
is to be considered an error (i.e. throw an exception)
CoreException - if unable to resolve the value of one or more variables
void validateStringVariables(java.lang.String expression)
throws CoreException
expression - expression referencing variables
CoreException - if one or more referenced variables do not exist
IValueVariable newValueVariable(java.lang.String name,
java.lang.String description)
null value.
name - variable name, cannot be nulldescription - variable description, possibly null
IValueVariable newValueVariable(java.lang.String name,
java.lang.String description,
boolean readOnly,
java.lang.String value)
name - variable name, cannot be nulldescription - variable description, possibly nullreadOnly - whether this variable is to be a read only variablevalue - the string value to initialize this variable to - should
not be null for read-only variables
void addVariables(IValueVariable[] variables)
throws CoreException
variables - the variables to add
CoreException - if one or more variables to add has a name collision with
an existing variablevoid removeVariables(IValueVariable[] variables)
variables - variables to removevoid addValueVariableListener(IValueVariableListener listener)
listener - value variable listener to addvoid removeValueVariableListener(IValueVariableListener listener)
listener - value variable listener to remove
java.lang.String generateVariableExpression(java.lang.String varName,
java.lang.String arg)
varName of my_var and an argument
of my_arg results in the string $(my_var:my_arg}.
varName - variable namearg - argument text or null
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.