langtools/test/jdk/javadoc/doclet/testHtmlDocument/TestHtmlDocument.java
author alanb
Thu, 17 Mar 2016 19:04:28 +0000
changeset 36526 3b41f1c69604
parent 35426 374342e56a56
permissions -rw-r--r--
8142968: Module System implementation Summary: Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282 Reviewed-by: jjg, jlahoda, vromero, mcimadamore, bpatel, ksrini, darcy, anazarov, dfuchs Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, jan.lahoda@oracle.com, vicente.romero@oracle.com, andreas.lundblad@oracle.com, andrey.x.nazarov@oracle.com, chris.hegarty@oracle.com, erik.joelsson@oracle.com, kumar.x.srinivasan@oracle.com, sundararajan.athijegannathan@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
     1
/*
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
     2
 * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
     4
 *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
32337
c9d3ab9f601c 8133671: langtools tests have bad license
alundblad
parents: 30730
diff changeset
     7
 * published by the Free Software Foundation.
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
     8
 *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    13
 * accompanied this code).
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    14
 *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    18
 *
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    21
 * questions.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    22
 */
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    23
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    24
/*
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    25
 * @test
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    26
 * @bug 6851834
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    27
 * @summary This test verifies the HTML document generation for javadoc output.
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    28
 * @library ../lib
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    29
 * @modules jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.markup
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    30
 *          jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util
3b41f1c69604 8142968: Module System implementation
alanb
parents: 35426
diff changeset
    31
 *          jdk.javadoc/jdk.javadoc.internal.tool
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    32
 * @build JavadocTester
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    33
 * @author Bhavesh Patel
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    34
 * @run main TestHtmlDocument
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    35
 */
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    36
35426
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 32337
diff changeset
    37
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 32337
diff changeset
    38
import jdk.javadoc.internal.doclets.formats.html.markup.*;
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 32337
diff changeset
    39
374342e56a56 8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents: 32337
diff changeset
    40
import static jdk.javadoc.internal.doclets.toolkit.util.DocletConstants.NL;
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    41
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    42
/**
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    43
 * The class reads each file, complete with newlines, into a string to easily
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    44
 * compare the existing markup with the generated markup.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    45
 */
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    46
public class TestHtmlDocument extends JavadocTester {
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    47
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    48
    // Entry point
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    49
    public static void main(String... args) throws Exception {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    50
        TestHtmlDocument tester = new TestHtmlDocument();
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    51
        tester.runTests();
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    52
    }
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    53
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    54
    @Test
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    55
    void test() {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    56
        checking("markup");
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    57
        // Check whether the generated markup is same as the existing markup.
24402
96a0a92dc38d 8042886: Test langtools/test/com/sun/javadoc/testHtmlDocument/TestHtmlDocument.java fails on Windows
jjg
parents: 24399
diff changeset
    58
        String expected = readFile(testSrc, "testMarkup.html").replace("\n", NL);
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    59
        String actual = generateHtmlTree();
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    60
        if (actual.equals(expected)) {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    61
            passed("");
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    62
        } else {
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    63
            failed("expected content in " + testSrc("testMarkup.html") + "\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    64
                + "Actual output:\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 23971
diff changeset
    65
                + actual);
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    66
        }
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    67
    }
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    68
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    69
    // Generate the HTML output using the HTML document generation within doclet.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    70
    public static String generateHtmlTree() {
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    71
        // Document type for the HTML document
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 7641
diff changeset
    72
        DocType htmlDocType = DocType.TRANSITIONAL;
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    73
        HtmlTree html = new HtmlTree(HtmlTag.HTML);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    74
        HtmlTree head = new HtmlTree(HtmlTag.HEAD);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    75
        HtmlTree title = new HtmlTree(HtmlTag.TITLE);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    76
        // String content within the document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    77
        StringContent titleContent = new StringContent("Markup test");
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    78
        title.addContent(titleContent);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    79
        head.addContent(title);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    80
        // Test META tag
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    81
        HtmlTree meta = new HtmlTree(HtmlTag.META);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    82
        meta.addAttr(HtmlAttr.NAME, "keywords");
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    83
        meta.addAttr(HtmlAttr.CONTENT, "testContent");
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    84
        head.addContent(meta);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    85
        // Test invalid META tag
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    86
        HtmlTree invmeta = new HtmlTree(HtmlTag.META);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    87
        head.addContent(invmeta);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    88
        // Test LINK tag
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    89
        HtmlTree link = new HtmlTree(HtmlTag.LINK);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    90
        link.addAttr(HtmlAttr.REL, "testRel");
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    91
        link.addAttr(HtmlAttr.HREF, "testLink.html");
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    92
        head.addContent(link);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    93
        // Test invalid LINK tag
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    94
        HtmlTree invlink = new HtmlTree(HtmlTag.LINK);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    95
        head.addContent(invlink);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    96
        html.addContent(head);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    97
        // Comment within the document
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    98
        Comment bodyMarker = new Comment("======== START OF BODY ========");
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
    99
        html.addContent(bodyMarker);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   100
        HtmlTree body = new HtmlTree(HtmlTag.BODY);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   101
        Comment pMarker = new Comment("======== START OF PARAGRAPH ========");
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   102
        body.addContent(pMarker);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   103
        HtmlTree p = new HtmlTree(HtmlTag.P);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   104
        StringContent bodyContent = new StringContent(
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   105
                "This document is generated from sample source code and HTML " +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   106
                "files with examples of a wide variety of Java language constructs: packages, " +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   107
                "subclasses, subinterfaces, nested classes, nested interfaces," +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   108
                "inheriting from other packages, constructors, fields," +
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   109
                "methods, and so forth. ");
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   110
        p.addContent(bodyContent);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   111
        StringContent anchorContent = new StringContent("Click Here");
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   112
        p.addContent(HtmlTree.A("testLink.html", anchorContent));
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   113
        StringContent pContent = new StringContent(" to <test> out a link.");
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   114
        p.addContent(pContent);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   115
        body.addContent(p);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   116
        HtmlTree p1 = new HtmlTree(HtmlTag.P);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   117
        // Test another version of A tag.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   118
        HtmlTree anchor = new HtmlTree(HtmlTag.A);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   119
        anchor.addAttr(HtmlAttr.HREF, "testLink.html");
29957
7740f9657f56 8072945: Javadoc should generate valid and compliant HTML5 output
bpatel
parents: 24402
diff changeset
   120
        anchor.addAttr(HtmlAttr.ID, "Another version of a tag");
7614
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   121
        p1.addContent(anchor);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   122
        body.addContent(p1);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   123
        // Test for empty tags.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   124
        HtmlTree dl = new HtmlTree(HtmlTag.DL);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   125
        html.addContent(dl);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   126
        // Test for empty nested tags.
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   127
        HtmlTree dlTree = new HtmlTree(HtmlTag.DL);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   128
        dlTree.addContent(new HtmlTree(HtmlTag.DT));
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   129
        dlTree.addContent(new HtmlTree (HtmlTag.DD));
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   130
        html.addContent(dlTree);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   131
        HtmlTree dlDisplay = new HtmlTree(HtmlTag.DL);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   132
        dlDisplay.addContent(new HtmlTree(HtmlTag.DT));
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   133
        HtmlTree dd = new HtmlTree (HtmlTag.DD);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   134
        StringContent ddContent = new StringContent("Test DD");
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   135
        dd.addContent(ddContent);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   136
        dlDisplay.addContent(dd);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   137
        body.addContent(dlDisplay);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   138
        StringContent emptyString = new StringContent("");
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   139
        body.addContent(emptyString);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   140
        Comment emptyComment = new Comment("");
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   141
        body.addContent(emptyComment);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   142
        HtmlTree hr = new HtmlTree(HtmlTag.HR);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   143
        body.addContent(hr);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   144
        html.addContent(body);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   145
        HtmlDocument htmlDoc = new HtmlDocument(htmlDocType, html);
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   146
        return htmlDoc.toString();
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   147
    }
cfadc977ca75 6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
diff changeset
   148
}