RFR: 8266666: Implementation for snippets [v21]

Pavel Rappo prappo at openjdk.java.net
Tue Aug 31 12:16:47 UTC 2021


> 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.

Pavel Rappo has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 23 commits:

 - Merge branch 'master' into 8266666
 - Clean up tag parsing
   
   Removes two methods from an older implementation where HTML and javadoc tag attributes were modelled by different DocTree subtypes. Moves the `tagAttrs` method to TagParser responsible for parsing `@snippet` because `:` attribute terminator is specific to `@snippet`. Makes parser stop on `:`. Removes chatty discussion comments from code as suggested by Jonathan Gibbons.
 - Exclude unrelated changes to resources
   
   Also fixes a typo.
 - Recover from a sloppy merge
   
   Apparently, I've performed at least one sloppy merge while developing the feature in sandbox. As a result, some changes brought by e4d045402fa1992a1d91586bd4f67362d07f543c were discarded. The specdiff for the CSR actually shows this and has to be regenerated.
 - Format code closer to the ambient style
   
   Makes new constructs look more natural in their context by adopting the surrounding style.
 - Merge branch 'master' into 8266666
   
   Redoing a faulty merge and pushing the result forcefully.
 - Clarify the attributes order comment
 - Fix import layout and typos
 - Add @summary to tests
   
   From https://openjdk.java.net/jtreg/faq.html:
   
   The @summary tag describes the condition that is checked by the test. It is especially useful for non-regression tests, which by definition don't have bug numbers, but even if there's a bug number it's helpful to include a summary. Note that a test summary is generally not the same thing as a Bugtraq synopsis, since the latter describes the bug rather than the condition that the bug violates.
   
   That said, the JBS synopsis for 8266666 suits those tests just fine.
 - Remove superfluous editor-fold
 - ... and 13 more: https://git.openjdk.java.net/jdk/compare/5185dbde...b2b604fb

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

Changes: https://git.openjdk.java.net/jdk/pull/4795/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4795&range=20
  Stats: 4657 lines in 44 files changed: 4631 ins; 4 del; 22 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4795.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4795/head:pull/4795

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


More information about the compiler-dev mailing list