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 "MoDisco/Components/Workflow/Architecture"

(Implementation in MoDisco Workflow)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{MoDiscoWorkflowTabs}}
+
#REDIRECT [[MoDisco/Moved To Help Center]]
 
+
= Extension of launch configuration mechanism=
+
 
+
A launch configuration is a description of how to launch a program. A workflow could be viewed as a composition of launch configurations.
+
[[Image:MoDiscoWorkflowPatternCompositeLaunchConfiguration.jpg]]
+
 
+
== Purpose==
+
 
+
To be able to propose an interface for a workflow definition dedicated to modernization (strong use of modeling tools), we have extended the notion of launch configuration following a composite pattern: notion of leaf for launch configurations and notion of composite for launch configuration.
+
Extending the mechanism of launch configuration will provide us a nice wizard with all the options. Especially, if the MoDiscoWorkflow is itself a type of launch configuration.
+
 
+
However we had some requirements to be able to implement such workflow mechanism:
+
* from a workflow, we should be able to load an existing launch configuration, which implies to retrieve a list of all launch configurations defined (with a filter to keep only the launch configurations whom type has a driver in ModiscoWorkflow).
+
* from a workflow, we should be able to modify directly a loaded launch configuration (without having to select it in main list and after go back manually to workflow definition)
+
* from a workflow, we should be able to create directly a launch configuration. This new launch configuration should be created in the main list and loaded in the workflow defintion
+
 
+
== Implementation in MoDisco Workflow==
+
 
+
The first step was to add the MoDiscoWorkflow as a launch configuration. So we followed the eclipse help and provided two classes (one for the type and one for the tab group).
+
 
+
[[Image:MoDiscoWorkflowDelegateDiagram.jpg]]
+
[[Image:MoDiscoWorkflowTabGroupDiagram.jpg]]
+
 
+
The second step was to retrieve the list of existing launch configurations. So we created a dedicated wizard and get the list of existing launch configuration from an instance of org.eclipse.debug.core.ILaunchManager. Instance provided by static access DebugPlugin.getDefault().getLaunchManager(). Using this API, we were able to retrieve an array of ILaunchConfiguration which prodides us enough informations (type, name).
+
 
+
The third step was to modify, directly from the workflow definition, a loaded launch configuration. Instead of creating a specific wizard for each type of launch configuration, we would would like to reuse existing tab group defined for the type of selected launch configuration. So in our simple wizard, we have a wizard page which should be able to contain the same component that have been used in main list of launch configurations.
+
However to do that we had to link two classes that shouldn't be accessed:
+
* org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog
+
* org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer
+
 
+
[[Image:MoDiscoWorkflowDriverPageHackForLaunchConfigurationTabsDiagram.jpg]]
+
 
+
The fourth step was to create, directly from the workflow definition, a launch configuration. Difficulty was to add it in the main list of launch configurations, but the links made in the third step were enough to reach this goal.
+
 
+
[[Category:MoDisco]]
+

Latest revision as of 11:09, 2 April 2012

  1. REDIRECT MoDisco/Moved To Help Center

Back to the top