void (Path newPluginsDir, ConfigImportOptions options, List<IdeaPluginDescriptor> incompatiblePlugins, ProgressIndicator indicator) { ThreadingAssertions.assertBackgroundThread(); Logger log = options.log; for (Iterator<IdeaPluginDescriptor> iterator = incompatiblePlugins.iterator(); iterator.hasNext(); ) { IdeaPluginDescriptor descriptor = iterator.next(); PluginId pluginId = descriptor.getPluginId(); try { PluginDownloader downloader = PluginDownloader.createDownloader(descriptor) .withErrorsConsumer(__ -> {}) .withDownloadService(options.downloadService); if (downloader.prepareToInstall(indicator)) { PluginInstaller.unpackPlugin(downloader.getFilePath(), newPluginsDir); log.info("Downloaded and unpacked compatible version of plugin '" + pluginId + "'"); iterator.remove(); } else if (isBrokenPlugin(descriptor, options.brokenPluginVersions)) { iterator.remove(); } } catch (ProcessCanceledException e) { log.info("Plugin download cancelled"); break; } catch (IOException e) { log.info("Failed to download and install compatible version of '" + pluginId + "': " + e.getMessage()); } } }