private void reportAttributeProblem(final XmlTag tag,
                                               final String localName,
                                               final XmlAttribute attribute,
                                               @NotNull @InspectionMessage String localizedMessage) {

    final RemoveAttributeIntentionFix removeAttributeIntention = new RemoveAttributeIntentionFix(localName);

    if (tag instanceof HtmlTag) {
      return;
    }
    final HighlightInfoType tagProblemInfoType = HighlightInfoType.WRONG_REF;

    final ASTNode node = SourceTreeToPsiMap.psiElementToTree(attribute);
    assert node != null;
    final ASTNode child = XmlChildRole.ATTRIBUTE_NAME_FINDER.findChild(node);
    assert child != null;
    HighlightInfo.Builder builder = HighlightInfo.newHighlightInfo(tagProblemInfoType)
      .range(child)
      .descriptionAndTooltip(localizedMessage)
      .registerFix(removeAttributeIntention, List.of(), null, null, null);
    PsiFile file = tag.getContainingFile();
    if (file != null) {
      for (XmlUndefinedElementFixProvider fixProvider : XmlUndefinedElementFixProvider.EP_NAME.getExtensionList()) {
        IntentionAction[] fixes = fixProvider.createFixes(attribute);
        if (fixes != null) {
          for (IntentionAction action : fixes) {
            builder.registerFix(action, null, null, null, null);
          }
          break;
        }
      }
    }
    final HighlightInfo highlightInfo = builder.create();
    add(highlightInfo);
  }
private void reportAttributeProblem(final XmlTag tag,
                                               final String localName,
                                               final XmlAttribute attribute,
                                               @NotNull @InspectionMessage String localizedMessage)