From 70d404ed90787e171edd31157c70254f9cc8f857 Mon Sep 17 00:00:00 2001 From: Darin Wright Date: Wed, 10 Dec 2003 22:51:06 +0000 Subject: Bug 45991 - need package.html in "variables" plug-in --- .../src/org/eclipse/core/variables/package.html | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 org.eclipse.core.variables/src/org/eclipse/core/variables/package.html (limited to 'org.eclipse.core.variables/src/org/eclipse/core/variables') diff --git a/org.eclipse.core.variables/src/org/eclipse/core/variables/package.html b/org.eclipse.core.variables/src/org/eclipse/core/variables/package.html new file mode 100644 index 000000000..39268f403 --- /dev/null +++ b/org.eclipse.core.variables/src/org/eclipse/core/variables/package.html @@ -0,0 +1,45 @@ + + + +
+ +Provides support for defining and contributing variables for the purpose of + string substitution.
+ +This package provides classes and interfaces to support the definition and
+ contribution of variables for the purpose of string substitution. The plug-in
+ supports the recursive replacement of variables referenced by name in arbitrary
+ strings with the value of the variable. Two types of variables are provided
+ - value variables (IValueVariable
) and dynamic variables (IDynamicVariable
).
+ A value variable has a simple setter and getter for its current value. A dynamic
+ variable has an associated resolver that provides a variable's value each time
+ it is referenced (replaced) in a string substitution. A dynamic variable may
+ also provide an argument in its reference that can be used by its resolver to
+ determine its substitution value.
A variable manager (IStringVariableManager
) is provided to manage
+ the set of defined variables. Value variables may be created via API on the
+ variable manager, or contributed via the valueVariables
extension
+ point. Dynamic variables must be contributed via the dynamicVariables
+ extension point. The variable manager also provides change notification for
+ value variables. The variable manager also provides an API for performing string
+ substitution, which accepts a string, and returns a string with all variable
+ references replaced by associated variable values.
Variables are referenced in strings by enclosing them in braces, preceded with
+ a dollar sign. For example, consider a variable defined with the name foo
,
+ and referenced in the following string: "abc${foo}hij"
.
+ If the value of foo
is "def"
, the result
+ of a string substitution would be "abcdefhij"
. In the
+ case of a dynamic variable, an (optional) argument is supplied by appending
+ a colon and argument value after the variable name. For example "${foo:bar}"
.
+ In this case, the resolver associated with foo
would be provided
+ with the referenced argument (bar
) when asked to resolve a value
+ for the variable foo
.