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

Eclipse4/ProgressView

< Eclipse4
Revision as of 10:08, 10 March 2014 by Sudol.wojciech.gmail.com (Talk | contribs) (Created page with "As a part of the process of decoupling Eclipse services from workbench, the Progress View has been extracted to a separate plug-in and refactored in order to be available for ...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

As a part of the process of decoupling Eclipse services from workbench, the Progress View has been extracted to a separate plug-in and refactored in order to be available for Eclipse4 applications.

Currently, the Progress View plug-in is not shipped with Eclipse SDK packages, but it can be installed from update site: https://hudson.eclipse.org/platform/job/eclipse4-progress-view/lastSuccessfulBuild/artifact/releng/org.eclipse.e4.ui.progress.update/target/repository/

Source code can be downloaded from git repository: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/bundles/org.eclipse.e4.ui.progress

The Progress View can be added to an application in 3 easy steps:

  1. Add the Progress View plug-in (org.eclipse.e4.ui.progress) to your application dependencies.
  2. In your application model (*.e4xmi file) create a new Addon and set its Class URI to "bundleclass://org.eclipse.e4.ui.progress/org.eclipse.e4.ui.progress.ProgressViewAddon". The main purpose of this addon is to initialize the Progress View when apllication starts. It is necessary in order to make the Progress View able to show jobs that were started before the view was open.
  3. Add a new Part to your application model and set its Class URI to "bundleclass://org.eclipse.e4.ui.progress/org.eclipse.e4.ui.progress.ProgressView"

Alternatively, model processor can be used instead of model fragment to add the elements to model.

Progress View plug-in provides also:

  • IProgressService - registered in Eclipse Context, can be used to show progress for both background operations and operations that run in the UI thread
  • a ToolControl that can show in a ToolBar (eg. status line) information about running jobs - bundleclass://org.eclipse.e4.ui.progress/org.eclipse.e4.ui.progress.internal.ProgressRegion
  • a preference dialog which allows to adjust the Progress View settings - org.eclipse.e4.ui.progress.internal.JobsViewPreferenceDialog
  • handlers:
    • to open and bring to top the Progress View - org.eclipse.e4.ui.progress.OpenProgressViewHandler
    • to open the preference dialog - org.eclipse.e4.ui.progress.OpenPreferenceDialogHandler
    • to remove finished jobs from the Progress View - org.eclipse.e4.ui.progress.ClearAllHandler

A complete example how to use the Progress View is presented in the org.eclipse.e4.ui.examples.job plug-in (http://git.eclipse.org/c/platform/eclipse.platform.ui.git/tree/examples/org.eclipse.e4.ui.examples.job). It extends the Contacts Demo application (org.eclipse.e4.demo.contacts) by adding the Progress View and Job Factory View. These views are added to the application through model fragment files: progress_view.e4xmi and job_factory_view.e4xmi. The Job Factory View allows to easily test the Progress View by providing an interface to create and manage jobs manually.

The Progress View is still under development, which is tracked in bugzilla - https://bugs.eclipse.org/bugs/show_bug.cgi?id=429505 .

Back to the top