List<PsiMethod> (List<MemberInfo> candidates, String newClassName, Project project) { if (ApplicationManager.getApplication().isUnitTestMode()) { return ContainerUtil.map(candidates, c -> (PsiMethod)c.getMember()); } MemberSelectionPanel panel = new MemberSelectionPanel(JavaCompilerBundle.message("separator.choose.members.to.delete", newClassName), candidates, null); DialogWrapper dlg = new DialogWrapper(project, false) { { setOKButtonText(CommonBundle.message("button.without.mnemonic.remove")); setTitle(JavaCompilerBundle.message("choose.members")); init(); } @NotNull @Override protected JComponent createCenterPanel() { return panel; } }; return dlg.showAndGet() ? ContainerUtil.map(panel.getTable().getSelectedMemberInfos(), info -> (PsiMethod)info.getMember()) : Collections.emptyList(); }