Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Debug/Plan/3.6/Launch Templates"

(Associate a configuration with an existing template)
Line 49: Line 49:
 
=== Associate a configuration with an existing template ===
 
=== Associate a configuration with an existing template ===
  
A template can be associated with an existing template using drag & drop (dropping on the template). When this happens, the user will be prompted to apply the template settings to the freshly dropped template (with a "do not ask again" option).
+
A configuration can be associated with an existing template using drag & drop (dropping on the template). When this happens, the user will be prompted to apply the template settings to the freshly dropped configuration (with a "do not ask again" option).
  
 
== Launch Configuration Template User Interface ==
 
== Launch Configuration Template User Interface ==

Revision as of 09:04, 21 October 2009

Launch Configuration Template Use Cases

The following use cases are intended to be used a starting point for launch configuration template design and integration into the debug platform.

Templates behave like cookie cutters. A configuration can be based on a template, which seeds attributes in the configuration with the settings specified in the template. Once a configuration has been created, the user can override any initial settings from the template. The user can also modify the template and push changes out to the configurations based on it. A configuration maintains a backpointer to its template, but is a complete standalone congifuration than can be launched, exported, shared, etc.

Bug.png
41353
Launch Templates


Create a new template

To creating a template use the "New" drop down button in the LCD tree viewer toolbar, and select "Template".

Create a template from an existing configuration

Select the configuration in the LCD and click the "Template" toolbar button.

A configuration will automatically become a template if an existing configuration is dropped on it as a child configuration.

An "Add..." button on the LCD type page could be provided to add existing configurations to the template list.

Create a configuration based on a specific template

Select the template in the LCD and press the "New" button. This will create a new configuration associated with the selected template, initialized with attributes from the template.

Alternatively, double-clicking on an existing template will create a configuration based on that template.

Update all configurations made from a template

From time to time, attributes in a template will be modified. When the "Apply" button is pressed the user will be prompted to update all children configurations (and have the option to "do not ask again").

A button should also be available in the toolbar to apply a template to all of its children.

Rename a template

Launch configurations keep track of which template (if any) they are based on. When a template is renamed in the LCD, all configurations made from that template will be updated to refer to the renamed template. This is much like a refactoring.

Delete a template

When a template is deleted in the LCD, users will be prompted to delete all children assocaited with the template. When children are not deleted, they are moved up a level in the tree (re-parented).

Remove template status

A template can be made into an ordinary configuration by selecting the template in the LCD type page, and pressing the "Remove" button. All of its decendents will be moved up one level in the tree.

Disconnect a configuration from its template

Drag & drop allows a user to re-parent a configuration to a different template or to no template (dropping on configuration type node).

Associate a configuration with an existing template

A configuration can be associated with an existing template using drag & drop (dropping on the template). When this happens, the user will be prompted to apply the template settings to the freshly dropped configuration (with a "do not ask again" option).

Launch Configuration Template User Interface

Display all templates of a given type

Currently, when a launch configuration type is selected in the LCD, a page of instructions is displayed on how to create and manage launch configrations. This page will be enhanced with the following:

  • A list (viewer) of all templates of the selected launch configuration type
  • An "Add..." button to allow existing configurations to be made into templates.
  • A "Remove" button to allow a configuration to be made into a normal configuration, re-parenting its existing children.

Display template relationships and provide convenience actions

The LCD tree viewer will be enhanced with the following:

  • The "New" button will be enhanced into a drop down to allow a new "Configuration" or "Template" to be created. By default (i.e. just pressing the button), a confiugration will be created.
  • Nest configurations by template - i.e. all configurations based on a template will be displayed as children of that template.
  • Double-clicking a template in the tree will create a new configration based on that template
  • Drag & drop to allow configurations to be re-parented under a different template (or disasscoiated with its template by dragging to the top level).
  • A button will be added to the toolbar to allow the selected template's settings to be applied/pushed to all of its children.

Launch Configuration Template API

API will added to the following interfaces to support launch configuration templates

ILaunchConfigurationType

  • Get all templates of this type
  • Create a new working copy based on a given template

ILaunchConfigurationWorkingCopy

  • Set whether a configuration is a template
  • Set the template a configuration is based on (backpointer)
  • Copy attributes from a configuration into the working copy

ILaunchConfiguration

  • Return whether a configuration is a template
  • Get the template a configuration is based on (backpointer, may be null)
  • Get all configurations a template is associated with

AbstractLaunchConfigurationTab

  • A new method to validate templates. The default implementation will not validate templates (as they will usually have sparse/incomplete information that would be invalid). Clients can provide an implementation of the new method to perform template validation as needed.

Images

  • The launchConfigurationTypeImages extension will be enhanced to allow a custom image to be provided for templates.

Default Launch Configuration Settings (Workspace, Project preferences)

Related to launch configuration templates, are default workspace and project settings for launch configurations. Users can acheive features similar to default workspace/project settings by managing templates, but the SDK could also offer explicit support for this.

A user may want to define default settings for certain launch aspects. For example, a default JRE or VM arguments to use for all Java applications. Although this could be achieved with a template, one could imagine having default settings that could be applied to newly created launch configurations. Default settings work like preferences - they are used to override settings in specific launch configurations, but the launch configurations themselves contain no backpointer/reference to the settings (unlike a configuration based on a template, which keeps track of which template it was based on). The user can maintain a hierarchy of templates orthoganal to default settings. Newly created templates would obtain default settings the same way a configuration would.

Define default launch settings for a workspace

Default workspace settings can be defined for each launch configuration type available in the workspace.

Define default launch settings for a project

Default settings may also be specified and shared at the project level.

Initializing a configuration based on a project/workspace default settings

Project and workspace default settings should initialize newly created configurations when created in the LCD or by invoking a launch shortcut. The debug platform can leverage configuration resource mappings to determine what settings should be used to initialize newly created configurations.

When a new working copy is saved (i.e. for the first time only), its resource mapping will be used to determine what settings (i.e. which scope - project or workspace) should be used to initialize the working copy. Any default settings found, will be applied to the working copy. The platform cannot determine the proper scope to use until the configuration is saved, as when a configuration is created, a resource scope is not provided. As well, the scope may change while the working copy is being edited.

We may need to provide a user configurable policy to control whether default settings override existing settings in the working copy, or whether they should only be applied when the working copy does not specify a value. (However, it may just be reasonable to override them).

Debug 3.6 Plan

Back to the top