void (AnActionButton button) { final List<FrameworkType> types = new ArrayList<>(); for (FrameworkType type : FrameworkDetectorRegistry.getInstance().getFrameworkTypes()) { if (!isExcluded(type)) { types.add(type); } } types.sort((o1, o2) -> o1.getPresentableName().compareToIgnoreCase(o2.getPresentableName())); types.add(0, null); final ListPopup popup = JBPopupFactory.getInstance().createListPopup(new BaseListPopupStep<>( LangBundle.message("popup.title.framework.to.exclude"), types) { @Override public Icon getIconFor(FrameworkType value) { return value != null ? value.getIcon() : null; } @NotNull @Override public String getTextFor(FrameworkType value) { return value != null ? value.getPresentableName() : ProjectBundle.message("list.item.all.frameworks"); } @Override public boolean hasSubstep(FrameworkType selectedValue) { return selectedValue != null; } @Override public PopupStep onChosen(final FrameworkType frameworkType, boolean finalChoice) { if (frameworkType == null) { return doFinalStep(() -> chooseDirectoryAndAdd(null)); } else { return addExcludedFramework(frameworkType); } } }); final RelativePoint popupPoint = button.getPreferredPopupPoint(); popup.show(popupPoint); }