RFR: 8266666: Implementation for snippets

Jonathan Gibbons jjg at openjdk.java.net
Fri Jul 23 20:17:02 UTC 2021


On Thu, 15 Jul 2021 14:13:16 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

> This PR implements JEP 413 "Code Snippets in Java API Documentation", which hasn't been yet proposed to target JDK 18. The PR starts as a squashed merge of the https://github.com/openjdk/jdk-sandbox/tree/jdk.javadoc/snippets branch.

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java line 1147:

> 1145:     }
> 1146: 
> 1147:     // TODO: this method and seeTagToContent share much of the code; consider factoring common pieces out

Yes. the existing `seeTagToContent` handles all flavors of `@see` tag, and `{@link}`.

It ought to be possible to redirect the use of `@see <reference> <description>` and `{@link}` to this method some some edited variant thereof.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4795


More information about the javadoc-dev mailing list