private static void downloadUpdatesForIncompatiblePlugins(Path newPluginsDir,  ConfigImportOptions options, List<IdeaPluginDescriptor> incompatiblePlugins) {
    if (options.headless) {
      PluginDownloader.runSynchronouslyInBackground(() -> {
        ProgressIndicator progressIndicator =
          options.headlessProgressIndicator == null ? new EmptyProgressIndicator() : options.headlessProgressIndicator;
        downloadUpdatesForIncompatiblePlugins(newPluginsDir, options, incompatiblePlugins, progressIndicator);
      });
    }
    else {
      ThreadingAssertions.assertEventDispatchThread();

      ConfigImportProgressDialog dialog = new ConfigImportProgressDialog();
      dialog.setModalityType(Dialog.ModalityType.TOOLKIT_MODAL);
      AppUIUtilKt.updateAppWindowIcon(dialog);
      hideSplash();
      PluginDownloader.runSynchronouslyInBackground(() -> {
        try {
          downloadUpdatesForIncompatiblePlugins(newPluginsDir, options, incompatiblePlugins, dialog.getIndicator());
        }
        catch (Throwable e) {
          options.log.info("Failed to download updates for plugins", e);
        }
        SwingUtilities.invokeLater(() -> dialog.setVisible(false));
      });
      dialog.setVisible(true);
    }
  }
private static void downloadUpdatesForIncompatiblePlugins(Path newPluginsDir,  ConfigImportOptions options, List<IdeaPluginDescriptor> incompatiblePlugins)