src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HelpWriter.java
author hannesw
Wed, 27 Nov 2019 13:08:16 +0100
changeset 59294 48b88b9c11eb
parent 54596 86c1da00dd6a
permissions -rw-r--r--
8223378: CSS solution for navbar problem with <a> elements is not ideal Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
53863
d001808c57e8 8218998: Add metadata to generated API documentation files
jjg
parents: 53562
diff changeset
     2
 * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
06bc494ca11e Initial load
duke
parents:
diff changeset
     4
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1787
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1787
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
 *
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
 *
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1787
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1787
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 1787
diff changeset
    23
 * questions.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    26
package jdk.javadoc.internal.doclets.formats.html;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
59294
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
    28
import jdk.javadoc.internal.doclets.formats.html.markup.BodyContents;
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
    29
import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    30
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    31
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    32
import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
49551
0d4786e42471 8196200: Implement a navigation builder in javadoc
bpatel
parents: 48747
diff changeset
    33
import jdk.javadoc.internal.doclets.formats.html.markup.Navigation;
0d4786e42471 8196200: Implement a navigation builder in javadoc
bpatel
parents: 48747
diff changeset
    34
import jdk.javadoc.internal.doclets.formats.html.markup.Navigation.PageMode;
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    35
import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    36
import jdk.javadoc.internal.doclets.toolkit.Content;
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    37
import jdk.javadoc.internal.doclets.toolkit.util.DocFileIOException;
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    38
import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    39
import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 29957
diff changeset
    40
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
06bc494ca11e Initial load
duke
parents:
diff changeset
    42
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    43
 * Generate the Help File for the generated API documentation. The help file
06bc494ca11e Initial load
duke
parents:
diff changeset
    44
 * contents are helpful for browsing the generated documentation.
06bc494ca11e Initial load
duke
parents:
diff changeset
    45
 *
14260
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    46
 *  <p><b>This is NOT part of any supported API.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    47
 *  If you write code that depends on this, you do so at your own risk.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    48
 *  This code and its internal interfaces are subject to change or
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    49
 *  deletion without notice.</b>
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 14258
diff changeset
    50
 *
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
 * @author Atul M Dambalkar
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
public class HelpWriter extends HtmlDocletWriter {
06bc494ca11e Initial load
duke
parents:
diff changeset
    54
49551
0d4786e42471 8196200: Implement a navigation builder in javadoc
bpatel
parents: 48747
diff changeset
    55
    private final Navigation navBar;
0d4786e42471 8196200: Implement a navigation builder in javadoc
bpatel
parents: 48747
diff changeset
    56
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
     * Constructor to construct HelpWriter object.
48654
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47850
diff changeset
    59
     * @param configuration the configuration
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
     * @param filename File to be generated.
06bc494ca11e Initial load
duke
parents:
diff changeset
    61
     */
45417
f7479ee8de69 8177848: Rename Configuration(Impl) classes
ksrini
parents: 40587
diff changeset
    62
    public HelpWriter(HtmlConfiguration configuration,
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 35426
diff changeset
    63
                      DocPath filename) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
        super(configuration, filename);
59294
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
    65
        this.navBar = new Navigation(null, configuration, PageMode.HELP, path);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
06bc494ca11e Initial load
duke
parents:
diff changeset
    68
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    69
     * Construct the HelpWriter object and then use it to generate the help
06bc494ca11e Initial load
duke
parents:
diff changeset
    70
     * file. The name of the generated file is "help-doc.html". The help file
06bc494ca11e Initial load
duke
parents:
diff changeset
    71
     * will get generated if and only if "-helpfile" and "-nohelp" is not used
06bc494ca11e Initial load
duke
parents:
diff changeset
    72
     * on the command line.
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    73
     *
48654
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47850
diff changeset
    74
     * @param configuration the configuration
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    75
     * @throws DocFileIOException if there is a problem while generating the documentation
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    76
     */
45417
f7479ee8de69 8177848: Rename Configuration(Impl) classes
ksrini
parents: 40587
diff changeset
    77
    public static void generate(HtmlConfiguration configuration) throws DocFileIOException {
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    78
        DocPath filename = DocPaths.HELP_DOC;
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    79
        HelpWriter helpgen = new HelpWriter(configuration, filename);
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    80
        helpgen.generateHelpFile();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
06bc494ca11e Initial load
duke
parents:
diff changeset
    83
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    84
     * Generate the help file contents.
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    85
     *
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    86
     * @throws DocFileIOException if there is a problem while generating the documentation
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    87
     */
40587
1c355ea550ed 8164130: Simplify doclet IOException handling
jjg
parents: 40500
diff changeset
    88
    protected void generateHelpFile() throws DocFileIOException {
52644
43efb4ca6d6c 8214139: Remove wrapper methods from {Base,Html}Configuration
jjg
parents: 51092
diff changeset
    89
        String title = resources.getText("doclet.Window_Help_title");
54350
4f9772f4403d 8215599: Remove support for javadoc "frames" mode
pmuthuswamy
parents: 54060
diff changeset
    90
        HtmlTree body = getBody(getWindowTitle(title));
59294
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
    91
        Content headerContent = new ContentBuilder();
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
    92
        addTop(headerContent);
49551
0d4786e42471 8196200: Implement a navigation builder in javadoc
bpatel
parents: 48747
diff changeset
    93
        navBar.setUserHeader(getUserHeaderFooter(true));
59294
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
    94
        headerContent.add(navBar.getContent(true));
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
    95
        ContentBuilder helpFileContent = new ContentBuilder();
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
    96
        addHelpFileContents(helpFileContent);
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
    97
        HtmlTree footer = HtmlTree.FOOTER();
49551
0d4786e42471 8196200: Implement a navigation builder in javadoc
bpatel
parents: 48747
diff changeset
    98
        navBar.setUserFooter(getUserHeaderFooter(false));
59294
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
    99
        footer.add(navBar.getContent(false));
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
   100
        addBottom(footer);
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
   101
        body.add(new BodyContents()
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
   102
                .setHeader(headerContent)
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
   103
                .addMainContent(helpFileContent)
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
   104
                .setFooter(footer)
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
   105
                .toContent());
53880
3f1e9372557f 8219497: Unused parameter in HtmlDocletWriter::printHtmlDocument
jjg
parents: 53879
diff changeset
   106
        printHtmlDocument(null, "help", body);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   107
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
    /**
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   110
     * Add the help file contents from the resource file to the content tree. While adding the
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
     * help file contents it also keeps track of user options. If "-notree"
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   112
     * is used, then the "overview-tree.html" will not get added and hence
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   113
     * help information also will not get added.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   114
     *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   115
     * @param contentTree the content tree to which the help file contents will be added
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   116
     */
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   117
    protected void addHelpFileContents(Content contentTree) {
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   118
        // Heading
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   119
        Content heading = HtmlTree.HEADING(Headings.PAGE_TITLE_HEADING, false, HtmlStyle.title,
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   120
                contents.getContent("doclet.help.main_heading"));
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   121
        Content div = HtmlTree.DIV(HtmlStyle.header, heading);
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   122
        Content intro = HtmlTree.DIV(HtmlStyle.subTitle,
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   123
                contents.getContent("doclet.help.intro"));
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   124
        div.add(intro);
59294
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
   125
        contentTree.add(div);
29957
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 25874
diff changeset
   126
        HtmlTree htmlTree;
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   127
        HtmlTree ul = new HtmlTree(HtmlTag.UL);
47846
4e78aba768f0 8190295: Introduce a new Table builder class
jjg
parents: 47216
diff changeset
   128
        ul.setStyle(HtmlStyle.blockList);
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   129
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   130
        // Overview
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
        if (configuration.createoverview) {
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   132
            Content overviewHeading = HtmlTree.HEADING(Headings.CONTENT_HEADING,
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 35426
diff changeset
   133
                contents.overviewLabel);
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54350
diff changeset
   134
            htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, overviewHeading);
51018
591c34a66d41 8185740: The help-doc.html generated by the doclet is outdated
jjg
parents: 49551
diff changeset
   135
            String overviewKey = configuration.showModules
591c34a66d41 8185740: The help-doc.html generated by the doclet is outdated
jjg
parents: 49551
diff changeset
   136
                    ? "doclet.help.overview.modules.body"
591c34a66d41 8185740: The help-doc.html generated by the doclet is outdated
jjg
parents: 49551
diff changeset
   137
                    : "doclet.help.overview.packages.body";
591c34a66d41 8185740: The help-doc.html generated by the doclet is outdated
jjg
parents: 49551
diff changeset
   138
            Content overviewLink = links.createLink(
54350
4f9772f4403d 8215599: Remove support for javadoc "frames" mode
pmuthuswamy
parents: 54060
diff changeset
   139
                    DocPaths.INDEX, resources.getText("doclet.Overview"));
51018
591c34a66d41 8185740: The help-doc.html generated by the doclet is outdated
jjg
parents: 49551
diff changeset
   140
            Content overviewBody = contents.getContent(overviewKey, overviewLink);
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   141
            Content overviewPara = HtmlTree.P(overviewBody);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   142
            htmlTree.add(overviewPara);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   143
            ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   144
        }
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   145
51018
591c34a66d41 8185740: The help-doc.html generated by the doclet is outdated
jjg
parents: 49551
diff changeset
   146
        // Module
591c34a66d41 8185740: The help-doc.html generated by the doclet is outdated
jjg
parents: 49551
diff changeset
   147
        if (configuration.showModules) {
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   148
            Content moduleHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
51018
591c34a66d41 8185740: The help-doc.html generated by the doclet is outdated
jjg
parents: 49551
diff changeset
   149
                    contents.moduleLabel);
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54350
diff changeset
   150
            htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, moduleHead);
51018
591c34a66d41 8185740: The help-doc.html generated by the doclet is outdated
jjg
parents: 49551
diff changeset
   151
            Content moduleIntro = contents.getContent("doclet.help.module.intro");
591c34a66d41 8185740: The help-doc.html generated by the doclet is outdated
jjg
parents: 49551
diff changeset
   152
            Content modulePara = HtmlTree.P(moduleIntro);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   153
            htmlTree.add(modulePara);
51018
591c34a66d41 8185740: The help-doc.html generated by the doclet is outdated
jjg
parents: 49551
diff changeset
   154
            HtmlTree ulModule = new HtmlTree(HtmlTag.UL);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   155
            ulModule.add(HtmlTree.LI(contents.packagesLabel));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   156
            ulModule.add(HtmlTree.LI(contents.modulesLabel));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   157
            ulModule.add(HtmlTree.LI(contents.servicesLabel));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   158
            htmlTree.add(ulModule);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   159
            ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
51018
591c34a66d41 8185740: The help-doc.html generated by the doclet is outdated
jjg
parents: 49551
diff changeset
   160
        }
591c34a66d41 8185740: The help-doc.html generated by the doclet is outdated
jjg
parents: 49551
diff changeset
   161
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   162
        // Package
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   163
        Content packageHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 35426
diff changeset
   164
                contents.packageLabel);
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54350
diff changeset
   165
        htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, packageHead);
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   166
        Content packageIntro = contents.getContent("doclet.help.package.intro");
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   167
        Content packagePara = HtmlTree.P(packageIntro);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   168
        htmlTree.add(packagePara);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   169
        HtmlTree ulPackage = new HtmlTree(HtmlTag.UL);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   170
        ulPackage.add(HtmlTree.LI(contents.interfaces));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   171
        ulPackage.add(HtmlTree.LI(contents.classes));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   172
        ulPackage.add(HtmlTree.LI(contents.enums));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   173
        ulPackage.add(HtmlTree.LI(contents.exceptions));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   174
        ulPackage.add(HtmlTree.LI(contents.errors));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   175
        ulPackage.add(HtmlTree.LI(contents.annotationTypes));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   176
        htmlTree.add(ulPackage);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   177
        ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   178
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   179
        // Class/interface
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   180
        Content classHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   181
                contents.getContent("doclet.help.class_interface.head"));
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54350
diff changeset
   182
        htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, classHead);
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   183
        Content classIntro = contents.getContent("doclet.help.class_interface.intro");
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   184
        Content classPara = HtmlTree.P(classIntro);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   185
        htmlTree.add(classPara);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   186
        HtmlTree ul1 = new HtmlTree(HtmlTag.UL);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   187
        ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.inheritance_diagram")));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   188
        ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.subclasses")));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   189
        ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.subinterfaces")));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   190
        ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.implementations")));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   191
        ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.declaration")));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   192
        ul1.add(HtmlTree.LI(contents.getContent("doclet.help.class_interface.description")));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   193
        htmlTree.add(ul1);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   194
        htmlTree.add(new HtmlTree(HtmlTag.BR));
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   195
        HtmlTree ul2 = new HtmlTree(HtmlTag.UL);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   196
        ul2.add(HtmlTree.LI(contents.nestedClassSummary));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   197
        ul2.add(HtmlTree.LI(contents.fieldSummaryLabel));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   198
        ul2.add(HtmlTree.LI(contents.propertySummaryLabel));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   199
        ul2.add(HtmlTree.LI(contents.constructorSummaryLabel));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   200
        ul2.add(HtmlTree.LI(contents.methodSummary));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   201
        htmlTree.add(ul2);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   202
        htmlTree.add(new HtmlTree(HtmlTag.BR));
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   203
        HtmlTree ul3 = new HtmlTree(HtmlTag.UL);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   204
        ul3.add(HtmlTree.LI(contents.fieldDetailsLabel));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   205
        ul3.add(HtmlTree.LI(contents.propertyDetailsLabel));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   206
        ul3.add(HtmlTree.LI(contents.constructorDetailsLabel));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   207
        ul3.add(HtmlTree.LI(contents.methodDetailLabel));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   208
        htmlTree.add(ul3);
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   209
        Content classSummary = contents.getContent("doclet.help.class_interface.summary");
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   210
        Content para = HtmlTree.P(classSummary);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   211
        htmlTree.add(para);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   212
        ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   213
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   214
        // Annotation Types
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   215
        Content aHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 35426
diff changeset
   216
                contents.annotationType);
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54350
diff changeset
   217
        htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, aHead);
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   218
        Content aIntro = contents.getContent("doclet.help.annotation_type.intro");
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   219
        Content aPara = HtmlTree.P(aIntro);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   220
        htmlTree.add(aPara);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   221
        HtmlTree aul = new HtmlTree(HtmlTag.UL);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   222
        aul.add(HtmlTree.LI(contents.getContent("doclet.help.annotation_type.declaration")));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   223
        aul.add(HtmlTree.LI(contents.getContent("doclet.help.annotation_type.description")));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   224
        aul.add(HtmlTree.LI(contents.annotateTypeRequiredMemberSummaryLabel));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   225
        aul.add(HtmlTree.LI(contents.annotateTypeOptionalMemberSummaryLabel));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   226
        aul.add(HtmlTree.LI(contents.annotationTypeMemberDetail));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   227
        htmlTree.add(aul);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   228
        ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   229
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   230
        // Enums
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   231
        Content enumHead = HtmlTree.HEADING(Headings.CONTENT_HEADING, contents.enum_);
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54350
diff changeset
   232
        htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, enumHead);
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   233
        Content eIntro = contents.getContent("doclet.help.enum.intro");
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   234
        Content enumPara = HtmlTree.P(eIntro);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   235
        htmlTree.add(enumPara);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   236
        HtmlTree eul = new HtmlTree(HtmlTag.UL);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   237
        eul.add(HtmlTree.LI(contents.getContent("doclet.help.enum.declaration")));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   238
        eul.add(HtmlTree.LI(contents.getContent("doclet.help.enum.definition")));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   239
        eul.add(HtmlTree.LI(contents.enumConstantSummary));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   240
        eul.add(HtmlTree.LI(contents.enumConstantDetailLabel));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   241
        htmlTree.add(eul);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   242
        ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   243
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   244
        // Class Use
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
        if (configuration.classuse) {
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   246
            Content useHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   247
                    contents.getContent("doclet.help.use.head"));
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54350
diff changeset
   248
            htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, useHead);
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   249
            Content useBody = contents.getContent("doclet.help.use.body");
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   250
            Content usePara = HtmlTree.P(useBody);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   251
            htmlTree.add(usePara);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   252
            ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   253
        }
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   254
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   255
        // Tree
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
        if (configuration.createtree) {
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   257
            Content treeHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   258
                    contents.getContent("doclet.help.tree.head"));
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54350
diff changeset
   259
            htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, treeHead);
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   260
            Content treeIntro = contents.getContent("doclet.help.tree.intro",
48654
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47850
diff changeset
   261
                    links.createLink(DocPaths.OVERVIEW_TREE,
52644
43efb4ca6d6c 8214139: Remove wrapper methods from {Base,Html}Configuration
jjg
parents: 51092
diff changeset
   262
                    resources.getText("doclet.Class_Hierarchy")),
17563
e8ddeb9bd17c 8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents: 14357
diff changeset
   263
                    HtmlTree.CODE(new StringContent("java.lang.Object")));
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   264
            Content treePara = HtmlTree.P(treeIntro);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   265
            htmlTree.add(treePara);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   266
            HtmlTree tul = new HtmlTree(HtmlTag.UL);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   267
            tul.add(HtmlTree.LI(contents.getContent("doclet.help.tree.overview")));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   268
            tul.add(HtmlTree.LI(contents.getContent("doclet.help.tree.package")));
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   269
            htmlTree.add(tul);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   270
            ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   271
        }
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   272
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   273
        // Deprecated
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   274
        if (!(configuration.nodeprecatedlist || configuration.nodeprecated)) {
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   275
            Content dHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 35426
diff changeset
   276
                    contents.deprecatedAPI);
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54350
diff changeset
   277
            htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, dHead);
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   278
            Content deprBody = contents.getContent("doclet.help.deprecated.body",
48654
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47850
diff changeset
   279
                    links.createLink(DocPaths.DEPRECATED_LIST,
52644
43efb4ca6d6c 8214139: Remove wrapper methods from {Base,Html}Configuration
jjg
parents: 51092
diff changeset
   280
                    resources.getText("doclet.Deprecated_API")));
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   281
            Content dPara = HtmlTree.P(deprBody);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   282
            htmlTree.add(dPara);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   283
            ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   284
        }
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   285
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   286
        // Index
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   287
        if (configuration.createindex) {
17563
e8ddeb9bd17c 8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents: 14357
diff changeset
   288
            Content indexlink;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   289
            if (configuration.splitindex) {
48654
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47850
diff changeset
   290
                indexlink = links.createLink(DocPaths.INDEX_FILES.resolve(DocPaths.indexN(1)),
52644
43efb4ca6d6c 8214139: Remove wrapper methods from {Base,Html}Configuration
jjg
parents: 51092
diff changeset
   291
                        resources.getText("doclet.Index"));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   292
            } else {
48654
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47850
diff changeset
   293
                indexlink = links.createLink(DocPaths.INDEX_ALL,
52644
43efb4ca6d6c 8214139: Remove wrapper methods from {Base,Html}Configuration
jjg
parents: 51092
diff changeset
   294
                        resources.getText("doclet.Index"));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   295
            }
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   296
            Content indexHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   297
                    contents.getContent("doclet.help.index.head"));
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54350
diff changeset
   298
            htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, indexHead);
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   299
            Content indexBody = contents.getContent("doclet.help.index.body", indexlink);
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   300
            Content indexPara = HtmlTree.P(indexBody);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   301
            htmlTree.add(indexPara);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   302
            ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   303
        }
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   304
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   305
        // Serialized Form
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   306
        Content sHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 35426
diff changeset
   307
                contents.serializedForm);
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54350
diff changeset
   308
        htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, sHead);
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   309
        Content serialBody = contents.getContent("doclet.help.serial_form.body");
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   310
        Content serialPara = HtmlTree.P(serialBody);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   311
        htmlTree.add(serialPara);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   312
        ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   313
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   314
        // Constant Field Values
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   315
        Content constHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 35426
diff changeset
   316
                contents.constantsSummaryTitle);
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54350
diff changeset
   317
        htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, constHead);
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   318
        Content constantsBody = contents.getContent("doclet.help.constants.body",
48654
36f58bd6269f 8195796: Reduce the size of relative URLs in generated docs
jjg
parents: 47850
diff changeset
   319
                links.createLink(DocPaths.CONSTANT_VALUES,
40303
96a1226aca18 8160697: HTMLWriter needs perf cleanup
jjg
parents: 35426
diff changeset
   320
                resources.getText("doclet.Constants_Summary")));
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   321
        Content constPara = HtmlTree.P(constantsBody);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   322
        htmlTree.add(constPara);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   323
        ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   324
51091
a602706ccaaa 8207213: The help-doc.html generated by the doclet is incomplete
jjg
parents: 51018
diff changeset
   325
        // Search
53991
786825220790 8219801: Pages do not have <h1>
jjg
parents: 53883
diff changeset
   326
        Content searchHead = HtmlTree.HEADING(Headings.CONTENT_HEADING,
51091
a602706ccaaa 8207213: The help-doc.html generated by the doclet is incomplete
jjg
parents: 51018
diff changeset
   327
                contents.getContent("doclet.help.search.head"));
54596
86c1da00dd6a 8219998: Eliminate inherently singleton lists
pmuthuswamy
parents: 54350
diff changeset
   328
        htmlTree = HtmlTree.SECTION(HtmlStyle.helpSection, searchHead);
51091
a602706ccaaa 8207213: The help-doc.html generated by the doclet is incomplete
jjg
parents: 51018
diff changeset
   329
        Content searchBody = contents.getContent("doclet.help.search.body");
a602706ccaaa 8207213: The help-doc.html generated by the doclet is incomplete
jjg
parents: 51018
diff changeset
   330
        Content searchPara = HtmlTree.P(searchBody);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   331
        htmlTree.add(searchPara);
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   332
        ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
51091
a602706ccaaa 8207213: The help-doc.html generated by the doclet is incomplete
jjg
parents: 51018
diff changeset
   333
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents: 5520
diff changeset
   334
        Content divContent = HtmlTree.DIV(HtmlStyle.contentContainer, ul);
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   335
        divContent.add(new HtmlTree(HtmlTag.HR));
51018
591c34a66d41 8185740: The help-doc.html generated by the doclet is outdated
jjg
parents: 49551
diff changeset
   336
        Content footnote = HtmlTree.SPAN(HtmlStyle.emphasizedPhrase,
48747
f7aed48bbbdc 8196736: Refactor HelpWriter and properties
jjg
parents: 48654
diff changeset
   337
                contents.getContent("doclet.help.footnote"));
54060
53a95878619f 8220202: Simplify/standardize method naming for HtmlTree
jjg
parents: 53991
diff changeset
   338
        divContent.add(footnote);
59294
48b88b9c11eb 8223378: CSS solution for navbar problem with <a> elements is not ideal
hannesw
parents: 54596
diff changeset
   339
        contentTree.add(divContent);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   340
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   341
}