List<UnknownSdkFix> (@NotNull List<? extends UnknownSdkFix> fixes, @NotNull ProgressIndicator indicator) { List<UnknownSdkFix> otherFixes = new ArrayList<>(); List<UnknownMissingSdkFixLocal> localFixes = new ArrayList<>(); for (UnknownSdkFix fix : fixes) { var action = fix.getSuggestedFixAction(); if (action instanceof UnknownMissingSdkFixLocal) { localFixes.add((UnknownMissingSdkFixLocal)action); } else { otherFixes.add(fix); } } if (!localFixes.isEmpty()) { indicator.pushState(); indicator.setText(ProjectBundle.message("progress.text.configuring.sdks")); for (UnknownMissingSdkFixLocal fix : new ArrayList<>(localFixes)) { try { fix.applySuggestionBlocking(indicator); } catch (Throwable t) { LOG.warn("Failed to apply SDK fix: " + fix + ". " + t.getMessage(), t); localFixes.remove(fix); } } UnknownSdkBalloonNotification.getInstance(myProject).notifyFixedSdks(localFixes); indicator.popState(); } return otherFixes; }