public void scheduled(IJobChangeEvent event) {
updateFor(event);
if (event.getJob().isUser()) {
boolean noDialog = shouldRunInBackground();
if (!noDialog) {
final IJobChangeEvent finalEvent = event;
WorkbenchJob showJob = new WorkbenchJob(
ProgressMessages.ProgressManager_showInDialogName) {
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor)
*/
public IStatus runInUIThread(
IProgressMonitor monitor) {
showInDialog(null, finalEvent.getJob());
return Status.OK_STATUS;
}
};
showJob.setSystem(true);
showJob.schedule();