public static int getTextOffset(@NotNull ASTNode node) {
    if (is(node, BASIC_LOCAL_VARIABLE, BASIC_PATTERN_VARIABLE, BASIC_RECORD_COMPONENT,
           BASIC_RECEIVER_PARAMETER, BASIC_MODULE,
           BASIC_IMPORT_STATIC_REFERENCE, BASIC_JAVA_CODE_REFERENCE)) {
      ASTNode identifier = findChildByType(node, JavaTokenType.IDENTIFIER);
      if (identifier != null) {
        return identifier.getStartOffset();
      }
    }
    if (is(node, BASIC_REFERENCE_EXPRESSION)) {
      ASTNode identifier = findChildByType(node, JavaTokenType.IDENTIFIER, JavaTokenType.THIS_KEYWORD, JavaTokenType.SUPER_KEYWORD);
      if (identifier != null) {
        return identifier.getStartOffset();
      }
    }
    ASTNode doc = findChildByType(node, JavaDocTokenType.DOC_TAG_VALUE_TOKEN);
    if (doc != null) {
      return doc.getStartOffset();
    }
    return node.getStartOffset();
  }
public static int getTextOffset(@NotNull ASTNode node)