On Wed, 23 Sep 2020 10:39:46 GMT, Hannes Wallnöfer <hann...@openjdk.org> wrote:

>> There is (have always been) two different versions of `HtmlTag`, albeit for 
>> different purposes, and up to now, in
>> different modules. The one in `doclint` is more for input, the one in 
>> `doclets/formats/html/markup` is more focussed on
>> output. Use sites like this are where the two domains meet and so both need 
>> to be in scope. Hence at least one needs to
>> be fully-qualified and not imported. IIRC, the policy is that the 
>> `doclets/formats/html/markup` version is more widely
>> used throughout the standard docket and gets to be important, leaving the 
>> `doclint` one to be fully-qualified.  At
>> least now they both in the same module, which increases the chance of 
>> reducing them to one copy, perhaps by replacing
>> some of the enum-member methods with separate switch-based utility methods 
>> that locally provide the requisite
>> functionality.  That being said, I still don't see a good way to merge them, 
>> meaning, I don't see a good place to put a
>> merged copy. One possibility I have been thinking about is moving the 
>> HTML-only parts of `doclets/formats/html/markup`
>> to a separate sharable package such as `jdk.javadoc.internal.html` where it 
>> could be used by both doclint and the
>> standard docket. IIRC, the one outlier in `formats.html.markup` is the 
>> `Links` class, which  I would migrate up to
>> `doclets.formats.html` (i.e. out of the `markup` subpackage.)  Separate but 
>> somewhat related, the `formats/html/markup`
>> classes have been a good pattern for other tools that generate HTML, such as 
>> doccheck and similar reporting tools.
>
> The HtmlTag in `doclets/formats/html/markup` seems to have gone. Maybe it has 
> been renamed?

Ooops: good catch.  In `formats/html/markup` it got renamed a while back to 
`TagName`, which is some of the cleanup I
was describing above (moving methods out of the enum).  We could do the same 
thing in doclint, but for now, I'll just
fix the fully-qualified name with an import.  doclint cleanup is a separate 
exercise: e.g. when we remove HTML4 support.

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

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

Reply via email to