/* Only run if not canceld yet */
if (!monitor.isCanceled())
synchronizedSafeRunInBackground(monitor);
/* Schdule UIJob now */
UIJob uiJob = new UIJob(NAME) {
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
/* If Control is provided, check disposed State */
if (fControl != null && fControl.isDisposed())
return Status.OK_STATUS;
/* Run UI-Task */
synchronizedSafeRunInUI(monitor);
return Status.OK_STATUS;
}
/*
* @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
*/
@Override
public boolean belongsTo(Object family) {
if (fFamily == null)
return super.belongsTo(family);
return fFamily.equals(family);
}
};
uiJob.setSystem(true);
uiJob.setUser(false);
/* Only run if not canceld yet */
if (!monitor.isCanceled())
uiJob.schedule();
monitor.done();
return Status.OK_STATUS;
}