static HighlightInfo.Builder checkClassWithAbstractMethods(@NotNull PsiClass aClass, @NotNull PsiElement implementsFixElement, @NotNull TextRange range) {
    PsiMethod abstractMethod = ClassUtil.getAnyAbstractMethod(aClass);
    if (abstractMethod == null) {
      return null;
    }

    PsiClass containingClass = abstractMethod.getContainingClass();
    if (containingClass == null ||
        containingClass == aClass ||
        implementsFixElement instanceof PsiEnumConstant && !hasEnumConstantsWithInitializer(aClass)) {
      return null;
    }

    final String messageKey;
    final String referenceName;
    if (aClass instanceof PsiEnumConstantInitializer enumConstant) {
      messageKey = "enum.constant.must.implement.method";
      referenceName = enumConstant.getEnumConstant().getName();
    }
    else {
      messageKey = aClass.isEnum() || aClass.isRecord() || aClass instanceof PsiAnonymousClass
                   ? "class.must.implement.method"
                   : "class.must.be.abstract";
      referenceName = HighlightUtil.formatClass(aClass, false);
    }

    String message = JavaErrorBundle.message(messageKey,
                                             referenceName,
                                             JavaHighlightUtil.formatMethod(abstractMethod),
                                             HighlightUtil.formatClass(containingClass, false));
    HighlightInfo.Builder errorResult = HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(range).descriptionAndTooltip(message);
    PsiMethod anyMethodToImplement = ClassUtil.getAnyMethodToImplement(aClass);
    if (anyMethodToImplement != null) {
      if (!anyMethodToImplement.hasModifierProperty(PsiModifier.PACKAGE_LOCAL) ||
          JavaPsiFacade.getInstance(aClass.getProject()).arePackagesTheSame(aClass, containingClass)) {
        IntentionAction action = QuickFixFactory.getInstance().createImplementMethodsFix(implementsFixElement);
        errorResult.registerFix(action, null, null, null, null);
      }
      else {
        QuickFixAction.registerQuickFixActions(errorResult, null, JvmElementActionFactories.createModifierActions(anyMethodToImplement, MemberRequestsKt.modifierRequest(JvmModifier.PROTECTED, true)));
        QuickFixAction.registerQuickFixActions(errorResult, null, JvmElementActionFactories.createModifierActions(anyMethodToImplement, MemberRequestsKt.modifierRequest(JvmModifier.PUBLIC, true)));
      }
    }
    if (!(aClass instanceof PsiAnonymousClass) &&
        !aClass.isEnum()
        && aClass.getModifierList() != null
        && HighlightUtil.getIncompatibleModifier(PsiModifier.ABSTRACT, aClass.getModifierList()) == null) {
      IntentionAction action = QuickFixFactory.getInstance().createModifierListFix(aClass, PsiModifier.ABSTRACT, true, false);
      errorResult.registerFix(action, null, null, null, null);
    }
    return errorResult;
  }
static HighlightInfo.Builder checkClassWithAbstractMethods(@NotNull PsiClass aClass, @NotNull PsiElement implementsFixElement, @NotNull TextRange range)