Search in sources :

Example 1 with UsesAndInterfacesDependencyMemberInfoModel

use of com.intellij.refactoring.util.classMembers.UsesAndInterfacesDependencyMemberInfoModel in project intellij-community by JetBrains.

the class ExtractSuperclassDialog method createCenterPanel.

protected JComponent createCenterPanel() {
    JPanel panel = new JPanel(new BorderLayout());
    final MemberSelectionPanel memberSelectionPanel = new MemberSelectionPanel(RefactoringBundle.message("members.to.form.superclass"), myMemberInfos, RefactoringBundle.message("make.abstract"));
    panel.add(memberSelectionPanel, BorderLayout.CENTER);
    final MemberInfoModel<PsiMember, MemberInfo> memberInfoModel = new UsesAndInterfacesDependencyMemberInfoModel<PsiMember, MemberInfo>(mySourceClass, null, false, myContainmentVerifier) {

        @Override
        public Boolean isFixedAbstract(MemberInfo member) {
            return Boolean.TRUE;
        }
    };
    memberInfoModel.memberInfoChanged(new MemberInfoChange<>(myMemberInfos));
    memberSelectionPanel.getTable().setMemberInfoModel(memberInfoModel);
    memberSelectionPanel.getTable().addMemberInfoChangeListener(memberInfoModel);
    panel.add(myDocCommentPanel, BorderLayout.EAST);
    return panel;
}
Also used : MemberInfo(com.intellij.refactoring.util.classMembers.MemberInfo) MemberSelectionPanel(com.intellij.refactoring.ui.MemberSelectionPanel) UsesAndInterfacesDependencyMemberInfoModel(com.intellij.refactoring.util.classMembers.UsesAndInterfacesDependencyMemberInfoModel) PsiMember(com.intellij.psi.PsiMember)

Aggregations

PsiMember (com.intellij.psi.PsiMember)1 MemberSelectionPanel (com.intellij.refactoring.ui.MemberSelectionPanel)1 MemberInfo (com.intellij.refactoring.util.classMembers.MemberInfo)1 UsesAndInterfacesDependencyMemberInfoModel (com.intellij.refactoring.util.classMembers.UsesAndInterfacesDependencyMemberInfoModel)1