PopupStep (final @NotNull FrameworkType frameworkType) { String projectItem = LangBundle.message("list.item.disable.framework.detection.in.whole.project"); return new BaseListPopupStep<>(null, projectItem, LangBundle.message("list.item.disable.framework.detection.in.directory")) { @Override public PopupStep onChosen(String selectedValue, boolean finalChoice) { if (selectedValue.equals(projectItem)) { addAndRemoveDuplicates(frameworkType, null); return FINAL_CHOICE; } else { return doFinalStep(() -> chooseDirectoryAndAdd(frameworkType)); } } }; }