Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8318327

Merge Navigation.PageMode and HtmlConfiguration.ConditionalPage.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • tools

      The declaration of `ConditionalPage` has the following comment:

          // Note: this should (eventually) be merged with Navigation.PageMode,
          // which performs a somewhat similar role

      `PageMode` is used to help configure the main navigation bar with entries suitable for the kind of page being generated.

      `ConditionalPage` is used to record which kinds of "optional" pages are actually present in overall documentation being generated.

      --

      It would be better if each page-writer (i.e. concrete subtype of `HtmlDocletWriter`) provided unique info about the kind of page being generated. This would subsume both `PageMode` and `ConditionalPage`.

      The info could either be passed to the constructor for `HtmlDocletWriter`, or provided by overriding an abstract method on that class.

      Once it is available as standard for all instances of `HtmlDocletWriter`, then the uses of `PageMode` and `ConditionalPage` can be simplified. Note there is no need to record _just_ the conditional pages in `HtmlConfiguration.conditionalPages`. We could automagically record all the kinds of pages being generated, without having to update specific page writers.

            Unassigned Unassigned
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: