Please review a medium but interesting fix to display tabs on the `External 
Specifications` page to indicate the host name for the spec.

The underlying "fun" part is to update `Table` to be `Table<T>`, where `T` is 
the type parameter for the predicates used to classify each row to determine 
the tabs when it will be displayed.

The changes to `Table` are relatively simple, but there is a downstream cost to 
update all the existing use sites to avoid introducing any raw types (i.e. 
because `Table` now takes a type parameter).   While it would have been simple 
to just change existing uses from `Table` to `Table<Element>`, the changes are 
done more appropriately. In particular, if a table does not use tabs at all, 
the type parameter can be `Void`, and in other situations, the type parameter 
can be a subtype of `Element`, such as `ModuleElement`, `PackageElement` or 
`TypeElement`.

With `Table` updated to be `Table<T>`, the table in `ExternalSpecsWriter` can 
be `Table<URI>` with table-tab predicates examining the host name for the URL.

Eventually, it might be good to do a further upgrade to use a horizontal list 
of checkboxes instead of table tabs, for the potentially open-ended set of host 
names, but this will require an update to the JavaScript we use for checkboxes, 
which seems out of scope for the work presented here.   I note that in demo JDK 
docs, there are only about half-a-dozen spec hosts, so table tabs are a 
reasonable compromise for now.

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

Commit messages:
 - JDK-8295088: Update External Spec page to show tabs for hosts

Changes: https://git.openjdk.org/jdk/pull/10636/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10636&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8295088
  Stats: 226 lines in 27 files changed: 117 ins; 6 del; 103 mod
  Patch: https://git.openjdk.org/jdk/pull/10636.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10636/head:pull/10636

PR: https://git.openjdk.org/jdk/pull/10636

Reply via email to