langtools/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java
author ksrini
Sun, 15 Jun 2014 08:41:57 -0700
changeset 25454 376a52c9540c
parent 22159 682da512ec17
permissions -rw-r--r--
8039028: [javadoc] refactor the usage of Util.java Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
/*
25454
376a52c9540c 8039028: [javadoc] refactor the usage of Util.java
ksrini
parents: 22159
diff changeset
     2
 * Copyright (c) 2003, 2014, 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: 2216
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: 2216
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: 2216
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2216
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 2216
diff changeset
    23
 * questions.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    24
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    25
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
package com.sun.tools.doclets.formats.html;
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
2216
b124d5c924eb 6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents: 1787
diff changeset
    28
import com.sun.javadoc.*;
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
    29
import com.sun.tools.doclets.formats.html.markup.ContentBuilder;
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
    30
import com.sun.tools.doclets.formats.html.markup.HtmlStyle;
17565
a705fe5e539f 8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents: 17560
diff changeset
    31
import com.sun.tools.doclets.formats.html.markup.HtmlTree;
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
    32
import com.sun.tools.doclets.formats.html.markup.RawHtml;
17565
a705fe5e539f 8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents: 17560
diff changeset
    33
import com.sun.tools.doclets.formats.html.markup.StringContent;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    34
import com.sun.tools.doclets.internal.toolkit.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    35
import com.sun.tools.doclets.internal.toolkit.builders.SerializedFormBuilder;
06bc494ca11e Initial load
duke
parents:
diff changeset
    36
import com.sun.tools.doclets.internal.toolkit.taglets.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    37
import com.sun.tools.doclets.internal.toolkit.util.*;
06bc494ca11e Initial load
duke
parents:
diff changeset
    38
06bc494ca11e Initial load
duke
parents:
diff changeset
    39
/**
06bc494ca11e Initial load
duke
parents:
diff changeset
    40
 * The taglet writer that writes HTML.
06bc494ca11e Initial load
duke
parents:
diff changeset
    41
 *
14260
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 9608
diff changeset
    42
 *  <p><b>This is NOT part of any supported API.
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 9608
diff changeset
    43
 *  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: 9608
diff changeset
    44
 *  This code and its internal interfaces are subject to change or
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 9608
diff changeset
    45
 *  deletion without notice.</b>
727a84636f12 8000665: fix "internal API" comments on javadoc files
jjg
parents: 9608
diff changeset
    46
 *
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    47
 * @since 1.5
06bc494ca11e Initial load
duke
parents:
diff changeset
    48
 * @author Jamie Ho
2216
b124d5c924eb 6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents: 1787
diff changeset
    49
 * @author Bhavesh Patel (Modified)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    50
 */
06bc494ca11e Initial load
duke
parents:
diff changeset
    51
06bc494ca11e Initial load
duke
parents:
diff changeset
    52
public class TagletWriterImpl extends TagletWriter {
06bc494ca11e Initial load
duke
parents:
diff changeset
    53
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14358
diff changeset
    54
    private final HtmlDocletWriter htmlWriter;
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14358
diff changeset
    55
    private final ConfigurationImpl configuration;
25454
376a52c9540c 8039028: [javadoc] refactor the usage of Util.java
ksrini
parents: 22159
diff changeset
    56
    private final Utils utils;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    57
06bc494ca11e Initial load
duke
parents:
diff changeset
    58
    public TagletWriterImpl(HtmlDocletWriter htmlWriter, boolean isFirstSentence) {
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14358
diff changeset
    59
        super(isFirstSentence);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    60
        this.htmlWriter = htmlWriter;
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14358
diff changeset
    61
        configuration = htmlWriter.configuration;
25454
376a52c9540c 8039028: [javadoc] refactor the usage of Util.java
ksrini
parents: 22159
diff changeset
    62
        this.utils = configuration.utils;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    63
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    64
06bc494ca11e Initial load
duke
parents:
diff changeset
    65
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    66
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
    67
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
    68
    public Content getOutputInstance() {
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
    69
        return new ContentBuilder();
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
    70
    }
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
    71
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
    72
    /**
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
    73
     * {@inheritDoc}
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
    74
     */
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
    75
    protected Content codeTagOutput(Tag tag) {
25454
376a52c9540c 8039028: [javadoc] refactor the usage of Util.java
ksrini
parents: 22159
diff changeset
    76
        Content result = HtmlTree.CODE(new StringContent(utils.normalizeNewlines(tag.text())));
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
    77
        return result;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    78
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
    79
06bc494ca11e Initial load
duke
parents:
diff changeset
    80
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
    81
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
    82
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
    83
    public Content getDocRootOutput() {
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
    84
        String path;
22005
4270ada5dcd1 8025416: doclet not substituting {@docRoot} in some cases
bpatel
parents: 21478
diff changeset
    85
        if (htmlWriter.pathToRoot.isEmpty())
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
    86
            path = ".";
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
    87
        else
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
    88
            path = htmlWriter.pathToRoot.getPath();
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
    89
        return new StringContent(path);
17565
a705fe5e539f 8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents: 17560
diff changeset
    90
    }
a705fe5e539f 8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents: 17560
diff changeset
    91
a705fe5e539f 8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents: 17560
diff changeset
    92
    /**
a705fe5e539f 8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents: 17560
diff changeset
    93
     * {@inheritDoc}
a705fe5e539f 8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents: 17560
diff changeset
    94
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
    95
    public Content deprecatedTagOutput(Doc doc) {
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
    96
        ContentBuilder result = new ContentBuilder();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    97
        Tag[] deprs = doc.tags("deprecated");
06bc494ca11e Initial load
duke
parents:
diff changeset
    98
        if (doc instanceof ClassDoc) {
25454
376a52c9540c 8039028: [javadoc] refactor the usage of Util.java
ksrini
parents: 22159
diff changeset
    99
            if (utils.isDeprecated((ProgramElementDoc) doc)) {
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21023
diff changeset
   100
                result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   101
                        new StringContent(configuration.getText("doclet.Deprecated"))));
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   102
                result.addContent(RawHtml.nbsp);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   103
                if (deprs.length > 0) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   104
                    Tag[] commentTags = deprs[0].inlineTags();
06bc494ca11e Initial load
duke
parents:
diff changeset
   105
                    if (commentTags.length > 0) {
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   106
                        result.addContent(commentTagsToOutput(null, doc,
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   107
                            deprs[0].inlineTags(), false)
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   108
                        );
06bc494ca11e Initial load
duke
parents:
diff changeset
   109
                    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   110
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   111
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   112
        } else {
06bc494ca11e Initial load
duke
parents:
diff changeset
   113
            MemberDoc member = (MemberDoc) doc;
25454
376a52c9540c 8039028: [javadoc] refactor the usage of Util.java
ksrini
parents: 22159
diff changeset
   114
            if (utils.isDeprecated((ProgramElementDoc) doc)) {
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21023
diff changeset
   115
                result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   116
                        new StringContent(configuration.getText("doclet.Deprecated"))));
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   117
                result.addContent(RawHtml.nbsp);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   118
                if (deprs.length > 0) {
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   119
                    Content body = commentTagsToOutput(null, doc,
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   120
                        deprs[0].inlineTags(), false);
21023
1192bdc59d82 8026370: javadoc creates empty <span class="italic"></span>
bpatel
parents: 19253
diff changeset
   121
                    if (!body.isEmpty())
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21023
diff changeset
   122
                        result.addContent(HtmlTree.SPAN(HtmlStyle.deprecationComment, body));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   123
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   124
            } else {
25454
376a52c9540c 8039028: [javadoc] refactor the usage of Util.java
ksrini
parents: 22159
diff changeset
   125
                if (utils.isDeprecated(member.containingClass())) {
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21023
diff changeset
   126
                    result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   127
                            new StringContent(configuration.getText("doclet.Deprecated"))));
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   128
                    result.addContent(RawHtml.nbsp);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   129
                }
06bc494ca11e Initial load
duke
parents:
diff changeset
   130
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   131
        }
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   132
        return result;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   133
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   134
06bc494ca11e Initial load
duke
parents:
diff changeset
   135
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   136
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   137
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   138
    protected Content literalTagOutput(Tag tag) {
25454
376a52c9540c 8039028: [javadoc] refactor the usage of Util.java
ksrini
parents: 22159
diff changeset
   139
        Content result = new StringContent(utils.normalizeNewlines(tag.text()));
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   140
        return result;
17565
a705fe5e539f 8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents: 17560
diff changeset
   141
    }
a705fe5e539f 8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents: 17560
diff changeset
   142
a705fe5e539f 8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents: 17560
diff changeset
   143
    /**
a705fe5e539f 8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents: 17560
diff changeset
   144
     * {@inheritDoc}
a705fe5e539f 8012174: {@literal} and {@code} should use \"new\" Taglet, not old.
jjg
parents: 17560
diff changeset
   145
     */
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   146
    public MessageRetriever getMsgRetriever() {
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14358
diff changeset
   147
        return configuration.message;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   148
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   149
06bc494ca11e Initial load
duke
parents:
diff changeset
   150
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   151
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   152
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   153
    public Content getParamHeader(String header) {
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21023
diff changeset
   154
        HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.paramLabel,
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   155
                new StringContent(header)));
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   156
        return result;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   157
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   158
06bc494ca11e Initial load
duke
parents:
diff changeset
   159
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   160
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   161
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   162
    public Content paramTagOutput(ParamTag paramTag, String paramName) {
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   163
        ContentBuilder body = new ContentBuilder();
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   164
        body.addContent(HtmlTree.CODE(new RawHtml(paramName)));
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   165
        body.addContent(" - ");
17568
d9691936f5f9 8012177: HTMLDocletWriter methods should generate Content, not Strings
jjg
parents: 17567
diff changeset
   166
        body.addContent(htmlWriter.commentTagsToContent(paramTag, null, paramTag.inlineTags(), false));
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   167
        HtmlTree result = HtmlTree.DD(body);
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   168
        return result;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   169
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   170
06bc494ca11e Initial load
duke
parents:
diff changeset
   171
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   172
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   173
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   174
    public Content propertyTagOutput(Tag tag, String prefix) {
17572
1081a023532f 8012295: Cleanup JavaFX features in standard doclet
jjg
parents: 17568
diff changeset
   175
        Content body = new ContentBuilder();
1081a023532f 8012295: Cleanup JavaFX features in standard doclet
jjg
parents: 17568
diff changeset
   176
        body.addContent(new RawHtml(prefix));
1081a023532f 8012295: Cleanup JavaFX features in standard doclet
jjg
parents: 17568
diff changeset
   177
        body.addContent(" ");
1081a023532f 8012295: Cleanup JavaFX features in standard doclet
jjg
parents: 17568
diff changeset
   178
        body.addContent(HtmlTree.CODE(new RawHtml(tag.text())));
1081a023532f 8012295: Cleanup JavaFX features in standard doclet
jjg
parents: 17568
diff changeset
   179
        body.addContent(".");
1081a023532f 8012295: Cleanup JavaFX features in standard doclet
jjg
parents: 17568
diff changeset
   180
        Content result = HtmlTree.P(body);
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   181
        return result;
17572
1081a023532f 8012295: Cleanup JavaFX features in standard doclet
jjg
parents: 17568
diff changeset
   182
    }
1081a023532f 8012295: Cleanup JavaFX features in standard doclet
jjg
parents: 17568
diff changeset
   183
1081a023532f 8012295: Cleanup JavaFX features in standard doclet
jjg
parents: 17568
diff changeset
   184
    /**
1081a023532f 8012295: Cleanup JavaFX features in standard doclet
jjg
parents: 17568
diff changeset
   185
     * {@inheritDoc}
1081a023532f 8012295: Cleanup JavaFX features in standard doclet
jjg
parents: 17568
diff changeset
   186
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   187
    public Content returnTagOutput(Tag returnTag) {
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   188
        ContentBuilder result = new ContentBuilder();
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21023
diff changeset
   189
        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.returnLabel,
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   190
                new StringContent(configuration.getText("doclet.Returns")))));
17568
d9691936f5f9 8012177: HTMLDocletWriter methods should generate Content, not Strings
jjg
parents: 17567
diff changeset
   191
        result.addContent(HtmlTree.DD(htmlWriter.commentTagsToContent(
d9691936f5f9 8012177: HTMLDocletWriter methods should generate Content, not Strings
jjg
parents: 17567
diff changeset
   192
                returnTag, null, returnTag.inlineTags(), false)));
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   193
        return result;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   194
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   195
06bc494ca11e Initial load
duke
parents:
diff changeset
   196
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   197
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   198
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   199
    public Content seeTagOutput(Doc holder, SeeTag[] seeTags) {
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   200
        ContentBuilder body = new ContentBuilder();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   201
        if (seeTags.length > 0) {
22159
682da512ec17 8030253: Update langtools to use strings-in-switch
briangoetz
parents: 22005
diff changeset
   202
            for (SeeTag seeTag : seeTags) {
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   203
                appendSeparatorIfNotEmpty(body);
22159
682da512ec17 8030253: Update langtools to use strings-in-switch
briangoetz
parents: 22005
diff changeset
   204
                body.addContent(htmlWriter.seeTagToContent(seeTag));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   205
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   206
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   207
        if (holder.isField() && ((FieldDoc)holder).constantValue() != null &&
06bc494ca11e Initial load
duke
parents:
diff changeset
   208
                htmlWriter instanceof ClassWriterImpl) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   209
            //Automatically add link to constant values page for constant fields.
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   210
            appendSeparatorIfNotEmpty(body);
14358
9eda9239cba0 8000416: refactor javadoc to provide and use an abstraction for relative URIs
jjg
parents: 14357
diff changeset
   211
            DocPath constantsPath =
9eda9239cba0 8000416: refactor javadoc to provide and use an abstraction for relative URIs
jjg
parents: 14357
diff changeset
   212
                    htmlWriter.pathToRoot.resolve(DocPaths.CONSTANT_VALUES);
9eda9239cba0 8000416: refactor javadoc to provide and use an abstraction for relative URIs
jjg
parents: 14357
diff changeset
   213
            String whichConstant =
9eda9239cba0 8000416: refactor javadoc to provide and use an abstraction for relative URIs
jjg
parents: 14357
diff changeset
   214
                    ((ClassWriterImpl) htmlWriter).getClassDoc().qualifiedName() + "." + ((FieldDoc) holder).name();
9eda9239cba0 8000416: refactor javadoc to provide and use an abstraction for relative URIs
jjg
parents: 14357
diff changeset
   215
            DocLink link = constantsPath.fragment(whichConstant);
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   216
            body.addContent(htmlWriter.getHyperLink(link,
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   217
                    new StringContent(configuration.getText("doclet.Constants_Summary"))));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   218
        }
06bc494ca11e Initial load
duke
parents:
diff changeset
   219
        if (holder.isClass() && ((ClassDoc)holder).isSerializable()) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   220
            //Automatically add link to serialized form page for serializable classes.
2216
b124d5c924eb 6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents: 1787
diff changeset
   221
            if ((SerializedFormBuilder.serialInclude(holder) &&
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   222
                      SerializedFormBuilder.serialInclude(((ClassDoc)holder).containingPackage()))) {
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   223
                appendSeparatorIfNotEmpty(body);
14358
9eda9239cba0 8000416: refactor javadoc to provide and use an abstraction for relative URIs
jjg
parents: 14357
diff changeset
   224
                DocPath serialPath = htmlWriter.pathToRoot.resolve(DocPaths.SERIALIZED_FORM);
9eda9239cba0 8000416: refactor javadoc to provide and use an abstraction for relative URIs
jjg
parents: 14357
diff changeset
   225
                DocLink link = serialPath.fragment(((ClassDoc)holder).qualifiedName());
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   226
                body.addContent(htmlWriter.getHyperLink(link,
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   227
                        new StringContent(configuration.getText("doclet.Serialized_Form"))));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   228
            }
06bc494ca11e Initial load
duke
parents:
diff changeset
   229
        }
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   230
        if (body.isEmpty())
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   231
            return body;
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   232
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   233
        ContentBuilder result = new ContentBuilder();
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21023
diff changeset
   234
        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.seeLabel,
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   235
                new StringContent(configuration.getText("doclet.See_Also")))));
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   236
        result.addContent(HtmlTree.DD(body));
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   237
        return result;
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   238
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   239
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   240
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   241
    private void appendSeparatorIfNotEmpty(ContentBuilder body) {
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   242
        if (!body.isEmpty()) {
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   243
            body.addContent(", ");
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   244
            body.addContent(DocletConstants.NL);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   245
        }
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   246
    }
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   247
06bc494ca11e Initial load
duke
parents:
diff changeset
   248
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   249
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   250
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   251
    public Content simpleTagOutput(Tag[] simpleTags, String header) {
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   252
        ContentBuilder result = new ContentBuilder();
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21023
diff changeset
   253
        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   254
        ContentBuilder body = new ContentBuilder();
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   255
        for (int i = 0; i < simpleTags.length; i++) {
06bc494ca11e Initial load
duke
parents:
diff changeset
   256
            if (i > 0) {
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   257
                body.addContent(", ");
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   258
            }
17568
d9691936f5f9 8012177: HTMLDocletWriter methods should generate Content, not Strings
jjg
parents: 17567
diff changeset
   259
            body.addContent(htmlWriter.commentTagsToContent(
d9691936f5f9 8012177: HTMLDocletWriter methods should generate Content, not Strings
jjg
parents: 17567
diff changeset
   260
                    simpleTags[i], null, simpleTags[i].inlineTags(), false));
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   261
        }
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   262
        result.addContent(HtmlTree.DD(body));
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   263
        return result;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   264
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   265
06bc494ca11e Initial load
duke
parents:
diff changeset
   266
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   267
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   268
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   269
    public Content simpleTagOutput(Tag simpleTag, String header) {
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   270
        ContentBuilder result = new ContentBuilder();
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21023
diff changeset
   271
        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
17568
d9691936f5f9 8012177: HTMLDocletWriter methods should generate Content, not Strings
jjg
parents: 17567
diff changeset
   272
        Content body = htmlWriter.commentTagsToContent(
d9691936f5f9 8012177: HTMLDocletWriter methods should generate Content, not Strings
jjg
parents: 17567
diff changeset
   273
                simpleTag, null, simpleTag.inlineTags(), false);
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   274
        result.addContent(HtmlTree.DD(body));
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   275
        return result;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   276
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   277
06bc494ca11e Initial load
duke
parents:
diff changeset
   278
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   279
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   280
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   281
    public Content getThrowsHeader() {
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 21023
diff changeset
   282
        HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.throwsLabel,
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   283
                new StringContent(configuration.getText("doclet.Throws"))));
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   284
        return result;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   285
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   286
06bc494ca11e Initial load
duke
parents:
diff changeset
   287
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   288
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   289
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   290
    public Content throwsTagOutput(ThrowsTag throwsTag) {
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   291
        ContentBuilder body = new ContentBuilder();
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   292
        Content excName = (throwsTag.exceptionType() == null) ?
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   293
                new RawHtml(throwsTag.exceptionName()) :
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 14542
diff changeset
   294
                htmlWriter.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER,
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   295
                throwsTag.exceptionType()));
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   296
        body.addContent(HtmlTree.CODE(excName));
17568
d9691936f5f9 8012177: HTMLDocletWriter methods should generate Content, not Strings
jjg
parents: 17567
diff changeset
   297
        Content desc = htmlWriter.commentTagsToContent(throwsTag, null,
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   298
            throwsTag.inlineTags(), false);
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   299
        if (desc != null && !desc.isEmpty()) {
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   300
            body.addContent(" - ");
17568
d9691936f5f9 8012177: HTMLDocletWriter methods should generate Content, not Strings
jjg
parents: 17567
diff changeset
   301
            body.addContent(desc);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   302
        }
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   303
        HtmlTree result = HtmlTree.DD(body);
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   304
        return result;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   305
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   306
06bc494ca11e Initial load
duke
parents:
diff changeset
   307
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   308
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   309
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   310
    public Content throwsTagOutput(Type throwsType) {
17566
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   311
        HtmlTree result = HtmlTree.DD(HtmlTree.CODE(htmlWriter.getLink(
7e1a338e1085 8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
jjg
parents: 17565
diff changeset
   312
                new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, throwsType))));
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   313
        return result;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   314
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   315
06bc494ca11e Initial load
duke
parents:
diff changeset
   316
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   317
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   318
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   319
    public Content valueTagOutput(FieldDoc field, String constantVal,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   320
            boolean includeLink) {
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   321
        return includeLink ?
17558
eee4ccf66cfd 8010440: Replace int constants in LinkInfoImpl with enum
jjg
parents: 14542
diff changeset
   322
            htmlWriter.getDocLink(LinkInfoImpl.Kind.VALUE_TAG, field,
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   323
                constantVal, false) : new RawHtml(constantVal);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   324
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   325
06bc494ca11e Initial load
duke
parents:
diff changeset
   326
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   327
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   328
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   329
    public Content commentTagsToOutput(Tag holderTag, Tag[] tags) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   330
        return commentTagsToOutput(holderTag, null, tags, false);
06bc494ca11e Initial load
duke
parents:
diff changeset
   331
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   332
06bc494ca11e Initial load
duke
parents:
diff changeset
   333
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   334
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   335
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   336
    public Content commentTagsToOutput(Doc holderDoc, Tag[] tags) {
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   337
        return commentTagsToOutput(null, holderDoc, tags, false);
06bc494ca11e Initial load
duke
parents:
diff changeset
   338
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   339
06bc494ca11e Initial load
duke
parents:
diff changeset
   340
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   341
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   342
     */
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   343
    public Content commentTagsToOutput(Tag holderTag,
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   344
        Doc holderDoc, Tag[] tags, boolean isFirstSentence) {
17574
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   345
        return htmlWriter.commentTagsToContent(
044c7e1e4d53 8012308: Remove TagletOutput in favor of direct use of Content
jjg
parents: 17572
diff changeset
   346
            holderTag, holderDoc, tags, isFirstSentence);
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   347
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   348
06bc494ca11e Initial load
duke
parents:
diff changeset
   349
    /**
06bc494ca11e Initial load
duke
parents:
diff changeset
   350
     * {@inheritDoc}
06bc494ca11e Initial load
duke
parents:
diff changeset
   351
     */
06bc494ca11e Initial load
duke
parents:
diff changeset
   352
    public Configuration configuration() {
14542
7062120649c2 8000800: javadoc uses static non-final fields
jjg
parents: 14358
diff changeset
   353
        return configuration;
10
06bc494ca11e Initial load
duke
parents:
diff changeset
   354
    }
06bc494ca11e Initial load
duke
parents:
diff changeset
   355
}