Bug 37241 - Support for core variables
Summary: Support for core variables
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.0 M2   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords: core
Depends on:
Blocks:
 
Reported: 2003-05-05 15:19 EDT by Jared Burns CLA
Modified: 2003-06-16 16:12 EDT (History)
0 users

See Also:


Attachments
Code Review.htm - feedback on initial implementation (6.86 KB, text/html)
2003-06-09 15:22 EDT, Jared Burns CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Burns CLA 2003-05-05 15:19:11 EDT
Currently, all variable support exists in Debug UI and the support
is tied to the UI.

From the Debug mailing list (author DarinW):
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.
Comment 1 Jared Burns CLA 2003-05-27 15:54:03 EDT
Implemented. Please verify, DarinW.
Comment 2 Darin Wright CLA 2003-05-29 09:29:26 EDT
Code review was e-mailed to Jared. Re-opening.
Comment 3 Jared Burns CLA 2003-06-09 15:22:05 EDT
Created attachment 5131 [details]
Code Review.htm - feedback on initial implementation
Comment 4 Jared Burns CLA 2003-06-11 14:10:03 EDT
Please verify. If there are additional issues, please open new bug reports.
Comment 5 Darin Wright CLA 2003-06-16 16:12:29 EDT
Verified - new bugs will be opened for remaining issues.