private static @NotNull List<PluginDownloader> downloadPluginUpdates(@NotNull Collection<PluginDownloader> toDownload,
                                                                       @NotNull ProgressIndicator indicator) {
    LinkedHashSet<@Nls String> errors = new LinkedHashSet<>();
    try {
      List<PluginDownloader> downloaders = ContainerUtil.map(toDownload,
                                                             downloader -> downloader.withErrorsConsumer(errors::add));
      return UpdateInstaller.downloadPluginUpdates(downloaders, indicator);
    }
    finally {
      if (!errors.isEmpty()) {
        String text = String.join("\n\n", errors); //NON-NLS
        PluginDownloader.showErrorDialog(text);
      }
    }
  }
private static @NotNull List<PluginDownloader> downloadPluginUpdates(@NotNull Collection<PluginDownloader> toDownload,
                                                                       @NotNull ProgressIndicator indicator)