void (final PsiField field, Editor editor) { final Project project = field.getProject(); final Set<PsiMethod> delegating = DelegationUtils.getDelegatingMethodsForField(field); if (delegating.isEmpty()) { final String message = RefactorJBundle.message("cannot.perform.the.refactoring") + JavaRareRefactoringsBundle.message("field.selected.is.not.used.as.a.delegate"); CommonRefactoringUtil.showErrorHint(project, editor, message, getRefactoringNameText(), getHelpID()); return; } MemberInfo[] infos = new MemberInfo[delegating.size()]; int i = 0; for (PsiMethod method : delegating) { final MemberInfo memberInfo = new MemberInfo(method); memberInfo.setChecked(true); memberInfo.setToAbstract(method.findDeepestSuperMethods().length == 0); infos[i++] = memberInfo; } new RemoveMiddlemanDialog(field, infos).show(); }