author | jjg |
Tue, 14 May 2013 10:14:55 -0700 | |
changeset 17570 | 78512b2899db |
parent 15723 | 58a73dac9ee4 |
permissions | -rw-r--r-- |
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
1 |
/* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
2 |
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
4 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. Oracle designates this |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
8 |
* particular file as subject to the "Classpath" exception as provided |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
10 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
15 |
* accompanied this code). |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
16 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
20 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
22 |
* or visit www.oracle.com if you need additional information or have any |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
23 |
* questions. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
24 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
25 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
26 |
package com.sun.tools.doclets.formats.html; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
27 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
28 |
import java.io.*; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
29 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
30 |
import com.sun.tools.javac.sym.Profiles; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
31 |
import com.sun.tools.doclets.formats.html.markup.*; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
32 |
import com.sun.tools.doclets.internal.toolkit.*; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
33 |
import com.sun.tools.doclets.internal.toolkit.util.DocPath; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
34 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
35 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
36 |
* Abstract class to generate the profile overview files in |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
37 |
* Frame and Non-Frame format. This will be sub-classed to |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
38 |
* generate profile-overview-frame.html as well as profile-overview-summary.html. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
39 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
40 |
* <p><b>This is NOT part of any supported API. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
41 |
* If you write code that depends on this, you do so at your own risk. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
42 |
* This code and its internal interfaces are subject to change or |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
43 |
* deletion without notice.</b> |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
44 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
45 |
* @author Bhavesh Patel |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
46 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
47 |
public abstract class AbstractProfileIndexWriter extends HtmlDocletWriter { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
48 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
49 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
50 |
* Profiles to be documented. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
51 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
52 |
protected Profiles profiles; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
53 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
54 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
55 |
* Constructor. Also initializes the profiles variable. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
56 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
57 |
* @param configuration The current configuration |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
58 |
* @param filename Name of the profile index file to be generated. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
59 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
60 |
public AbstractProfileIndexWriter(ConfigurationImpl configuration, |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
61 |
DocPath filename) throws IOException { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
62 |
super(configuration, filename); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
63 |
profiles = configuration.profiles; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
64 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
65 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
66 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
67 |
* Adds the navigation bar header to the documentation tree. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
68 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
69 |
* @param body the document tree to which the navigation bar header will be added |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
70 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
71 |
protected abstract void addNavigationBarHeader(Content body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
72 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
73 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
74 |
* Adds the navigation bar footer to the documentation tree. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
75 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
76 |
* @param body the document tree to which the navigation bar footer will be added |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
77 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
78 |
protected abstract void addNavigationBarFooter(Content body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
79 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
80 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
81 |
* Adds the overview header to the documentation tree. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
82 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
83 |
* @param body the document tree to which the overview header will be added |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
84 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
85 |
protected abstract void addOverviewHeader(Content body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
86 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
87 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
88 |
* Adds the profiles list to the documentation tree. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
89 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
90 |
* @param profiles profiles object |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
91 |
* @param text caption for the table |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
92 |
* @param tableSummary summary for the table |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
93 |
* @param body the document tree to which the profiles list will be added |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
94 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
95 |
protected abstract void addProfilesList(Profiles profiles, String text, |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
96 |
String tableSummary, Content body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
97 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
98 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
99 |
* Adds the profile packages list to the documentation tree. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
100 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
101 |
* @param profiles profiles object |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
102 |
* @param text caption for the table |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
103 |
* @param tableSummary summary for the table |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
104 |
* @param body the document tree to which the profiles list will be added |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
105 |
* @param profileName the name for the profile being documented |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
106 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
107 |
protected abstract void addProfilePackagesList(Profiles profiles, String text, |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
108 |
String tableSummary, Content body, String profileName); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
109 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
110 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
111 |
* Generate and prints the contents in the profile index file. Call appropriate |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
112 |
* methods from the sub-class in order to generate Frame or Non |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
113 |
* Frame format. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
114 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
115 |
* @param title the title of the window. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
116 |
* @param includeScript boolean set true if windowtitle script is to be included |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
117 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
118 |
protected void buildProfileIndexFile(String title, boolean includeScript) throws IOException { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
119 |
String windowOverview = configuration.getText(title); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
120 |
Content body = getBody(includeScript, getWindowTitle(windowOverview)); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
121 |
addNavigationBarHeader(body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
122 |
addOverviewHeader(body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
123 |
addIndex(body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
124 |
addOverview(body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
125 |
addNavigationBarFooter(body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
126 |
printHtmlDocument(configuration.metakeywords.getOverviewMetaKeywords(title, |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
127 |
configuration.doctitle), includeScript, body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
128 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
129 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
130 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
131 |
* Generate and prints the contents in the profile packages index file. Call appropriate |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
132 |
* methods from the sub-class in order to generate Frame or Non |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
133 |
* Frame format. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
134 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
135 |
* @param title the title of the window. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
136 |
* @param includeScript boolean set true if windowtitle script is to be included |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
137 |
* @param profileName the name of the profile being documented |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
138 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
139 |
protected void buildProfilePackagesIndexFile(String title, |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
140 |
boolean includeScript, String profileName) throws IOException { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
141 |
String windowOverview = configuration.getText(title); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
142 |
Content body = getBody(includeScript, getWindowTitle(windowOverview)); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
143 |
addNavigationBarHeader(body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
144 |
addOverviewHeader(body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
145 |
addProfilePackagesIndex(body, profileName); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
146 |
addOverview(body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
147 |
addNavigationBarFooter(body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
148 |
printHtmlDocument(configuration.metakeywords.getOverviewMetaKeywords(title, |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
149 |
configuration.doctitle), includeScript, body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
150 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
151 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
152 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
153 |
* Default to no overview, override to add overview. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
154 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
155 |
* @param body the document tree to which the overview will be added |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
156 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
157 |
protected void addOverview(Content body) throws IOException { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
158 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
159 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
160 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
161 |
* Adds the frame or non-frame profile index to the documentation tree. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
162 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
163 |
* @param body the document tree to which the index will be added |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
164 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
165 |
protected void addIndex(Content body) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
166 |
addIndexContents(profiles, "doclet.Profile_Summary", |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
167 |
configuration.getText("doclet.Member_Table_Summary", |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
168 |
configuration.getText("doclet.Profile_Summary"), |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
169 |
configuration.getText("doclet.profiles")), body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
170 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
171 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
172 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
173 |
* Adds the frame or non-frame profile packages index to the documentation tree. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
174 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
175 |
* @param body the document tree to which the index will be added |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
176 |
* @param profileName the name of the profile being documented |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
177 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
178 |
protected void addProfilePackagesIndex(Content body, String profileName) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
179 |
addProfilePackagesIndexContents(profiles, "doclet.Profile_Summary", |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
180 |
configuration.getText("doclet.Member_Table_Summary", |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
181 |
configuration.getText("doclet.Profile_Summary"), |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
182 |
configuration.getText("doclet.profiles")), body, profileName); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
183 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
184 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
185 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
186 |
* Adds profile index contents. Call appropriate methods from |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
187 |
* the sub-classes. Adds it to the body HtmlTree |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
188 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
189 |
* @param profiles profiles to be documented |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
190 |
* @param text string which will be used as the heading |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
191 |
* @param tableSummary summary for the table |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
192 |
* @param body the document tree to which the index contents will be added |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
193 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
194 |
protected void addIndexContents(Profiles profiles, String text, |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
195 |
String tableSummary, Content body) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
196 |
if (profiles.getProfileCount() > 0) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
197 |
HtmlTree div = new HtmlTree(HtmlTag.DIV); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
198 |
div.addStyle(HtmlStyle.indexHeader); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
199 |
addAllClassesLink(div); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
200 |
addAllPackagesLink(div); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
201 |
body.addContent(div); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
202 |
addProfilesList(profiles, text, tableSummary, body); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
203 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
204 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
205 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
206 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
207 |
* Adds profile packages index contents. Call appropriate methods from |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
208 |
* the sub-classes. Adds it to the body HtmlTree |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
209 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
210 |
* @param profiles profiles to be documented |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
211 |
* @param text string which will be used as the heading |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
212 |
* @param tableSummary summary for the table |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
213 |
* @param body the document tree to which the index contents will be added |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
214 |
* @param profileName the name of the profile being documented |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
215 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
216 |
protected void addProfilePackagesIndexContents(Profiles profiles, String text, |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
217 |
String tableSummary, Content body, String profileName) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
218 |
HtmlTree div = new HtmlTree(HtmlTag.DIV); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
219 |
div.addStyle(HtmlStyle.indexHeader); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
220 |
addAllClassesLink(div); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
221 |
addAllPackagesLink(div); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
222 |
addAllProfilesLink(div); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
223 |
body.addContent(div); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
224 |
addProfilePackagesList(profiles, text, tableSummary, body, profileName); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
225 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
226 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
227 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
228 |
* Adds the doctitle to the documentation tree, if it is specified on the command line. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
229 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
230 |
* @param body the document tree to which the title will be added |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
231 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
232 |
protected void addConfigurationTitle(Content body) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
233 |
if (configuration.doctitle.length() > 0) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
234 |
Content title = new RawHtml(configuration.doctitle); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
235 |
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
236 |
HtmlStyle.title, title); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
237 |
Content div = HtmlTree.DIV(HtmlStyle.header, heading); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
238 |
body.addContent(div); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
239 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
240 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
241 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
242 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
243 |
* Returns highlighted "Overview", in the navigation bar as this is the |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
244 |
* overview page. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
245 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
246 |
* @return a Content object to be added to the documentation tree |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
247 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
248 |
protected Content getNavLinkContents() { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
249 |
Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, overviewLabel); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
250 |
return li; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
251 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
252 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
253 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
254 |
* Do nothing. This will be overridden in ProfileIndexFrameWriter. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
255 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
256 |
* @param div the document tree to which the all classes link will be added |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
257 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
258 |
protected void addAllClassesLink(Content div) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
259 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
260 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
261 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
262 |
* Do nothing. This will be overridden in ProfileIndexFrameWriter. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
263 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
264 |
* @param div the document tree to which the all packages link will be added |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
265 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
266 |
protected void addAllPackagesLink(Content div) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
267 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
268 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
269 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
270 |
* Do nothing. This will be overridden in ProfilePackageIndexFrameWriter. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
271 |
* |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
272 |
* @param div the document tree to which the all profiles link will be added |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
273 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
274 |
protected void addAllProfilesLink(Content div) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
275 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
diff
changeset
|
276 |
} |