@Override
  public ProblemDescriptor @Nullable [] checkClass(@NotNull UClass node, @NotNull InspectionManager manager, boolean isOnTheFly) {
    PsiElement sourcePsi = node.getSourcePsi();
    if (sourcePsi == null) return ProblemDescriptor.EMPTY_ARRAY;
    PsiClass psiClass = node.getJavaPsi();
    if (psiClass.isInterface()) return ProblemDescriptor.EMPTY_ARRAY;
    if (!InheritanceUtil.isInheritor(psiClass, LocalQuickFix.class.getName()) &&
        !InheritanceUtil.isInheritor(psiClass, IntentionAction.class.getName())) {
      return ProblemDescriptor.EMPTY_ARRAY;
    }
    if (hasCustomPreviewStrategy(psiClass)) return ProblemDescriptor.EMPTY_ARRAY;
    ProblemsHolder holder = new ProblemsHolder(manager, sourcePsi.getContainingFile(), isOnTheFly);
    // PSI mirror of FileModifier#getFileModifierForPreview implementation
    for (PsiField field : psiClass.getFields()) {
      if (field.hasModifierProperty(PsiModifier.STATIC)) continue;
      boolean safeType = hasSafeType(field);
      PsiAnnotation annotation = field.getAnnotation(FileModifier.SafeFieldForPreview.class.getCanonicalName());
      boolean hasSafeFieldAnnotation = annotation != null;
      if (hasSafeFieldAnnotation != safeType) continue;
      PsiElement psiAnchor = getAnchor(field);
      if (psiAnchor == null) continue;
      if (safeType) {
        PsiElement anchor = getAnchor(annotation);
        if (anchor != null) {
          holder.registerProblem(anchor, DevKitBundle.message("inspection.message.unnecessary.safe.field.annotation"),
                                 new RemoveAnnotationQuickFix(annotation, field));
        }
      } else {
        holder.registerProblem(psiAnchor,
                               DevKitBundle.message("inspection.message.field.may.prevent.intention.preview.to.work.properly"),
                               new AddAnnotationFix(FileModifier.SafeFieldForPreview.class.getCanonicalName(), field));
      }
    }
    return holder.getResultsArray();
  }
@Override
  public ProblemDescriptor @Nullable [] checkClass(@NotNull UClass node, @NotNull InspectionManager manager, boolean isOnTheFly)