UpdateSearchScope scope = new UpdateSearchScope();
scope.addSearchSite("RSSOwl.org", new URL(UPDATE_SITE), null); //$NON-NLS-1$
scope.setFeatureProvidedSitesEnabled(false);
/* Run in Update Job */
final UpdateJob job = new UpdateJob(Messages.FindUpdatesAction_UPDATE_SEARCH, true, false);
job.getSearchRequest().setScope(scope);
job.addJobChangeListener(new JobChangeAdapter() {
@Override
public void done(IJobChangeEvent event) {
JobRunner.runInUIThread(fShell, new Runnable() {
public void run() {
if (Controller.getDefault().isShuttingDown() || (fShell != null && fShell.isDisposed()))
return;
if (job.getStatus().isOK())
handleUpdates(job.getUpdates());
else
handleError(job.getStatus());
}
});
}
});
if (fUserInitiated) {
job.setUser(true);
job.setPriority(Job.INTERACTIVE);
} else {
job.setUser(false);
job.setSystem(true);
}
/* Schedule */
job.schedule();
} catch (MalformedURLException e) {
Activator.safeLogError(e.getMessage(), e);
}
}