コード例 #1
0
 public void addPluginUpdateListener(PluginUpdateListener listener) {
   pluginUpdateListeners.add(listener);
   if (updates != null) {
     listener.pluginUpdateCheckComplete(updates, updatesForced);
   } else if (!updateChecker.updateChecksGloballyDisabled()) {
     checkForUpdates(false);
   }
 }
コード例 #2
0
 @Override
 public void pluginUpdateCheckComplete(
     List<UpdateChecker.PluginUpdate> newUpdates, boolean force) {
   this.updates = newUpdates;
   this.updatesForced = force;
   for (PluginUpdateListener listener : pluginUpdateListeners) {
     try {
       listener.pluginUpdateCheckComplete(newUpdates, force);
     } catch (Throwable e) {
       LOGGER.log(Level.INFO, "Error during update check callback", e);
     }
   }
 }