void (@NotNull List<? extends UrlInfo> urls) { List<UrlInfo> infos = new ArrayList<>(); List<@Nls String> results = new ArrayList<>(); for (UrlInfo info : urls) { info.progress = true; infos.add(info); results.add(null); } myTable.repaint(); ProgressManager.getInstance().run(new Task.Backgroundable(null, IdeBundle.message("progress.title.checking.plugins.repository"), true) { @Override public void run(@NotNull ProgressIndicator indicator) { for (int i = 0, size = infos.size(); i < size; i++) { try { if (RepositoryHelper.loadPlugins(infos.get(i).name, null, indicator).isEmpty()) { results.set(i, IdeBundle.message("error.no.plugins.found")); } } catch (Exception ignore) { results.set(i, IdeBundle.message("error.connection.failed")); } } } @Override public void onSuccess() { finish(true); } @Override public void onCancel() { finish(false); } private void finish(boolean success) { ApplicationManager.getApplication().invokeLater(() -> { if (success) { for (int i = 0, size = infos.size(); i < size; i++) { UrlInfo info = infos.get(i); info.errorTooltip = results.get(i); info.progress = false; } } else { for (UrlInfo info : infos) { info.progress = false; } } myTable.repaint(); }, ModalityState.any()); } }); }