void (JPanel panel) { myJavaDocPanel = new DocCommentPanel(JavaRefactoringBundle.message("javadoc.for.abstracts")); myJavaDocPanel.setPolicy(JavaRefactoringSettings.getInstance().PULL_UP_MEMBERS_JAVADOC); boolean hasJavadoc = false; for (GrMemberInfo info : myMemberInfos) { final PsiMember member = info.getMember(); if (myMemberInfoModel.isAbstractEnabled(info) && member instanceof PsiDocCommentOwner && ((PsiDocCommentOwner)member).getDocComment() != null) { hasJavadoc = true; break; } } UIUtil.setEnabled(myJavaDocPanel, hasJavadoc, true); panel.add(myJavaDocPanel, BorderLayout.EAST); }