private static @Nullable TextRange getStartTagRange(ASTNode tagNode) {
    ASTNode startTagStart = XmlChildRole.START_TAG_START_FINDER.findChild(tagNode);
    if (startTagStart == null) {
      return null;
    }

    ASTNode tagName = TemplateLanguageUtil.getSameLanguageTreeNext(startTagStart);
    if (tagName == null || (tagName.getElementType() != XmlTokenType.XML_NAME && tagName.getElementType() != XmlTokenType.XML_TAG_NAME)) {
      return null;
    }

    ASTNode next = TemplateLanguageUtil.getSameLanguageTreeNext(tagName);
    if (next != null && next.getElementType() == XmlTokenType.XML_TAG_END) {
      tagName = next;
    }

    return new TextRange(startTagStart.getStartOffset(), tagName.getTextRange().getEndOffset());
  }
private static @Nullable TextRange getStartTagRange(ASTNode tagNode)