public static BaseListPopupStep<TypeForNewLibrary> createChooseTypeStep(final ClasspathPanel classpathPanel,
                                                                    final ParameterizedRunnable<? super LibraryType> action) {
    return new BaseListPopupStep<>(JavaUiBundle.message("popup.title.select.library.type"), getSuitableTypes(classpathPanel)) {
      @NotNull
      @Override
      public String getTextFor(TypeForNewLibrary value) {
        //noinspection HardCodedStringLiteral
        return value.getCreateActionName();
      }

      @Override
      public Icon getIconFor(TypeForNewLibrary aValue) {
        return aValue.getIcon();
      }

      @Override
      public PopupStep<?> onChosen(final TypeForNewLibrary selectedValue, boolean finalChoice) {
        return doFinalStep(() -> action.run(selectedValue.getType()));
      }
    };
  }
public static BaseListPopupStep<TypeForNewLibrary> createChooseTypeStep(final ClasspathPanel classpathPanel,
                                                                    final ParameterizedRunnable<? super LibraryType> action)