public static void suggestRemoveIncompatibleFramework(
            @NotNull ModifiableRootModel rootModel,
            @NotNull Set<? extends LibraryKind> frameworkLibraryKinds,
            @NotNull String presentableName
    ) {
        List<OrderEntry> existingEntries = new ArrayList<>();

        for (OrderEntry entry : rootModel.getOrderEntries()) {
            if (!(entry instanceof LibraryOrderEntry)) continue;
            Library library = ((LibraryOrderEntry)entry).getLibrary();
            if (library == null) continue;

            for (LibraryKind kind : frameworkLibraryKinds) {
                if (LibraryPresentationManager.getInstance().isLibraryOfKind(Arrays.asList(library.getFiles(OrderRootType.CLASSES)), kind)) {
                    existingEntries.add(entry);
                }
            }
        }

        removeWithConfirm(
                rootModel, existingEntries,
                KotlinJvmBundle.message("frameworks.remove.conflict.question", presentableName),
                KotlinJvmBundle.message("frameworks.remove.conflict.title")
        );
    }
public static void suggestRemoveIncompatibleFramework(
            @NotNull ModifiableRootModel rootModel,
            @NotNull Set<? extends LibraryKind> frameworkLibraryKinds,
            @NotNull String presentableName
    )