public interface IRSEInteractionProvider
Interaction Provider Interface.
Classes implementing this interface provide a means for RSE to communicate
with the outside world: via progress monitors, events and messages. A UI
implementation of this interface would typically use UI components for user
interaction; although this can be changed also intermittently.
Non-UI headless applications may log messages rather than doing interactive
messages, and may use different Threads for sending messages.
EXPERIMENTAL. This class or interface has been added as
part of a work in progress. There is no guarantee that this API will work or
that it will remain the same. Please do not use this API without consulting
- org.eclipse.rse.core 3.0
- Return a default progress monitor for the context that's currently
Usually, long-running operations should always be created from the client
with a progress monitor that they can use. Historically, however, this
has not always been done and is especially problematic in operations that
are performed as the result of Callbacks.
For such situations, this method returns a default progress monitor in a
context that we guess. We try to use one default progress use one for all
phases of a single operation, such as connecting and resolving.
- a default progress monitor
void runInDefaultContext(boolean fork,
Runs the given
IRSERunnableWithProgress in the default
context available to this interaction provider, that provides a progress
monitor. For example, if the default context is a
ProgressMonitorDialog then the runnable is run using the
dialog's progress monitor. This method is derived from
false, the current thread is
used to run the runnable. Note that if
true, it is unspecified whether or not this method blocks
until the runnable has been run. Implementers should document whether the
runnable is run synchronously (blocking) or asynchronously
(non-blocking), or if no assumption can be made about the blocking
true if the runnable should be run in a
separate thread, and
false to run in the same
true to enable the cancellation, and
false to make the operation uncancellable
runnable - the runnable to run
- wraps any exception or error which
occurs while running the runnable
- propagated by the context if the runnable
acknowledges cancellation by throwing this exception. This
should not be thrown if cancellable is
- Asynchronously run the given runnable in a separate thread.
UI implementations should have the runnable run in the dispatch thread,
where it has access to UI components. This is used for notifications.
Non-UI applications may choose any Thread they like, provided that two
conditions are met:
- All Runnables are run on the same Thread.
- The ordering of Runnables remains intact.
runnable - the Runnable to run asynchronously
- Run the given runnable with "event" semantics, that is: asynchronously
run it through
asyncExec(Runnable) on the interaction provider's
designated event thread, unless the call is already coming from that very
In that case, the Runnable is run immediately and synchronously.
runnable - the Runnable to run asynchronously with "event" semantics
- Flush the Queue of Runnables enqueued with
This needs to be done when this interaction provider is to be replaced by
a different one, in order to ensure that the ordering of all Runnables
- Show the given message or log it.
In an interactive environment, this pops up a dialog asking the user to
press an OK button. The method will not return before the OK button is
msg - the message to show
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.