Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Plug-in Developer Guide
Previous Page Home Next Page


Eclipse Platform
Release 3.5

Package org.eclipse.core.variables

Provides support for defining and contributing variables for the purpose of string substitution.

See:
           Description

Interface Summary
IDynamicVariable A dynamic variable is a variable whose value is computed dynamically by a resolver at the time a string substitution is performed.
IDynamicVariableResolver Resolves the value for a dynamic variable.
IStringVariable A variable that can be referenced in an expression, which resolves to a string value.
IStringVariableManager Registry for string variables.
IValueVariable A variable with a value that can be set and retrieved.
IValueVariableInitializer Value variable initializers compute an initial value for a value variable contributed by an extension, which is not defined with an initial value.
IValueVariableListener A string variable listener is notified of variables as they are added and removed from the string variable manager.
 

Class Summary
VariablesPlugin The plug-in runtime class for the Core Variables plug-in.
 

Package org.eclipse.core.variables Description

Provides support for defining and contributing variables for the purpose of string substitution.

Package Specification

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}ghi". If the value of foo is "def", the result of a string substitution would be "abcdefghi". 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.


Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire