private void invoke(DataContext dataContext, PsiClass aClass, Set<PsiElement> selectedMembers) {
    final Editor editor = dataContext != null ? CommonDataKeys.EDITOR.getData(dataContext) : null;
    if (aClass == null) {
      String message =
        RefactoringBundle.getCannotRefactorMessage(RefactoringBundle.message("is.not.supported.in.the.current.context",
                                                                             getRefactoringName()));
      CommonRefactoringUtil.showErrorHint(myProject, editor, message, getRefactoringName(), HelpID.MEMBERS_PULL_UP);
      return;
    }

    List<PsiClass> bases = RefactoringHierarchyUtil.createBasesList(aClass, false, true);
    if (bases.isEmpty()) {
      final PsiClass containingClass = aClass.getContainingClass();
      if (containingClass != null) {
        invoke(dataContext, containingClass, Set.of(aClass));
        return;
      }
      String message = RefactoringBundle.getCannotRefactorMessage(
        RefactoringBundle.message("class.does.not.have.base.classes.interfaces.in.current.project", aClass.getQualifiedName()));
      CommonRefactoringUtil.showErrorHint(myProject, editor, message, getRefactoringName(), HelpID.MEMBERS_PULL_UP);
      return;
    }

    if (!CommonRefactoringUtil.checkReadOnlyStatus(myProject, aClass)) return;
    mySubclass = aClass;
    MemberInfoStorage memberInfoStorage = new MemberInfoStorage(mySubclass, element -> {
      if (mySubclass.isEnum()) {
        if (element instanceof PsiMethod method &&
            HighlightMethodUtil.isEnumSyntheticMethod(method.getSignature(PsiSubstitutor.EMPTY), aClass.getProject())) {
          return false;
        }
        else if (element instanceof PsiEnumConstant || element instanceof PsiClassInitializer) {
          return false;
        }
        else if (element instanceof PsiField field && !field.hasModifierProperty(PsiModifier.STATIC)) {
          return false;
        }
      }
      return true;
    });
    List<MemberInfo> members = memberInfoStorage.getClassMemberInfos(mySubclass);

    for (MemberInfo memberInfo : members) {
      if (selectedMembers.contains(memberInfo.getMember())) {
        memberInfo.setChecked(true);
      }
    }

    new PullUpDialog(myProject, aClass, bases, memberInfoStorage, this).show();
  }
private void invoke(DataContext dataContext, PsiClass aClass, Set<PsiElement> selectedMembers)