Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.jface.operation
Interface IRunnableContext

All Known Subinterfaces:
  ILaunchConfigurationDialog, IProgressService, IWizardContainer, IWizardContainer2, IWorkbenchSiteProgressService, IWorkbenchWindow

All Known Implementing Classes:
  ApplicationWindow, ProgressMonitorDialog, WizardDialog

public interface IRunnableContext

Interface for UI components which can execute a long-running operation in the form of an `IRunnableWithProgress`. The context is responsible for displaying a progress indicator and Cancel button to the end user while the operation is in progress; the context supplies a progress monitor to be used from code running inside the operation. Note that an `IRunnableContext` is not a runnable itself.

For examples of UI components which implement this interface, see `ApplicationWindow`, `ProgressMonitorDialog`, and `WizardDialog`.

See Also:
  `IRunnableWithProgress`, `ApplicationWindow`, `ProgressMonitorDialog`, `WizardDialog`

Method Summary
`void` | `run(boolean fork, boolean cancelable, IRunnableWithProgress runnable)` Runs the given `IRunnableWithProgress` in this context.

Method Detail

### run

    public void run(boolean fork,
                    boolean cancelable,
                    IRunnableWithProgress runnable)
             throws InvocationTargetException,
                    InterruptedException

  Runs the given `IRunnableWithProgress` in this context. For example, if this is a `ProgressMonitorDialog` then the runnable is run using this dialog's progress monitor.

  Parameters:
    `fork` - `true` if the runnable should be run in a separate thread, and `false` to run in the same thread
    `cancelable` - `true` to enable the cancelation, and `false` to make the operation uncancellable
    `runnable` - the runnable to run
  Throws:
    `InvocationTargetException` - wraps any exception or error which occurs while running the runnable
    `InterruptedException` - propagated by the context if the runnable acknowledges cancelation by throwing this exception. This should not be thrown if cancelable is `false`.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.