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 "Eclipse Oomph Authoring"

(Understanding the Setup Engine)
(Understanding the Setup Engine)
Line 36: Line 36:
 
The resulting list of tasks is then flattened, that is, compound tasks (folders) are recursively replaced by their contained tasks. Disabled tasks (see the editors context menu) are removed from the list. Tasks that are restricted to scopes that are not chosen for the current installation are also removed. Tasks that are excluded from the current ''trigger'' (one of Bootstrap, Startup or Manual) are also removed.
 
The resulting list of tasks is then flattened, that is, compound tasks (folders) are recursively replaced by their contained tasks. Disabled tasks (see the editors context menu) are removed from the list. Tasks that are restricted to scopes that are not chosen for the current installation are also removed. Tasks that are excluded from the current ''trigger'' (one of Bootstrap, Startup or Manual) are also removed.
  
The remaining list is then reordered according to a number of criteria such as task priority (hardcoded),
+
The remaining list is then partially reordered according to a number of criteria such as task priority (hardcoded), variable references or explicit (modeled) task requirements. If no such criteria apply the tasks are kept in their modeled order as much as possible.
 +
 
 +
Some types of tasks allow only one instance in the list of tasks. For example only one variable task (see below) with a given variable name is allowed to execute. To specify several of them (with the same name) is perfectly okay, but you should notice that the earlier (according to the established order; see above) tasks are replaced/overridden by the later ones. This way, for example, a user can always override such tasks from any high/early scope, e.g., the project or branch scope, in his local Preferences scope.
 +
 
 +
The the engine calls the isNeeded() method on each task in the list and removes those that are not needed (possibly according to the state of the running IDE).
 +
 
 +
If now the list of needed tasks is not empty a confirmation dialog is displayed and when the user presses Install the perform() method is called on that tasks. The progress of the installation process is then displayed in a progress dialog. The installation can be canceled at any point in time.
 +
 
 +
Variables play a very important role in the execution process. While a project model can perfectly work without the declaration or use of variables the model is typically more flexible with them. A variable must always be declared with a ''Variable Task'' somewhere in the model. It '''must have''' a name and '''can have''' a value. If it has no value a prompt dialog is displayed early in the execution process. The user can enter the missing variable values, which are stored as variable tasks in the Preferences scope (see above). At execution time these Preferences-scoped variable tasks override the respective variable tasks that you have declared in your project model.

Revision as of 07:45, 21 February 2014

Warning2.png
Work in Progress
This page might not be in sync with the latest tool version. Please help to improve this page.


What is Oomph?

Please read Eclipse Oomph Installer.


Authoring Quick Starter

A complete author's guide is currently under construction. A link will be published here when it is ready.

For now here are some easy steps for creating a new setup model for your project:

  1. Download and install the Eclipse Oomph installer as outlined in Eclipse Oomph Installer.
  2. Start the installer and install the "CDO Release Engineering" project. The resulting IDE contains the setup/update engine and the needed new wizards and model editors.
  3. Create a new "Project Setup" file in your releng (or any other) project:
    New-wizard.png New-wizard-2.png New-wizard-3.png
  4. Open the resulting setup file with Oomph's EMF model editor:
    Setup-edit.png
  5. Add setup tasks to your branches and/or to your project (shared across all branches):
    Setup-edit2.png
  6. Configure the tasks in the Properties view. Note that there are "Expert" properties available:
    Setup-edit3.png
  7. The Outline view displays a preview of the executable model with resolved variables:
    Setup-edit4.png
  8. To test/execute your new model copy the model file into the root folder of installer (see step 1). Then restart the installer and you will see your project at the top of the list. Check your branch and press the Install button. The installer will first bootstrap a new IDE and then launch it to complete the installation at startup time.
  9. Chances are that your first model contains errors (always turn on live validation in the model editor to get early feedback!). If the installation fails early and the new IDE doesn't come up go back to step 6. If the IDE comes up but the initial configuration fails continue with step 10.
  10. In the new IDE (whether the initial configuration was successful or not) open the model file with the Branch.png button from the main toolbar. Find the problems and fix them. Then start the configuration process from within this IDE by pressing the Update.png button in the main toolbar. This "manual trigger" will pop up a confimation dialog before starting the configuration process so that you can review what tasks are scheduled for execution.


Understanding the Setup Engine

The setup engine collects the setup tasks that are needed for a particular installation from a number of places (called scopes):

  • The Configuration scope is the top level scope with a small number of tasks that apply to all installations. The tasks in this scope are controlled by the Oomph team.
  • An Eclipse scope contains a small number of tasks to install a minimum IDE of a specific Eclipse version. There are several predefined Eclipse scopes nested in the Configuration (see above). All of them are controlled by the Oomph team. The user selects one of them for a particular installation at install time. This can be simulated at authoring time with the view toolbar choices in the Outline (Preview) view of the model editor.
  • The Project scope contains tasks that apply to any installation that is linked to one of your branches (see below). You have full control over these tasks. Press the Branch.png button from the main toolbar to edit them.
  • The Branch scope contains tasks that apply to any installation that is linked to this branch. You have full control over these tasks. The user selects one of them for a particular installation at install time. Press the Branch.png button from the main toolbar to edit them.
  • The Preferences scope contains tasks that apply to any installation (unless they're explicitely restricted to specific higher scopes such as a specific branch or Eclipse version). The user has exclusive control over these tasks. They are stored in the user's home folder: ${user.home}/.eclipse/org.eclipse.emf.cdo.releng.setup/setup-eclipse.xmi. Press the User.png button from the main toolbar to edit them.

The resulting list of tasks is then flattened, that is, compound tasks (folders) are recursively replaced by their contained tasks. Disabled tasks (see the editors context menu) are removed from the list. Tasks that are restricted to scopes that are not chosen for the current installation are also removed. Tasks that are excluded from the current trigger (one of Bootstrap, Startup or Manual) are also removed.

The remaining list is then partially reordered according to a number of criteria such as task priority (hardcoded), variable references or explicit (modeled) task requirements. If no such criteria apply the tasks are kept in their modeled order as much as possible.

Some types of tasks allow only one instance in the list of tasks. For example only one variable task (see below) with a given variable name is allowed to execute. To specify several of them (with the same name) is perfectly okay, but you should notice that the earlier (according to the established order; see above) tasks are replaced/overridden by the later ones. This way, for example, a user can always override such tasks from any high/early scope, e.g., the project or branch scope, in his local Preferences scope.

The the engine calls the isNeeded() method on each task in the list and removes those that are not needed (possibly according to the state of the running IDE).

If now the list of needed tasks is not empty a confirmation dialog is displayed and when the user presses Install the perform() method is called on that tasks. The progress of the installation process is then displayed in a progress dialog. The installation can be canceled at any point in time.

Variables play a very important role in the execution process. While a project model can perfectly work without the declaration or use of variables the model is typically more flexible with them. A variable must always be declared with a Variable Task somewhere in the model. It must have a name and can have a value. If it has no value a prompt dialog is displayed early in the execution process. The user can enter the missing variable values, which are stored as variable tasks in the Preferences scope (see above). At execution time these Preferences-scoped variable tasks override the respective variable tasks that you have declared in your project model.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.