|
Eclipse Platform Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IStringVariableManager
Registry for string variables.
Clients are not intended to implement this interface.
| Field Summary | |
|---|---|
static String |
EXTENSION_POINT_DYNAMIC_VARIABLES
Simple identifier constant (value "dynamicVariables") for the
dynamic variables extension point. |
static 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. |
String |
generateVariableExpression(String varName,
String arg)
Convenience method that returns an expression referencing the given variable and optional argument. |
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(String name)
Returns the dynamic variable with the given name or null
if none. |
IDynamicVariable[] |
getDynamicVariables()
Returns all registered dynamic variables. |
IValueVariable |
getValueVariable(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(String name,
String description)
Returns a new value variable with the given name and description. |
String |
performStringSubstitution(String expression)
Recursively resolves and replaces all variable references in the given expression with their corresponding values. |
String |
performStringSubstitution(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(String expression)
Validates variables references in the given expression and reports errors for references to undefined variables. |
| Field Detail |
|---|
static final String EXTENSION_POINT_DYNAMIC_VARIABLES
"dynamicVariables") for the
dynamic variables extension point.
static final String EXTENSION_POINT_VALUE_VARIABLES
"valueVariables") for the
value variables extension point.
| Method Detail |
|---|
IStringVariable[] getVariables()
IValueVariable[] getValueVariables()
IValueVariable getValueVariable(String name)
null
if none.
name - variable name
null
if noneIDynamicVariable[] getDynamicVariables()
IDynamicVariable getDynamicVariable(String name)
null
if none.
name - variable name
null
if noneString getContributingPluginId(IStringVariable variable)
null if the given
variable wasn't contributed via extension.
variable - the variable
null
String performStringSubstitution(String expression)
throws CoreException
performStringSubstitution(expression, true)).
expression - expression referencing variables
CoreException - if unable to resolve the value of one or more variables
String performStringSubstitution(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(String expression)
throws CoreException
expression - expression referencing variables
CoreException - if one or more referenced variables do not exist
IValueVariable newValueVariable(String name,
String description)
name - variable name, cannot be nulldescription - variable description, possibly null
CoreException - if a variable already exists with the given name
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
String generateVariableExpression(String varName,
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.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.