On Thu, 14 Sep 2023 16:19:06 GMT, Hannes Wallnöfer <[email protected]> wrote:
> My original intention with this cleanup was to keep using > `[Html]IndexBuilder' for both the "All Classes" and the main index, but just > improve separation of code and naming of classes. However, I then discovered > two things: > > - The "All Classes" page is so simple to build that it doesn't justify using > a complex builder class. In fact, moving the necessary functionality from > `IndexBuilder` to `AllClassesIndexWriter` just added about a dozen lines of > code to the latter, while making `IndexBuilder` much simpler by removing its > dual purpose. > - The separation of code between `toolkit.util.IndexBuilder` and > `formats.html.HtmlIndexBuilder`, although seemingly random at first sight, > actually reflects the usage of functionality provided by the respective > packages. Although with a single output format the separation between these > packages is not as important as it used to be, it is still nice to keep > things separated. > > Based on these two findings, I decided to pull the "All Classes" code into > "AllClassesIndexWriter", but maintain the implementation of > `[Html]IndexBuilder` across the two classes/packages. Although the base > `IndexBuilder` class is technically able to function on its own without the > HTML-specific enhancements, I made the class abstract in order to point out > that the HTML enhancements in `HtmlIndexBuilder` are actually essential for > our us. This pull request has now been integrated. Changeset: 6b8261b8 Author: Hannes Wallnöfer <[email protected]> URL: https://git.openjdk.org/jdk/commit/6b8261b8d6a31d1915ee0bc5f90a9b91a751d588 Stats: 136 lines in 13 files changed: 21 ins; 68 del; 47 mod 8315464: Uncouple AllClassesIndexWriter from IndexBuilder Reviewed-by: jjg ------------- PR: https://git.openjdk.org/jdk/pull/15746
