Re: RFR: JDK-8298405: Implement JEP 467: Markdown Documentation Comments [v55]

2024-04-09 Thread Pavel Rappo
On Mon, 8 Apr 2024 21:12:42 GMT, Jonathan Gibbons  wrote:

>> Please review a patch to add support for Markdown syntax in documentation 
>> comments, as described in the associated JEP.
>> 
>> Notable features:
>> 
>> * support for `///` documentation comments in `JavaTokenizer`
>> * new module `jdk.internal.md` -- a private copy of the `commonmark-java` 
>> library
>> * updates to `DocCommentParser` to treat `///` comments as Markdown
>> * updates to the standard doclet to render Markdown comments in HTML
>
> Jonathan Gibbons has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   add support for JDK-8329296: Update Elements for '///' documentation 
> comments

Changes for 21f5b00 mostly look good, but I'm not a compiler person.

src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java 
line 443:

> 441: @DefinedBy(Api.LANGUAGE_MODEL)
> 442: public CommentKind getDocCommentKind(Element e) {
> 443: return  getDocCommentItem(e, ((docCommentTable, tree) -> 
> docCommentTable.getCommentKind(tree)));

Nit:
Suggestion:

return getDocCommentItem(e, ((docCommentTable, tree) -> 
docCommentTable.getCommentKind(tree)));

src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java 
line 443:

> 441: @DefinedBy(Api.LANGUAGE_MODEL)
> 442: public CommentKind getDocCommentKind(Element e) {
> 443: return  getDocCommentItem(e, ((docCommentTable, tree) -> 
> docCommentTable.getCommentKind(tree)));

Again:
Suggestion:

return getDocCommentItem(e, ((docCommentTable, tree) -> 
docCommentTable.getCommentKind(tree)));

src/jdk.compiler/share/classes/com/sun/tools/javac/tree/DocCommentTable.java 
line 55:

> 53: 
> 54: /**
> 55:  * Get the plain text of the doc comment, if any, for a tree node.

This is likely a copy-pasted comment.

-

PR Review: https://git.openjdk.org/jdk/pull/16388#pullrequestreview-1988489764
PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1557248565
PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1557249290
PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1557444619


Re: RFR: JDK-8298405: Implement JEP 467: Markdown Documentation Comments [v55]

2024-04-08 Thread Jonathan Gibbons
> Please review a patch to add support for Markdown syntax in documentation 
> comments, as described in the associated JEP.
> 
> Notable features:
> 
> * support for `///` documentation comments in `JavaTokenizer`
> * new module `jdk.internal.md` -- a private copy of the `commonmark-java` 
> library
> * updates to `DocCommentParser` to treat `///` comments as Markdown
> * updates to the standard doclet to render Markdown comments in HTML

Jonathan Gibbons has updated the pull request incrementally with one additional 
commit since the last revision:

  add support for JDK-8329296: Update Elements for '///' documentation comments

-

Changes:
  - all: https://git.openjdk.org/jdk/pull/16388/files
  - new: https://git.openjdk.org/jdk/pull/16388/files/37646287..21f5b004

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk=16388=54
 - incr: https://webrevs.openjdk.org/?repo=jdk=16388=53-54

  Stats: 331 lines in 10 files changed: 291 ins; 20 del; 20 mod
  Patch: https://git.openjdk.org/jdk/pull/16388.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16388/head:pull/16388

PR: https://git.openjdk.org/jdk/pull/16388