public abstract class LongRunningHandler extends SafeHandler
Constructor and Description |
---|
LongRunningHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
cancel() |
protected void |
checkCancelation(IProgressMonitor monitor) |
protected abstract void |
doExecute(IProgressMonitor progressMonitor)
Executes the long-running handler in a background job.
|
protected String |
getBundleID() |
protected int |
getTotalWork() |
protected void |
preRun() |
protected Object |
safeExecute(ExecutionEvent event) |
protected void |
setTotalWork(int totalWork) |
execute, extractEventDetails, getCommand, getSelection, getText, setEnabled, updateSelection
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
protected final int getTotalWork()
protected final void setTotalWork(int totalWork)
protected final void cancel()
protected final Object safeExecute(ExecutionEvent event) throws Exception
safeExecute
in class SafeHandler
Exception
protected String getBundleID()
protected abstract void doExecute(IProgressMonitor progressMonitor) throws Exception
ExecutionEvent
is not available because it is only valid during the
execution of the handler call-back on the UI thread. Any details required from
it must be extracted
before the job is scheduled.Exception
protected final void checkCancelation(IProgressMonitor monitor)
Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.