List<DetectedFrameworkDescription> (@NotNull List<? extends DetectedFrameworkDescription> currentDescriptions, @NotNull List<? extends DetectedFrameworkDescription> allDescriptions) { List<DetectedFrameworkDescription> disabled = new ArrayList<>(); for (DetectedFrameworkDescription description : currentDescriptions) { if (!description.canSetupFramework(allDescriptions)) { disabled.add(description); } } if (!disabled.isEmpty()) { List<DetectedFrameworkDescription> remaining = new ArrayList<>(currentDescriptions); remaining.removeAll(disabled); disabled.addAll(doGetDisabledDescriptions(remaining, allDescriptions)); } return disabled; }