use of org.springsource.ide.eclipse.commons.livexp.core.ValidationResult in project eclipse-integration-commons by spring-projects.
the class WizardPageWithSections method scheduleUpdateJob.
private synchronized void scheduleUpdateJob() {
Shell shell = getShell();
if (shell != null) {
if (this.updateJob == null) {
this.updateJob = new UIJob("Update Wizard message") {
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
ValidationResult status = validator.getValue();
setErrorMessage(null);
setMessage(null);
if (status.isOk()) {
} else if (status.status == IStatus.ERROR) {
setErrorMessage(status.msg);
} else if (status.status == IStatus.WARNING) {
setMessage(status.msg, IMessageProvider.WARNING);
} else if (status.status == IStatus.INFO) {
setMessage(status.msg, IMessageProvider.INFORMATION);
} else {
setMessage(status.msg, IMessageProvider.NONE);
}
setPageComplete(status.isOk());
return Status.OK_STATUS;
}
};
updateJob.setSystem(true);
}
updateJob.schedule(MESSAGE_DELAY);
}
}
Aggregations