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

Set class on body elements

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 13
    • 13
    • tools

      In order to facilitate page-kind-specific stylesheet overrides, the body element on each generated page should define a class that is specific to the kind of page.

      It is suggested to use class names similar to and derived fromthe names used in the recent generator meta tag.

      The set of names there is:
      AllClassesIndexWriter
      AllPackagesIndexWriter
      AnnotationTypeWriterImpl
      ClassUseWriter
      ClassWriterImpl
      ConstantsSummaryWriterImpl
      DeprecatedListWriter
      DocFileWriter
      HelpWriter
      IndexRedirectWriter
      ModuleIndexWriter
      ModuleWriterImpl
      PackageTreeWriter
      PackageUseWriter
      PackageWriterImpl
      SerializedFormWriterImpl
      SplitIndexWriter
      TreeWriter

      I suggest dropping "Writer" and "Impl", converting the name to lower-case, and using "-" to separate words. That suggests the following names:

      all-classes-index
      all-packages-index
      annotation-type
      class-use
      class
      constants-summary
      deprecated-list
      doc-file
      help
      index-redirect
      module-index
      module
      package-tree
      package-use
      package
      serialized-form
      split-index
      tree

      It might also be worth appending "-declaration" to the names "module", "package", "class".

      It's an impl-quirk, that should be fixed eventually, that annotation types are handled separately from other types (JDK-8181506). For example, classes, interfaces and enums are all similar enough to be generated by a single writer. We should not perpetuate the quirk in the set of class names.

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

              Created:
              Updated:
              Resolved: