Job job = new Job("") { //$NON-NLS-1$
@Override
protected IStatus run(final IProgressMonitor monitor) {
/* Poll the next Task */
final ITask task = fOpenTasksQueue.poll();
/* Queue is empty - so all work is done */
if (task == null)
return Status.OK_STATUS;
/* Perform the Operation if not yet Cancelled */
if (!monitor.isCanceled()) {
SafeRunner.run(new LoggingSafeRunnable() {
public void run() throws Exception {
IStatus status = task.run(monitor);
/* Log anything that is an Error or Warning */
if (status.getSeverity() == IStatus.ERROR || status.getSeverity() == IStatus.WARNING)
Activator.getDefault().getLog().log(status);
}