package defines interfaces for
long-running operations that require progress indicators or allow user
cancellation of the operation. These interfaces are used in the implementation
of the workbench progress dialogs and views.
In general, plug-ins should use the workbench support provided in
for running long operations, so that all plug-ins will have a consistent presentation
of progress. See
Workbench Concurrency Support for
a complete discussion of the available support for progress dialogs and views. The remainder
of this discussion highlights the details of the JFace operations infrastructure which is
used by the workbench.
Runnables and progress
The platform runtime defines a common interface,
which is used to report progress to the user while long running
operations are in progress. The client can provide a monitor as a
parameter in many platform API methods when it is important to show
progress to the user.
JFace defines more specific interfaces for objects that implement
the user interface for a progress monitor.
is the interface for a long-running
operation. The run
method for this interface has an
parameter that is used to report progress and check for user
is the interface for the different places in the UI where progress can
reported. Classes that implement this interface may choose to use
different techniques for showing progress and running the
implements this interface by showing a progress dialog.
implements this interface by showing progress in the workbench window's
implements this interface to show long running operations inside the wizard status line.
Note: The workbench UI provides additional support for operations in
This class simplifies the implementation of long-running operations that modify the workspace. It maps between
See the javadoc for further detail.
class is provided to run an operation that is
modal from the client code's perspective.
It is used inside the different implementations of
If your plug-in needs to wait on the completion of a long-running
operation before continuing
can be used to accomplish this while still keeping the user interface
When you run an operation in a modal context, you can choose to fork
the operation in a different thread. If
fork is false, the operation will be run in the
calling thread. If fork is true, the
operation will be run in a new thread, the calling thread will be
the UI event loop will be run until the operation
For more information on the UI event loop, see Threading issues for clients.