Time for action – reporting progress
Normally when a Job
is running, it is necessary to periodically update the user to let them know the state of the progress. By default, if a Job
provides no information, a generic busy indicator is shown. When a Job
is executed, it is passed an IProgressMonitor
, which can be used to notify the user of the progress (and provide a way to cancel the operation). A progress monitor has a number of tasks, each of which has a total unit of work that it can do. For jobs that don't have a known amount of work, UNKNOWN
can be specified and it will display in a generic busy indicator.
- Open the
HelloHandler
and go to theexecute
method. In the innerrun
method, add abeginTask
at the beginning, and aworked
in the loop ...
Get Eclipse Plug-in Development Beginner's Guide - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.