RFR: JDK-8297802: display of @spec tags should mimic that of @see tags
Pavel Rappo
prappo at openjdk.org
Wed Nov 30 19:59:11 UTC 2022
On Wed, 30 Nov 2022 04:22:24 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
> Please review a simple change to model the list used to display `@spec` tags on the list used to display `@see` tags.
>
> In both cases, the list uses an inline list if the items are short and do not contain commas, or a bulleted list if they are long or contain commas.
>
> The test is updated for the new output.
>
> For now, new CSS styles are introduced for `spec-list` and `spec-list-long`, duplicating `see-list` and `see-list-long`. We might want to merge these into `tag-list` and `tag-list-long`, or some other suitably-named pair.
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java line 760:
> 758: links.stream()
> 759: .filter(Predicate.not(Content::isEmpty))
> 760: .forEach(item -> specList.add(HtmlTree.LI(item)));
There's a similar not-DRY comment. Perhaps both could be dealt with by extracting the decision on styling into a method?
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SpecTaglet.java line 73:
> 71: }
> 72:
> 73: private record Documentation(List<? extends SpecTree> specTrees, ExecutableElement method) { }
Thanks for fixing this typo.
-------------
PR: https://git.openjdk.org/jdk/pull/11426
More information about the javadoc-dev
mailing list