static HighlightInfo.Builder checkAccessStaticFieldFromEnumConstructor(@NotNull PsiReferenceExpression expr,
                                                                         @NotNull JavaResolveResult result) {
    PsiField field = ObjectUtils.tryCast(result.getElement(), PsiField.class);
    if (field == null) return null;

    PsiClass enumClass = getEnumClassForExpressionInInitializer(expr);
    if (enumClass == null || !isRestrictedStaticEnumField(field, enumClass)) return null;

    int fieldType = field instanceof PsiEnumConstant ? 2 : 1;
    PsiMember initializer = PsiUtil.findEnclosingConstructorOrInitializer(expr);
    int initializerType;
    if (initializer instanceof PsiMethod) {
      initializerType = 1;
    }
    else if (initializer instanceof PsiField) {
      initializerType = 2;
    }
    else {
      initializerType = 3;
    }
    String description = JavaErrorBundle.message("illegal.to.access.static.member.from.enum.constructor.or.instance.initializer",
                                                 fieldType, initializerType);
    return HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(expr).descriptionAndTooltip(description);
  }
static HighlightInfo.Builder checkAccessStaticFieldFromEnumConstructor(@NotNull PsiReferenceExpression expr,
                                                                         @NotNull JavaResolveResult result)