@Override
    public void visitAnnotation(@NotNull PsiAnnotation annotation) {
      super.visitAnnotation(annotation);
      final PsiAnnotationParameterList parameterList = annotation.getParameterList();
      final PsiJavaCodeReferenceElement nameReferenceElement = annotation.getNameReferenceElement();
      if (nameReferenceElement == null) {
        return;
      }
      final PsiElement[] annotationChildren = annotation.getChildren();
      if (annotationChildren.length >= 2 && annotationChildren[1] instanceof PsiWhiteSpace && !containsError(annotation)) {
        registerError(annotationChildren[1]);
        if (!isOnTheFly())  return;
      }
      if (annotationChildren.length >= 4) {
        PsiElement child = annotationChildren[annotationChildren.length - 2];
        if (child instanceof PsiWhiteSpace && !containsError(annotation)) {
          registerError(child);
          if (!isOnTheFly())  return;
        }
      }
      final PsiNameValuePair[] attributes = parameterList.getAttributes();
      if (attributes.length == 0) {
        if (parameterList.getFirstChild() != null && !containsError(annotation)) {
          registerError(parameterList, ProblemHighlightType.LIKE_UNUSED_SYMBOL, parameterList);
        }
      }
      else if (attributes.length == 1) {
        final PsiNameValuePair attribute = attributes[0];
        final PsiIdentifier identifier = attribute.getNameIdentifier();
        final PsiAnnotationMemberValue attributeValue = attribute.getValue();
        if (identifier != null && attributeValue != null) {
          @NonNls final String name = attribute.getName();
          if (PsiAnnotation.DEFAULT_REFERENCED_METHOD_NAME.equals(name) && !containsError(annotation)) {
            registerErrorAtOffset(attribute, 0, attributeValue.getStartOffsetInParent(),
                                  ProblemHighlightType.LIKE_UNUSED_SYMBOL, attribute);
            if (!isOnTheFly())  return;
          }
        }
        if (!(attributeValue instanceof PsiArrayInitializerMemberValue arrayValue)) {
          return;
        }
        final PsiAnnotationMemberValue[] initializers = arrayValue.getInitializers();
        if (initializers.length != 1) {
          return;
        }
        if (!containsError(annotation)) {
          registerError(arrayValue.getFirstChild(), ProblemHighlightType.LIKE_UNUSED_SYMBOL, arrayValue);
          if (!isOnTheFly())  return;
          registerError(arrayValue.getLastChild(), ProblemHighlightType.LIKE_UNUSED_SYMBOL, arrayValue);
        }
      }
      else {
        for (PsiNameValuePair attribute : attributes) {
          final PsiAnnotationMemberValue value = attribute.getValue();
          if (!(value instanceof PsiArrayInitializerMemberValue arrayValue)) {
            continue;
          }
          final PsiAnnotationMemberValue[] initializers = arrayValue.getInitializers();
          if (initializers.length != 1) {
            continue;
          }
          if (!containsError(annotation)) {
            registerError(arrayValue.getFirstChild(), ProblemHighlightType.LIKE_UNUSED_SYMBOL, arrayValue);
            if (!isOnTheFly())  return;
            registerError(arrayValue.getLastChild(), ProblemHighlightType.LIKE_UNUSED_SYMBOL, arrayValue);
          }
        }
      }
    }
@Override
    public void visitAnnotation(@NotNull PsiAnnotation annotation)