if (versionChecker.isNewerVersionAvailable()) {
monitor.worked(1);
Log.getInstance(VersionCheckerJob.class).info("New version available: " + versionChecker.getNewVersionAsString() + " (current: " + versionChecker.getCurrentVersionAsString() + ")."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
new NewVersionOSD(String.format(Messages.getString("VersionCheckerJob.NewVersionAvailable"), versionChecker.getNewVersionAsString()), //$NON-NLS-1$
Messages.getString("VersionCheckerJob.NewVersionWebSite"),
Controller.getInstance().getPreferenceStore().getString(PreferenceConstants.VERSION_UPDATE_URL)).start();
} else {
monitor.worked(1);
Log.getInstance(VersionCheckerJob.class).info("No new version available."); //$NON-NLS-1$
// Manuel check, user wait for an answer.
if (manualCheck) {
new NewVersionOSD(String.format(Messages.getString("VersionCheckerJob.NoNewVersionAvailable"), versionChecker.getNewVersionAsString()), //$NON-NLS-1$
Messages.getString("VersionCheckerJob.NoNewVersionAvailableStayTuned"),
"").start(); //$NON-NLS-1$
}
}
} else {
monitor.worked(1);
Log.getInstance(VersionCheckerJob.class).info("Unable to check for new version (not connected to Internet or website unreachable)."); //$NON-NLS-1$
// Manuel check, user wait for an answer.
if (manualCheck) {
new NewVersionOSD(String.format(Messages.getString("VersionCheckerJob.CheckVersionError"), versionChecker.getNewVersionAsString()), //$NON-NLS-1$
Messages.getString("VersionCheckerJob.CheckVersionErrorExplanation"),
"").start(); //$NON-NLS-1$
}
}