Job checkUpdateJob = new Job(Messages.UpdateHandler_CHECK_UPDATE_JOB) {
@Override
protected IStatus run(final IProgressMonitor monitor) {
+
return checkForUpdates(agent, shell, sync, monitor);
}
};
+
checkUpdateJob.schedule();
// configure update operation
final ProvisioningSession session = new ProvisioningSession(agent);
+ logger.debug("Try to get updates" + System.currentTimeMillis());
operation = new UpdateOperation(session);
+
configureUpdate(operation);
-
+
// check for updates, this causes I/O
final IStatus status = operation.resolveModal(monitor);
-
+ logger.debug("update resolved " + System.currentTimeMillis() + "Status: " + status.toString());
// failed to find updates (inform user and exit)
if (status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE) {
showMessage(shell, sync);