On Mon, 26 Jul 2021 12:55:17 GMT, Hannes Wallnöfer <[email protected]> wrote:
>> Pavel Rappo has updated the pull request incrementally with two additional
>> commits since the last revision:
>>
>> - Change AnnotatedText<T> to StyledText
>>
>> Renames the class, removes its generic parameter, and changes the related
>> terminology from "annotate" to "style".
>> - Restructure ...toolkit.taglets.snippet.** packages
>>
>> This commit moves the contents of the
>> jdk.javadoc.internal.doclets.toolkit.taglets.snippet.{action,parser,text}
>> packages into the jdk.javadoc.internal.doclets.toolkit.taglets.snippet
>> package.
>
> src/jdk.compiler/share/classes/com/sun/source/doctree/SnippetTree.java line
> 46:
>
>> 44: * </pre>
>> 45: *
>> 46: * @since 17
>
> Should be `@since 18` (a few other instances)
Fixed in commit c4e5b79.
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/snippet/text/AnnotatedText.java
> line 46:
>
>> 44: * rich text style.
>> 45: */
>> 46: public class AnnotatedText<S> {
>
> As far as I can see, this class is always parameterized with Style. Do you
> foresee any other types of annotations being used with it?
I removed that generic in commit 01afad6. This somewhat simplified the code.
Note that later `AnnotatedText` might be used for automated syntax
highlighting, which is orthogonal to snippet markup. I hope that non-generic
`AnnotatedText` will be expressive enough to withstand that extra use case.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4795