|
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 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 value variable with the given name and description. |
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 variablesjava.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 variablesvoid validateStringVariables(java.lang.String expression) throws CoreException
expression
- expression referencing variables
CoreException
- if one or more referenced variables do not existIValueVariable newValueVariable(java.lang.String name, java.lang.String description)
name
- variable name, cannot be null
description
- variable description, possibly null
CoreException
- if a variable already exists with the given namevoid 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 removejava.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.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.