public void onDescriptorDownload(@NotNull IdeaPluginDescriptor descriptor){
  PluginId id=descriptor.getPluginId();
  IdeaPluginDescriptor existing=PluginManager.getPlugin(id);
  if (existing == null || existing.isBundled() || wasUpdated(id)) {
    return;
  }
  boolean newer=PluginDownloader.compareVersionsSkipBroken(existing,descriptor.getVersion()) > 0 && !PluginManagerCore.isIncompatible(descriptor);
  String idString=id.getIdString();
synchronized (myLock) {
    List<String> outdatedPlugins=myUpdateSettings.getOutdatedPlugins();
    if (newer) {
      if (!outdatedPlugins.contains(idString)) {
        outdatedPlugins.add(idString);
      }
    }
 else {
      outdatedPlugins.remove(idString);
    }
  }
}

public void onDescriptorDownload ( @ NotNull IdeaPluginDescriptor descriptor ) { PluginId id = descriptor . getPluginId ( ) ; IdeaPluginDescriptor existing = PluginManager . getPlugin ( id ) ; if ( existing == null || existing . isBundled ( ) || wasUpdated ( id ) ) { return ; } boolean newer = PluginDownloader . compareVersionsSkipBroken ( existing , descriptor . getVersion ( ) ) > 0 && ! PluginManagerCore . isIncompatible ( descriptor ) ; String idString = id . getIdString ( ) ; synchronized ( myLock ) { List < String > outdatedPlugins = myUpdateSettings . getOutdatedPlugins ( ) ; if ( newer ) { if ( ! outdatedPlugins . contains ( idString ) ) { outdatedPlugins . add ( idString ) ; } } else { outdatedPlugins . remove ( idString ) ; } } }
should be called whenever a list of plugins is loaded from a repository to check if there is an updated version .
