@Nullable
  protected PsiElement getIdValueElement(PsiElement element) {
    if (element instanceof XmlTag tag) {
      XmlAttribute attribute = tag.getAttribute(IdReferenceProvider.ID_ATTR_NAME, null);
      if (!myIdAttrsOnly) {
        if (attribute == null) {
          attribute = tag.getAttribute(IdReferenceProvider.NAME_ATTR_NAME, null);
        }
        if (attribute == null) {
          attribute = tag.getAttribute(IdReferenceProvider.STYLE_ID_ATTR_NAME, null);
        }
      }
      return attribute != null ? attribute.getValueElement() : getImplicitIdRefValueElement(tag);
    }
    else {
      return element;
    }
  }
@Nullable
  protected PsiElement getIdValueElement(PsiElement element)