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/Launch Configuration Templates"

Line 14: Line 14:
  
 
==UI [WIP]==
 
==UI [WIP]==
 +
 +
'''Template''' doesn't seem to be the appropriate term for this mechanism. Another term will be used for the definitive mechanism.
  
 
A new icon will be available in the action bar on the left side of the window. It will allow to create a new template in the selected category.
 
A new icon will be available in the action bar on the left side of the window. It will allow to create a new template in the selected category.
Line 43: Line 45:
 
The ''Run'' button is disabled because the user can't launch a template, only configurations.
 
The ''Run'' button is disabled because the user can't launch a template, only configurations.
  
[[File:New_template_v2.png]]
+
[[File:New_Template_Main_Tab_v3.png]]
 +
 
 +
A new tab will be added at the end of the tabs list.
 +
 
 +
This tab lists the attributes of the launch configuration. The creator of the template have to set the ''shared'' state of each attribute.
 +
 
 +
The ''shared'' state means that the attribute will be shared with the configurations based on this template or not.
 +
 
 +
For a new template, the default value of ''shared'' will be set to ''yes'' for all attributes.
  
 +
[[File:New_Template_Template_Tab_v3.png]]
  
 
When a template is selected in the left panel, a right-click opens a menu.
 
When a template is selected in the left panel, a right-click opens a menu.
Line 59: Line 70:
 
A new tab named Template will be available for configurations. This tab allows to select an existing template for an existing configuration.
 
A new tab named Template will be available for configurations. This tab allows to select an existing template for an existing configuration.
  
[[File:Configuration_New_Template_Tab.png]]
+
[[File:Configuration_New_Template_Tab_v3.png]]
  
  
Line 70: Line 81:
 
Here is a configuration with no attributes modified:
 
Here is a configuration with no attributes modified:
  
[[File:Configuration_With_Template_Modified.png]]
+
[[File:Configuration_With_Template_v3.png]]
  
 
Then, the same configuration with modified attributes:
 
Then, the same configuration with modified attributes:
  
[[File:Configuration_With_Template.png]]
+
[[File:Configuration_With_Template_Modified_V3.png]]
  
 
==API [WIP]==
 
==API [WIP]==

Revision as of 05:10, 20 February 2017

Purpose

In the context of the FEEP, a development effort has been proposed for a launch configuration template mechanism.

Currently there is no share parameters between launch configurations or to change several parameters at once. The idea is to let the user define Launch Configuration Templates that 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 configuration than can be launched, exported, shared, etc.

Initial work and analysis has already been documented on the wiki and in bug 41353.

The goal of this page is to share propositions with the community about the launch configuration template mechanism.

Proposition [WIP]

Based on the already existing analysis on the wiki and in the bug 41353, the proposition is the following:

UI [WIP]

Template doesn't seem to be the appropriate term for this mechanism. Another term will be used for the definitive mechanism.

A new icon will be available in the action bar on the left side of the window. It will allow to create a new template in the selected category.

Run Configurations New Template Icon.png


When a configuration is selected in the left panel, a right-click opens a menu. This menu will be updated with new entries:

  • New configuration: replace the existing New entry.
  • New template: allows to create a new template in the containing category.
  • Reset with template values: reset the fields of the selected configuration with the values from the template. This item will be grayed if no template has been set for the selected configuration.

Configuration Item Menu Before After.png


When a category is selected in the left panel, a right-click opens a menu. This menu will be updated with new entries:

  • New configuration: replace the existing New entry.
  • New template: allows to create a new template in the selected category.

Configuration Category Menu Before After.png


The UI for a new template is the following. It is the same than the configurations for which the template is defined.

The user set all attributes he wants, like he did for a configuration.

The Run button is disabled because the user can't launch a template, only configurations.

New Template Main Tab v3.png

A new tab will be added at the end of the tabs list.

This tab lists the attributes of the launch configuration. The creator of the template have to set the shared state of each attribute.

The shared state means that the attribute will be shared with the configurations based on this template or not.

For a new template, the default value of shared will be set to yes for all attributes.

New Template Template Tab v3.png

When a template is selected in the left panel, a right-click opens a menu. This new menu will be created with new entries:

  • New configuration: replace the existing New entry.
  • New template: allows to create a new template in the selected category.
  • Duplicate: duplicate the selected template.
  • Delete: delete the selected template.
  • Apply template to all configurations: apply the values of the selected template to all existing configuration of the containing category. This item will be grayed if no applicable configuration exists for the selected template.

Template Item Menu Before After.png


A new tab named Template will be available for configurations. This tab allows to select an existing template for an existing configuration.

Configuration New Template Tab v3.png


When a configuration is associated to a template, then the UI indicates which attributes comes from the template and which attributes have been modified by the user.

It could be done by a specific color, but it also could be done with italic fields or any another graphical difference.

For the following example, the specific color has been chosen, but it is only for the example.

Here is a configuration with no attributes modified:

Configuration With Template v3.png

Then, the same configuration with modified attributes:

File:Configuration With Template Modified V3.png

API [WIP]

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
  • Return whether an attribute of the configuration has been modified or comes from the template

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.

Misc

  • Default color to associate to widgets linked with attributes with values from the template

Back to the top