Please review: 

JBS: https://bugs.openjdk.java.net/browse/JDK-8237383
Webrev: http://cr.openjdk.java.net/~hannesw/8237383/webrev.00/

This patch makes sure members inherited from non-documented parents are 
included in HTML and search index files.

There is a new IndexItem class to the doclets.toolkit.util package that is used 
instead of raw Elements to collect indexed elements by IndexBuilder. This is 
necessary because we need to know the inheriting class when rendering a member 
signature as the member type may change by instantiating type parameters. 

IndexItem can also hold a SearchIndexItem so that index tags can be added to 
IndexBuilder to generate index files from a single collection rather than 
manually merging two collections.

Unfortunately I ran into some obstacles with this, so the resulting code is not 
quite as simple and unified as I would have liked. HTML and search indexes are 
structured differently and each use a variety of different formats and 
comparators for sorting. This makes it very difficult to manage everything 
within a single place, so there’s still much of the original redundancy and 
complexity left.

I also moved all comparator factory methods from the Utils class to a new 
Comparators class. The code is mostly unchanged as I was not able to simplify 
it without changing behaviour. There is one new comparator factory method that 
generates a composite generator for the IndexItems containing elements and 
search tags in the HTML index. 

The changes in VisibleMemberTree are mostly removal of dead code. The 
implementation of getExtraMembers(Kind) was the same as 
getAllVisibleMembers(Kind), so no additional members were found and added by 
that method. There is also a bit of code cleanup in that class.


Thanks,
Hannes

Reply via email to