Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-debug-dev] Launch Variables


One of our intentions is to add support for "launch variables" to the debug platform. This allows for various launch configurations to reuse the variable implemetation and share variables across different types of launch configurations. For example, a common use of variables is to define user-specific paths, such as ${CATALINA_HOME}. The variable is shared on the launch config, and each user can define their workstation specific value.

The notion of variables will be defined in the debug platform. There will be two types of variables:
(1) Simple variables. A simple variable has an identifier and a value that does not change (or at least does not change often). Such a variable could be defined by a user in a preference page, or could be contributed by an extension (i.e. plug-ins can contribute variables). A variable contributed by an extension may define either a default value for the variable, or provide an "initializer". An initializer is a delegate class that will be instantiated by the debug plug-in, when required, to obtain the initial/default value of the variable.
(2) Context sensitive variables. A context sensitive variable has an identifier and has a dynamic value. A context sensitive variable will be contributed via an extension, and provide a "resolver" that can bind a value to the variable, given a launch context (i.e. a launch configuration). A context sensitive variable may have arguments. It is up to the resolver to interpret the arguments in a launch context. A resolver may require a UI, or may not - it is up to the contributor.

The debug platform will provide utilities for resolving variable values, identifing arguments, etc.

The debug UI will provide facilities for the presentation/editing of variables:
(1) A preference page will be provided to create user-defined (simple) variables, and assign values to (simple) variables.
(2) A dialog will be provided for selecting one or more variables from a list. This will be useful for launch configuration tabs that allow the use of variables. The dialog will allow variables to contribute a UI component where applicable. For example, a variable that binds to a specific resource may provide a UI component to select a resource.

Launch delegates will be responsible for resolving variable values at launch time (using APIs provided by the debug platform). Since the places that variables may be specified in a launch configuration are launch/application specific, it will be up to launch configuration delegates to use the debug platform APIs to resolve variable values. If we can find ways to make this simpler (for example, pre-processing a launch config to bind values to variables), we will do so.

Darin

Back to the top