public @NotNull Pair<JavadocParameterInfo, List<JavadocParameterInfo>> parse(@NotNull PsiFile psiFile,
                                                                               @NotNull Editor editor,
                                                                               int offset) {
    List<JavadocParameterInfo> result = new ArrayList<>();
    PsiDocumentManager.getInstance(psiFile.getProject()).commitDocument(editor.getDocument());
    final PsiElement elementAtCaret = psiFile.findElementAt(offset);
    if (elementAtCaret == null) {
      return EMPTY;
    }

    ASTNode nodeAtCaret = BasicJavaAstTreeUtil.toNode(elementAtCaret);
    ASTNode tag = BasicJavaAstTreeUtil.getParentOfType(nodeAtCaret, TAG_TOKEN_SET);
    if (tag == null) {
      // Due to javadoc PSI specifics.
      if (BasicJavaAstTreeUtil.isWhiteSpace(nodeAtCaret)) {
        for (ASTNode e = nodeAtCaret.getTreePrev(); e != null && tag == null; e = e.getTreePrev()) {
          tag = BasicJavaAstTreeUtil.getParentOfType(e, TAG_TOKEN_SET, false);
          if (e instanceof PsiWhiteSpace
              || (e.getElementType() == JavaDocTokenType.DOC_COMMENT_LEADING_ASTERISKS)) {
            continue;
          }
          break;
        }
      }
    }
    if (tag == null) {
      return EMPTY;
    }

    JavadocParameterInfo anchorInfo = parse(tag, editor);
    if (anchorInfo == null) {
      return EMPTY;
    }

    // Parse previous parameters.
    for (ASTNode n = tag.getTreePrev(); n != null; n = n.getTreePrev()) {
      JavadocParameterInfo info = parse(n, editor);
      if (info == null) {
        break;
      }
      result.add(0, info);
    }

    result.add(anchorInfo);

    // Parse subsequent parameters.
    for (ASTNode n = tag.getTreeNext(); n != null; n = n.getTreeNext()) {
      JavadocParameterInfo info = parse(n, editor);
      if (info == null) {
        break;
      }
      result.add(info);
    }

    return Pair.create(anchorInfo, result);
  }
public @NotNull Pair<JavadocParameterInfo, List<JavadocParameterInfo>> parse(@NotNull PsiFile psiFile,
                                                                               @NotNull Editor editor,
                                                                               int offset)