author | jjg |
Tue, 14 May 2013 10:14:53 -0700 | |
changeset 17563 | e8ddeb9bd17c |
parent 16560 | c6c7f0c26568 |
child 17570 | 78512b2899db |
permissions | -rw-r--r-- |
10 | 1 |
/* |
15354 | 2 |
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
10 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5520 | 7 |
* published by the Free Software Foundation. Oracle designates this |
10 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5520 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
10 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5520 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
10 | 24 |
*/ |
25 |
||
26 |
package com.sun.tools.doclets.internal.toolkit; |
|
27 |
||
14258 | 28 |
import java.io.*; |
29 |
import java.util.*; |
|
17563
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
30 |
import java.util.regex.Matcher; |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
31 |
import java.util.regex.Pattern; |
14258 | 32 |
|
33 |
import com.sun.javadoc.*; |
|
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
34 |
import com.sun.tools.javac.sym.Profiles; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
35 |
import com.sun.tools.javac.jvm.Profile; |
14258 | 36 |
import com.sun.tools.doclets.internal.toolkit.builders.BuilderFactory; |
10 | 37 |
import com.sun.tools.doclets.internal.toolkit.taglets.*; |
38 |
import com.sun.tools.doclets.internal.toolkit.util.*; |
|
14544 | 39 |
import javax.tools.JavaFileManager; |
10 | 40 |
|
41 |
/** |
|
42 |
* Configure the output based on the options. Doclets should sub-class |
|
43 |
* Configuration, to configure and add their own options. This class contains |
|
44 |
* all user options which are supported by the 1.1 doclet and the standard |
|
45 |
* doclet. |
|
46 |
* |
|
14260
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
47 |
* <p><b>This is NOT part of any supported API. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
48 |
* If you write code that depends on this, you do so at your own risk. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
49 |
* This code and its internal interfaces are subject to change or |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14258
diff
changeset
|
50 |
* deletion without notice.</b> |
10 | 51 |
* |
52 |
* @author Robert Field. |
|
53 |
* @author Atul Dambalkar. |
|
54 |
* @author Jamie Ho |
|
55 |
*/ |
|
56 |
public abstract class Configuration { |
|
57 |
||
58 |
/** |
|
16324 | 59 |
* Exception used to report a problem during setOptions. |
60 |
*/ |
|
16560 | 61 |
public static class Fault extends Exception { |
16324 | 62 |
private static final long serialVersionUID = 0; |
63 |
||
64 |
Fault(String msg) { |
|
65 |
super(msg); |
|
66 |
} |
|
67 |
||
68 |
Fault(String msg, Exception cause) { |
|
69 |
super(msg, cause); |
|
70 |
} |
|
71 |
} |
|
72 |
||
73 |
/** |
|
10 | 74 |
* The factory for builders. |
75 |
*/ |
|
76 |
protected BuilderFactory builderFactory; |
|
77 |
||
78 |
/** |
|
79 |
* The taglet manager. |
|
80 |
*/ |
|
81 |
public TagletManager tagletManager; |
|
82 |
||
83 |
/** |
|
84 |
* The path to the builder XML input file. |
|
85 |
*/ |
|
86 |
public String builderXMLPath; |
|
87 |
||
88 |
/** |
|
89 |
* The default path to the builder XML. |
|
90 |
*/ |
|
91 |
private static final String DEFAULT_BUILDER_XML = "resources/doclet.xml"; |
|
92 |
||
93 |
/** |
|
94 |
* The path to Taglets |
|
95 |
*/ |
|
96 |
public String tagletpath = ""; |
|
97 |
||
98 |
/** |
|
99 |
* This is true if option "-serialwarn" is used. Defualt value is false to |
|
14545
2e7bab0639b8
6493690: javadoc should have a javax.tools.Tool service provider installed in tools.jar
jjg
parents:
14544
diff
changeset
|
100 |
* suppress excessive warnings about serial tag. |
10 | 101 |
*/ |
102 |
public boolean serialwarn = false; |
|
103 |
||
104 |
/** |
|
105 |
* The specified amount of space between tab stops. |
|
106 |
*/ |
|
14542 | 107 |
public int sourcetab; |
108 |
||
109 |
public String tabSpaces; |
|
10 | 110 |
|
111 |
/** |
|
112 |
* True if we should generate browsable sources. |
|
113 |
*/ |
|
114 |
public boolean linksource = false; |
|
115 |
||
116 |
/** |
|
117 |
* True if command line option "-nosince" is used. Default value is |
|
118 |
* false. |
|
119 |
*/ |
|
120 |
public boolean nosince = false; |
|
121 |
||
122 |
/** |
|
123 |
* True if we should recursively copy the doc-file subdirectories |
|
124 |
*/ |
|
125 |
public boolean copydocfilesubdirs = false; |
|
126 |
||
127 |
/** |
|
128 |
* The META charset tag used for cross-platform viewing. |
|
129 |
*/ |
|
130 |
public String charset = ""; |
|
131 |
||
132 |
/** |
|
133 |
* True if user wants to add member names as meta keywords. |
|
134 |
* Set to false because meta keywords are ignored in general |
|
135 |
* by most Internet search engines. |
|
136 |
*/ |
|
137 |
public boolean keywords = false; |
|
138 |
||
139 |
/** |
|
1475 | 140 |
* The meta tag keywords instance. |
10 | 141 |
*/ |
1475 | 142 |
public final MetaKeywords metakeywords = new MetaKeywords(this); |
10 | 143 |
|
144 |
/** |
|
145 |
* The list of doc-file subdirectories to exclude |
|
146 |
*/ |
|
868 | 147 |
protected Set<String> excludedDocFileDirs; |
10 | 148 |
|
149 |
/** |
|
150 |
* The list of qualifiers to exclude |
|
151 |
*/ |
|
868 | 152 |
protected Set<String> excludedQualifiers; |
10 | 153 |
|
154 |
/** |
|
155 |
* The Root of the generated Program Structure from the Doclet API. |
|
156 |
*/ |
|
157 |
public RootDoc root; |
|
158 |
||
159 |
/** |
|
160 |
* Destination directory name, in which doclet will generate the entire |
|
161 |
* documentation. Default is current directory. |
|
162 |
*/ |
|
163 |
public String destDirName = ""; |
|
164 |
||
165 |
/** |
|
166 |
* Destination directory name, in which doclet will copy the doc-files to. |
|
167 |
*/ |
|
168 |
public String docFileDestDirName = ""; |
|
169 |
||
170 |
/** |
|
171 |
* Encoding for this document. Default is default encoding for this |
|
172 |
* platform. |
|
173 |
*/ |
|
174 |
public String docencoding = null; |
|
175 |
||
176 |
/** |
|
177 |
* True if user wants to suppress descriptions and tags. |
|
178 |
*/ |
|
179 |
public boolean nocomment = false; |
|
180 |
||
181 |
/** |
|
182 |
* Encoding for this document. Default is default encoding for this |
|
183 |
* platform. |
|
184 |
*/ |
|
185 |
public String encoding = null; |
|
186 |
||
187 |
/** |
|
188 |
* Generate author specific information for all the classes if @author |
|
189 |
* tag is used in the doc comment and if -author option is used. |
|
190 |
* <code>showauthor</code> is set to true if -author option is used. |
|
191 |
* Default is don't show author information. |
|
192 |
*/ |
|
193 |
public boolean showauthor = false; |
|
194 |
||
195 |
/** |
|
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15725
diff
changeset
|
196 |
* Generate documentation for JavaFX getters and setters automatically |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15725
diff
changeset
|
197 |
* by copying it from the appropriate property definition. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15725
diff
changeset
|
198 |
*/ |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15725
diff
changeset
|
199 |
public boolean javafx = false; |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15725
diff
changeset
|
200 |
|
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15725
diff
changeset
|
201 |
/** |
10 | 202 |
* Generate version specific information for the all the classes |
203 |
* if @version tag is used in the doc comment and if -version option is |
|
204 |
* used. <code>showversion</code> is set to true if -version option is |
|
205 |
* used.Default is don't show version information. |
|
206 |
*/ |
|
207 |
public boolean showversion = false; |
|
208 |
||
209 |
/** |
|
210 |
* Sourcepath from where to read the source files. Default is classpath. |
|
211 |
* |
|
212 |
*/ |
|
213 |
public String sourcepath = ""; |
|
214 |
||
215 |
/** |
|
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
216 |
* Argument for command line option "-Xprofilespath". |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
217 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
218 |
public String profilespath = ""; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
219 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
220 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
221 |
* Generate profiles documentation if profilespath is set and valid profiles |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
222 |
* are present. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
223 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
224 |
public boolean showProfiles = false; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
225 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
226 |
/** |
10 | 227 |
* Don't generate deprecated API information at all, if -nodeprecated |
228 |
* option is used. <code>nodepracted</code> is set to true if |
|
229 |
* -nodeprecated option is used. Default is generate deprected API |
|
230 |
* information. |
|
231 |
*/ |
|
232 |
public boolean nodeprecated = false; |
|
233 |
||
234 |
/** |
|
235 |
* The catalog of classes specified on the command-line |
|
236 |
*/ |
|
237 |
public ClassDocCatalog classDocCatalog; |
|
238 |
||
239 |
/** |
|
240 |
* Message Retriever for the doclet, to retrieve message from the resource |
|
241 |
* file for this Configuration, which is common for 1.1 and standard |
|
242 |
* doclets. |
|
243 |
* |
|
244 |
* TODO: Make this private!!! |
|
245 |
*/ |
|
246 |
public MessageRetriever message = null; |
|
247 |
||
248 |
/** |
|
249 |
* True if user wants to suppress time stamp in output. |
|
250 |
* Default is false. |
|
251 |
*/ |
|
252 |
public boolean notimestamp= false; |
|
253 |
||
254 |
/** |
|
1475 | 255 |
* The package grouping instance. |
10 | 256 |
*/ |
1475 | 257 |
public final Group group = new Group(this); |
10 | 258 |
|
259 |
/** |
|
1475 | 260 |
* The tracker of external package links. |
10 | 261 |
*/ |
262 |
public final Extern extern = new Extern(this); |
|
263 |
||
264 |
/** |
|
265 |
* Return the build date for the doclet. |
|
266 |
*/ |
|
267 |
public abstract String getDocletSpecificBuildDate(); |
|
268 |
||
269 |
/** |
|
270 |
* This method should be defined in all those doclets(configurations), |
|
271 |
* which want to derive themselves from this Configuration. This method |
|
272 |
* can be used to set its own command line options. |
|
273 |
* |
|
274 |
* @param options The array of option names and values. |
|
275 |
* @throws DocletAbortException |
|
276 |
*/ |
|
16324 | 277 |
public abstract void setSpecificDocletOptions(String[][] options) throws Fault; |
10 | 278 |
|
279 |
/** |
|
280 |
* Return the doclet specific {@link MessageRetriever} |
|
281 |
* @return the doclet specific MessageRetriever. |
|
282 |
*/ |
|
283 |
public abstract MessageRetriever getDocletSpecificMsg(); |
|
284 |
||
285 |
/** |
|
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
286 |
* A profiles object used to access profiles across various pages. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
287 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
288 |
public Profiles profiles; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
289 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
290 |
/** |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
291 |
* An map of the profiles to packages. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
292 |
*/ |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
293 |
public Map<String,PackageDoc[]> profilePackages; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
294 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
295 |
/** |
10 | 296 |
* An array of the packages specified on the command-line merged |
297 |
* with the array of packages that contain the classes specified on the |
|
298 |
* command-line. The array is sorted. |
|
299 |
*/ |
|
300 |
public PackageDoc[] packages; |
|
301 |
||
302 |
/** |
|
303 |
* Constructor. Constructs the message retriever with resource file. |
|
304 |
*/ |
|
305 |
public Configuration() { |
|
306 |
message = |
|
307 |
new MessageRetriever(this, |
|
308 |
"com.sun.tools.doclets.internal.toolkit.resources.doclets"); |
|
868 | 309 |
excludedDocFileDirs = new HashSet<String>(); |
310 |
excludedQualifiers = new HashSet<String>(); |
|
14542 | 311 |
setTabWidth(DocletConstants.DEFAULT_TAB_STOP_LENGTH); |
10 | 312 |
} |
313 |
||
314 |
/** |
|
315 |
* Return the builder factory for this doclet. |
|
316 |
* |
|
317 |
* @return the builder factory for this doclet. |
|
318 |
*/ |
|
319 |
public BuilderFactory getBuilderFactory() { |
|
320 |
if (builderFactory == null) { |
|
321 |
builderFactory = new BuilderFactory(this); |
|
322 |
} |
|
323 |
return builderFactory; |
|
324 |
} |
|
325 |
||
326 |
/** |
|
327 |
* This method should be defined in all those doclets |
|
328 |
* which want to inherit from this Configuration. This method |
|
329 |
* should return the number of arguments to the command line |
|
330 |
* option (including the option name). For example, |
|
331 |
* -notimestamp is a single-argument option, so this method would |
|
332 |
* return 1. |
|
333 |
* |
|
334 |
* @param option Command line option under consideration. |
|
335 |
* @return number of arguments to option (including the |
|
336 |
* option name). Zero return means option not known. |
|
337 |
* Negative value means error occurred. |
|
338 |
*/ |
|
339 |
public int optionLength(String option) { |
|
340 |
option = option.toLowerCase(); |
|
341 |
if (option.equals("-author") || |
|
342 |
option.equals("-docfilessubdirs") || |
|
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15725
diff
changeset
|
343 |
option.equals("-javafx") || |
10 | 344 |
option.equals("-keywords") || |
345 |
option.equals("-linksource") || |
|
346 |
option.equals("-nocomment") || |
|
347 |
option.equals("-nodeprecated") || |
|
348 |
option.equals("-nosince") || |
|
349 |
option.equals("-notimestamp") || |
|
350 |
option.equals("-quiet") || |
|
351 |
option.equals("-xnodate") || |
|
352 |
option.equals("-version")) { |
|
353 |
return 1; |
|
354 |
} else if (option.equals("-d") || |
|
355 |
option.equals("-docencoding") || |
|
356 |
option.equals("-encoding") || |
|
357 |
option.equals("-excludedocfilessubdir") || |
|
358 |
option.equals("-link") || |
|
359 |
option.equals("-sourcetab") || |
|
360 |
option.equals("-noqualifier") || |
|
361 |
option.equals("-output") || |
|
362 |
option.equals("-sourcepath") || |
|
363 |
option.equals("-tag") || |
|
364 |
option.equals("-taglet") || |
|
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
365 |
option.equals("-tagletpath") || |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
366 |
option.equals("-xprofilespath")) { |
10 | 367 |
return 2; |
368 |
} else if (option.equals("-group") || |
|
369 |
option.equals("-linkoffline")) { |
|
370 |
return 3; |
|
371 |
} else { |
|
372 |
return -1; // indicate we don't know about it |
|
373 |
} |
|
374 |
} |
|
375 |
||
376 |
/** |
|
377 |
* Perform error checking on the given options. |
|
378 |
* |
|
379 |
* @param options the given options to check. |
|
380 |
* @param reporter the reporter used to report errors. |
|
381 |
*/ |
|
382 |
public abstract boolean validOptions(String options[][], |
|
383 |
DocErrorReporter reporter); |
|
384 |
||
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
385 |
private void initProfiles() throws IOException { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
386 |
profiles = Profiles.read(new File(profilespath)); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
387 |
// Generate profiles documentation only is profilespath is set and if |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
388 |
// profiles is not null and profiles count is 1 or more. |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
389 |
showProfiles = (!profilespath.isEmpty() && profiles != null && |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
390 |
profiles.getProfileCount() > 0); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
391 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
392 |
|
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
393 |
private void initProfilePackages() throws IOException { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
394 |
profilePackages = new HashMap<String,PackageDoc[]>(); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
395 |
ArrayList<PackageDoc> results; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
396 |
Map<String,PackageDoc> packageIndex = new HashMap<String,PackageDoc>(); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
397 |
for (int i = 0; i < packages.length; i++) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
398 |
PackageDoc pkg = packages[i]; |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
399 |
packageIndex.put(pkg.name(), pkg); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
400 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
401 |
for (int i = 1; i < profiles.getProfileCount(); i++) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
402 |
Set<String> profPkgs = profiles.getPackages(i); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
403 |
results = new ArrayList<PackageDoc>(); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
404 |
for (String packageName : profPkgs) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
405 |
packageName = packageName.replace("/", "."); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
406 |
PackageDoc profPkg = packageIndex.get(packageName); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
407 |
if (profPkg != null) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
408 |
results.add(profPkg); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
409 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
410 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
411 |
Collections.sort(results); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
412 |
PackageDoc[] profilePkgs = results.toArray(new PackageDoc[]{}); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
413 |
profilePackages.put(Profile.lookup(i).name, profilePkgs); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
414 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
415 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
416 |
|
10 | 417 |
private void initPackageArray() { |
868 | 418 |
Set<PackageDoc> set = new HashSet<PackageDoc>(Arrays.asList(root.specifiedPackages())); |
10 | 419 |
ClassDoc[] classes = root.specifiedClasses(); |
420 |
for (int i = 0; i < classes.length; i++) { |
|
421 |
set.add(classes[i].containingPackage()); |
|
422 |
} |
|
868 | 423 |
ArrayList<PackageDoc> results = new ArrayList<PackageDoc>(set); |
10 | 424 |
Collections.sort(results); |
868 | 425 |
packages = results.toArray(new PackageDoc[] {}); |
10 | 426 |
} |
427 |
||
428 |
/** |
|
429 |
* Set the command line options supported by this configuration. |
|
430 |
* |
|
431 |
* @param options the two dimensional array of options. |
|
432 |
*/ |
|
16324 | 433 |
public void setOptions(String[][] options) throws Fault { |
868 | 434 |
LinkedHashSet<String[]> customTagStrs = new LinkedHashSet<String[]>(); |
16324 | 435 |
|
436 |
// Some options, specifically -link and -linkoffline, require that |
|
437 |
// the output directory has already been created: so do that first. |
|
10 | 438 |
for (int oi = 0; oi < options.length; ++oi) { |
439 |
String[] os = options[oi]; |
|
440 |
String opt = os[0].toLowerCase(); |
|
441 |
if (opt.equals("-d")) { |
|
442 |
destDirName = addTrailingFileSep(os[1]); |
|
443 |
docFileDestDirName = destDirName; |
|
16324 | 444 |
ensureOutputDirExists(); |
445 |
break; |
|
446 |
} |
|
447 |
} |
|
448 |
||
449 |
for (int oi = 0; oi < options.length; ++oi) { |
|
450 |
String[] os = options[oi]; |
|
451 |
String opt = os[0].toLowerCase(); |
|
452 |
if (opt.equals("-docfilessubdirs")) { |
|
10 | 453 |
copydocfilesubdirs = true; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9606
diff
changeset
|
454 |
} else if (opt.equals("-docencoding")) { |
10 | 455 |
docencoding = os[1]; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9606
diff
changeset
|
456 |
} else if (opt.equals("-encoding")) { |
10 | 457 |
encoding = os[1]; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9606
diff
changeset
|
458 |
} else if (opt.equals("-author")) { |
10 | 459 |
showauthor = true; |
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15725
diff
changeset
|
460 |
} else if (opt.equals("-javafx")) { |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15725
diff
changeset
|
461 |
javafx = true; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9606
diff
changeset
|
462 |
} else if (opt.equals("-nosince")) { |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9606
diff
changeset
|
463 |
nosince = true; |
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9606
diff
changeset
|
464 |
} else if (opt.equals("-version")) { |
10 | 465 |
showversion = true; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9606
diff
changeset
|
466 |
} else if (opt.equals("-nodeprecated")) { |
10 | 467 |
nodeprecated = true; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9606
diff
changeset
|
468 |
} else if (opt.equals("-sourcepath")) { |
10 | 469 |
sourcepath = os[1]; |
470 |
} else if (opt.equals("-classpath") && |
|
471 |
sourcepath.length() == 0) { |
|
472 |
sourcepath = os[1]; |
|
473 |
} else if (opt.equals("-excludedocfilessubdir")) { |
|
474 |
addToSet(excludedDocFileDirs, os[1]); |
|
475 |
} else if (opt.equals("-noqualifier")) { |
|
476 |
addToSet(excludedQualifiers, os[1]); |
|
477 |
} else if (opt.equals("-linksource")) { |
|
478 |
linksource = true; |
|
479 |
} else if (opt.equals("-sourcetab")) { |
|
480 |
linksource = true; |
|
481 |
try { |
|
14542 | 482 |
setTabWidth(Integer.parseInt(os[1])); |
10 | 483 |
} catch (NumberFormatException e) { |
484 |
//Set to -1 so that warning will be printed |
|
485 |
//to indicate what is valid argument. |
|
486 |
sourcetab = -1; |
|
487 |
} |
|
488 |
if (sourcetab <= 0) { |
|
489 |
message.warning("doclet.sourcetab_warning"); |
|
14542 | 490 |
setTabWidth(DocletConstants.DEFAULT_TAB_STOP_LENGTH); |
10 | 491 |
} |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9606
diff
changeset
|
492 |
} else if (opt.equals("-notimestamp")) { |
10 | 493 |
notimestamp = true; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9606
diff
changeset
|
494 |
} else if (opt.equals("-nocomment")) { |
10 | 495 |
nocomment = true; |
496 |
} else if (opt.equals("-tag") || opt.equals("-taglet")) { |
|
497 |
customTagStrs.add(os); |
|
498 |
} else if (opt.equals("-tagletpath")) { |
|
499 |
tagletpath = os[1]; |
|
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
500 |
} else if (opt.equals("-xprofilespath")) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
501 |
profilespath = os[1]; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9606
diff
changeset
|
502 |
} else if (opt.equals("-keywords")) { |
10 | 503 |
keywords = true; |
13842
6908f6badce4
7180906: Javadoc tool does not apply parameter -nosince
bpatel
parents:
9606
diff
changeset
|
504 |
} else if (opt.equals("-serialwarn")) { |
10 | 505 |
serialwarn = true; |
506 |
} else if (opt.equals("-group")) { |
|
507 |
group.checkPackageGroups(os[1], os[2]); |
|
508 |
} else if (opt.equals("-link")) { |
|
509 |
String url = os[1]; |
|
14361
2814fa6977ac
8001219: Clean up use of URLs in javadoc Extern class
jjg
parents:
14263
diff
changeset
|
510 |
extern.link(url, url, root, false); |
10 | 511 |
} else if (opt.equals("-linkoffline")) { |
512 |
String url = os[1]; |
|
513 |
String pkglisturl = os[2]; |
|
14361
2814fa6977ac
8001219: Clean up use of URLs in javadoc Extern class
jjg
parents:
14263
diff
changeset
|
514 |
extern.link(url, pkglisturl, root, true); |
10 | 515 |
} |
516 |
} |
|
517 |
if (sourcepath.length() == 0) { |
|
518 |
sourcepath = System.getProperty("env.class.path") == null ? "" : |
|
519 |
System.getProperty("env.class.path"); |
|
520 |
} |
|
521 |
if (docencoding == null) { |
|
522 |
docencoding = encoding; |
|
523 |
} |
|
524 |
||
9606
e5a619cb5dd3
6492694: @deprecated tag doesn't work in package-info files.
bpatel
parents:
5520
diff
changeset
|
525 |
classDocCatalog = new ClassDocCatalog(root.specifiedClasses(), this); |
10 | 526 |
initTagletManager(customTagStrs); |
527 |
} |
|
528 |
||
529 |
/** |
|
530 |
* Set the command line options supported by this configuration. |
|
531 |
* |
|
532 |
* @throws DocletAbortException |
|
533 |
*/ |
|
16324 | 534 |
public void setOptions() throws Fault { |
10 | 535 |
initPackageArray(); |
536 |
setOptions(root.options()); |
|
15723
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
537 |
if (!profilespath.isEmpty()) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
538 |
try { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
539 |
initProfiles(); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
540 |
initProfilePackages(); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
541 |
} catch (Exception e) { |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
542 |
throw new DocletAbortException(); |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
543 |
} |
58a73dac9ee4
8006124: javadoc/doclet should be updated to support profiles
bpatel
parents:
14545
diff
changeset
|
544 |
} |
10 | 545 |
setSpecificDocletOptions(root.options()); |
546 |
} |
|
547 |
||
16324 | 548 |
private void ensureOutputDirExists() throws Fault { |
549 |
DocFile destDir = DocFile.createFileForDirectory(this, destDirName); |
|
550 |
if (!destDir.exists()) { |
|
551 |
//Create the output directory (in case it doesn't exist yet) |
|
552 |
root.printNotice(getText("doclet.dest_dir_create", destDirName)); |
|
553 |
destDir.mkdirs(); |
|
554 |
} else if (!destDir.isDirectory()) { |
|
555 |
throw new Fault(getText( |
|
556 |
"doclet.destination_directory_not_directory_0", |
|
557 |
destDir.getPath())); |
|
558 |
} else if (!destDir.canWrite()) { |
|
559 |
throw new Fault(getText( |
|
560 |
"doclet.destination_directory_not_writable_0", |
|
561 |
destDir.getPath())); |
|
562 |
} |
|
563 |
} |
|
564 |
||
10 | 565 |
|
566 |
/** |
|
567 |
* Initialize the taglet manager. The strings to initialize the simple custom tags should |
|
568 |
* be in the following format: "[tag name]:[location str]:[heading]". |
|
14545
2e7bab0639b8
6493690: javadoc should have a javax.tools.Tool service provider installed in tools.jar
jjg
parents:
14544
diff
changeset
|
569 |
* @param customTagStrs the set two dimensional arrays of strings. These arrays contain |
10 | 570 |
* either -tag or -taglet arguments. |
571 |
*/ |
|
1789
7ac8c0815000
6765045: Remove rawtypes warnings from langtools
mcimadamore
parents:
1475
diff
changeset
|
572 |
private void initTagletManager(Set<String[]> customTagStrs) { |
10 | 573 |
tagletManager = tagletManager == null ? |
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
15725
diff
changeset
|
574 |
new TagletManager(nosince, showversion, showauthor, javafx, message) : |
10 | 575 |
tagletManager; |
576 |
String[] args; |
|
1789
7ac8c0815000
6765045: Remove rawtypes warnings from langtools
mcimadamore
parents:
1475
diff
changeset
|
577 |
for (Iterator<String[]> it = customTagStrs.iterator(); it.hasNext(); ) { |
7ac8c0815000
6765045: Remove rawtypes warnings from langtools
mcimadamore
parents:
1475
diff
changeset
|
578 |
args = it.next(); |
10 | 579 |
if (args[0].equals("-taglet")) { |
14545
2e7bab0639b8
6493690: javadoc should have a javax.tools.Tool service provider installed in tools.jar
jjg
parents:
14544
diff
changeset
|
580 |
tagletManager.addCustomTag(args[1], getFileManager(), tagletpath); |
10 | 581 |
continue; |
582 |
} |
|
14368
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
583 |
String[] tokens = tokenize(args[1], |
14545
2e7bab0639b8
6493690: javadoc should have a javax.tools.Tool service provider installed in tools.jar
jjg
parents:
14544
diff
changeset
|
584 |
TagletManager.SIMPLE_TAGLET_OPT_SEPARATOR, 3); |
10 | 585 |
if (tokens.length == 1) { |
586 |
String tagName = args[1]; |
|
587 |
if (tagletManager.isKnownCustomTag(tagName)) { |
|
588 |
//reorder a standard tag |
|
589 |
tagletManager.addNewSimpleCustomTag(tagName, null, ""); |
|
590 |
} else { |
|
591 |
//Create a simple tag with the heading that has the same name as the tag. |
|
14263 | 592 |
StringBuilder heading = new StringBuilder(tagName + ":"); |
10 | 593 |
heading.setCharAt(0, Character.toUpperCase(tagName.charAt(0))); |
594 |
tagletManager.addNewSimpleCustomTag(tagName, heading.toString(), "a"); |
|
595 |
} |
|
596 |
} else if (tokens.length == 2) { |
|
597 |
//Add simple taglet without heading, probably to excluding it in the output. |
|
598 |
tagletManager.addNewSimpleCustomTag(tokens[0], tokens[1], ""); |
|
599 |
} else if (tokens.length >= 3) { |
|
600 |
tagletManager.addNewSimpleCustomTag(tokens[0], tokens[2], tokens[1]); |
|
601 |
} else { |
|
602 |
message.error("doclet.Error_invalid_custom_tag_argument", args[1]); |
|
603 |
} |
|
604 |
} |
|
605 |
} |
|
606 |
||
14368
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
607 |
/** |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
608 |
* Given a string, return an array of tokens. The separator can be escaped |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
609 |
* with the '\' character. The '\' character may also be escaped by the |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
610 |
* '\' character. |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
611 |
* |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
612 |
* @param s the string to tokenize. |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
613 |
* @param separator the separator char. |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
614 |
* @param maxTokens the maximum number of tokens returned. If the |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
615 |
* max is reached, the remaining part of s is appended |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
616 |
* to the end of the last token. |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
617 |
* |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
618 |
* @return an array of tokens. |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
619 |
*/ |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
620 |
private String[] tokenize(String s, char separator, int maxTokens) { |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
621 |
List<String> tokens = new ArrayList<String>(); |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
622 |
StringBuilder token = new StringBuilder (); |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
623 |
boolean prevIsEscapeChar = false; |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
624 |
for (int i = 0; i < s.length(); i += Character.charCount(i)) { |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
625 |
int currentChar = s.codePointAt(i); |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
626 |
if (prevIsEscapeChar) { |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
627 |
// Case 1: escaped character |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
628 |
token.appendCodePoint(currentChar); |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
629 |
prevIsEscapeChar = false; |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
630 |
} else if (currentChar == separator && tokens.size() < maxTokens-1) { |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
631 |
// Case 2: separator |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
632 |
tokens.add(token.toString()); |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
633 |
token = new StringBuilder(); |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
634 |
} else if (currentChar == '\\') { |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
635 |
// Case 3: escape character |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
636 |
prevIsEscapeChar = true; |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
637 |
} else { |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
638 |
// Case 4: regular character |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
639 |
token.appendCodePoint(currentChar); |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
640 |
} |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
641 |
} |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
642 |
if (token.length() > 0) { |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
643 |
tokens.add(token.toString()); |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
644 |
} |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
645 |
return tokens.toArray(new String[] {}); |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
646 |
} |
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
647 |
|
868 | 648 |
private void addToSet(Set<String> s, String str){ |
10 | 649 |
StringTokenizer st = new StringTokenizer(str, ":"); |
650 |
String current; |
|
651 |
while(st.hasMoreTokens()){ |
|
652 |
current = st.nextToken(); |
|
653 |
s.add(current); |
|
654 |
} |
|
655 |
} |
|
656 |
||
657 |
/** |
|
14061
9ac68cf0048b
4696488: javadoc doesn't handle UNC paths for destination directory
bpatel
parents:
13842
diff
changeset
|
658 |
* Add a trailing file separator, if not found. Remove superfluous |
9ac68cf0048b
4696488: javadoc doesn't handle UNC paths for destination directory
bpatel
parents:
13842
diff
changeset
|
659 |
* file separators if any. Preserve the front double file separator for |
9ac68cf0048b
4696488: javadoc doesn't handle UNC paths for destination directory
bpatel
parents:
13842
diff
changeset
|
660 |
* UNC paths. |
10 | 661 |
* |
662 |
* @param path Path under consideration. |
|
663 |
* @return String Properly constructed path string. |
|
664 |
*/ |
|
14061
9ac68cf0048b
4696488: javadoc doesn't handle UNC paths for destination directory
bpatel
parents:
13842
diff
changeset
|
665 |
public static String addTrailingFileSep(String path) { |
10 | 666 |
String fs = System.getProperty("file.separator"); |
667 |
String dblfs = fs + fs; |
|
668 |
int indexDblfs; |
|
14061
9ac68cf0048b
4696488: javadoc doesn't handle UNC paths for destination directory
bpatel
parents:
13842
diff
changeset
|
669 |
while ((indexDblfs = path.indexOf(dblfs, 1)) >= 0) { |
10 | 670 |
path = path.substring(0, indexDblfs) + |
671 |
path.substring(indexDblfs + fs.length()); |
|
672 |
} |
|
673 |
if (!path.endsWith(fs)) |
|
674 |
path += fs; |
|
675 |
return path; |
|
676 |
} |
|
677 |
||
678 |
/** |
|
679 |
* This checks for the validity of the options used by the user. |
|
680 |
* This works exactly like |
|
681 |
* {@link com.sun.javadoc.Doclet#validOptions(String[][], |
|
682 |
* DocErrorReporter)}. This will validate the options which are shared |
|
683 |
* by our doclets. For example, this method will flag an error using |
|
684 |
* the DocErrorReporter if user has used "-nohelp" and "-helpfile" option |
|
685 |
* together. |
|
686 |
* |
|
687 |
* @param options options used on the command line. |
|
688 |
* @param reporter used to report errors. |
|
689 |
* @return true if all the options are valid. |
|
690 |
*/ |
|
691 |
public boolean generalValidOptions(String options[][], |
|
692 |
DocErrorReporter reporter) { |
|
693 |
boolean docencodingfound = false; |
|
694 |
String encoding = ""; |
|
695 |
for (int oi = 0; oi < options.length; oi++) { |
|
696 |
String[] os = options[oi]; |
|
697 |
String opt = os[0].toLowerCase(); |
|
16324 | 698 |
if (opt.equals("-docencoding")) { |
10 | 699 |
docencodingfound = true; |
700 |
if (!checkOutputFileEncoding(os[1], reporter)) { |
|
701 |
return false; |
|
702 |
} |
|
703 |
} else if (opt.equals("-encoding")) { |
|
704 |
encoding = os[1]; |
|
705 |
} |
|
706 |
} |
|
707 |
if (!docencodingfound && encoding.length() > 0) { |
|
708 |
if (!checkOutputFileEncoding(encoding, reporter)) { |
|
709 |
return false; |
|
710 |
} |
|
711 |
} |
|
712 |
return true; |
|
713 |
} |
|
714 |
||
715 |
/** |
|
716 |
* Check the validity of the given Source or Output File encoding on this |
|
717 |
* platform. |
|
718 |
* |
|
719 |
* @param docencoding output file encoding. |
|
720 |
* @param reporter used to report errors. |
|
721 |
*/ |
|
722 |
private boolean checkOutputFileEncoding(String docencoding, |
|
723 |
DocErrorReporter reporter) { |
|
724 |
OutputStream ost= new ByteArrayOutputStream(); |
|
725 |
OutputStreamWriter osw = null; |
|
726 |
try { |
|
727 |
osw = new OutputStreamWriter(ost, docencoding); |
|
728 |
} catch (UnsupportedEncodingException exc) { |
|
729 |
reporter.printError(getText("doclet.Encoding_not_supported", |
|
730 |
docencoding)); |
|
731 |
return false; |
|
732 |
} finally { |
|
733 |
try { |
|
734 |
if (osw != null) { |
|
735 |
osw.close(); |
|
736 |
} |
|
737 |
} catch (IOException exc) { |
|
738 |
} |
|
739 |
} |
|
740 |
return true; |
|
741 |
} |
|
742 |
||
743 |
/** |
|
744 |
* Return true if the given doc-file subdirectory should be excluded and |
|
745 |
* false otherwise. |
|
746 |
* @param docfilesubdir the doc-files subdirectory to check. |
|
747 |
*/ |
|
748 |
public boolean shouldExcludeDocFileDir(String docfilesubdir){ |
|
749 |
if (excludedDocFileDirs.contains(docfilesubdir)) { |
|
750 |
return true; |
|
751 |
} else { |
|
752 |
return false; |
|
753 |
} |
|
754 |
} |
|
755 |
||
756 |
/** |
|
757 |
* Return true if the given qualifier should be excluded and false otherwise. |
|
758 |
* @param qualifier the qualifier to check. |
|
759 |
*/ |
|
760 |
public boolean shouldExcludeQualifier(String qualifier){ |
|
761 |
if (excludedQualifiers.contains("all") || |
|
762 |
excludedQualifiers.contains(qualifier) || |
|
763 |
excludedQualifiers.contains(qualifier + ".*")) { |
|
764 |
return true; |
|
765 |
} else { |
|
766 |
int index = -1; |
|
767 |
while ((index = qualifier.indexOf(".", index + 1)) != -1) { |
|
768 |
if (excludedQualifiers.contains(qualifier.substring(0, index + 1) + "*")) { |
|
769 |
return true; |
|
770 |
} |
|
771 |
} |
|
772 |
return false; |
|
773 |
} |
|
774 |
} |
|
775 |
||
776 |
/** |
|
777 |
* Return the qualified name of the <code>ClassDoc</code> if it's qualifier is not excluded. Otherwise, |
|
778 |
* return the unqualified <code>ClassDoc</code> name. |
|
779 |
* @param cd the <code>ClassDoc</code> to check. |
|
780 |
*/ |
|
781 |
public String getClassName(ClassDoc cd) { |
|
782 |
PackageDoc pd = cd.containingPackage(); |
|
783 |
if (pd != null && shouldExcludeQualifier(cd.containingPackage().name())) { |
|
784 |
return cd.name(); |
|
785 |
} else { |
|
786 |
return cd.qualifiedName(); |
|
787 |
} |
|
788 |
} |
|
789 |
||
790 |
public String getText(String key) { |
|
791 |
try { |
|
792 |
//Check the doclet specific properties file. |
|
793 |
return getDocletSpecificMsg().getText(key); |
|
794 |
} catch (Exception e) { |
|
795 |
//Check the shared properties file. |
|
796 |
return message.getText(key); |
|
797 |
} |
|
798 |
} |
|
799 |
||
800 |
public String getText(String key, String a1) { |
|
801 |
try { |
|
802 |
//Check the doclet specific properties file. |
|
803 |
return getDocletSpecificMsg().getText(key, a1); |
|
804 |
} catch (Exception e) { |
|
805 |
//Check the shared properties file. |
|
806 |
return message.getText(key, a1); |
|
807 |
} |
|
808 |
} |
|
809 |
||
810 |
public String getText(String key, String a1, String a2) { |
|
811 |
try { |
|
812 |
//Check the doclet specific properties file. |
|
813 |
return getDocletSpecificMsg().getText(key, a1, a2); |
|
814 |
} catch (Exception e) { |
|
815 |
//Check the shared properties file. |
|
816 |
return message.getText(key, a1, a2); |
|
817 |
} |
|
818 |
} |
|
819 |
||
820 |
public String getText(String key, String a1, String a2, String a3) { |
|
821 |
try { |
|
822 |
//Check the doclet specific properties file. |
|
823 |
return getDocletSpecificMsg().getText(key, a1, a2, a3); |
|
824 |
} catch (Exception e) { |
|
825 |
//Check the shared properties file. |
|
826 |
return message.getText(key, a1, a2, a3); |
|
827 |
} |
|
828 |
} |
|
829 |
||
17563
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
830 |
public abstract Content getContentForResource(); |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
831 |
|
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
832 |
/** |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
833 |
* Get the configuration string as a content. |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
834 |
* |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
835 |
* @param key the key to look for in the configuration file |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
836 |
* @return a content tree for the text |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
837 |
*/ |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
838 |
public Content getResource(String key) { |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
839 |
Content c = getContentForResource(); |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
840 |
c.addContent(getText(key)); |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
841 |
return c; |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
842 |
} |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
843 |
|
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
844 |
/** |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
845 |
* Get the configuration string as a content. |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
846 |
* |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
847 |
* @param key the key to look for in the configuration file |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
848 |
* @param o string or content argument added to configuration text |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
849 |
* @return a content tree for the text |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
850 |
*/ |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
851 |
public Content getResource(String key, Object o) { |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
852 |
return getResource(key, o, null, null); |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
853 |
} |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
854 |
|
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
855 |
/** |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
856 |
* Get the configuration string as a content. |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
857 |
* |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
858 |
* @param key the key to look for in the configuration file |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
859 |
* @param o string or content argument added to configuration text |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
860 |
* @return a content tree for the text |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
861 |
*/ |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
862 |
public Content getResource(String key, Object o1, Object o2) { |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
863 |
return getResource(key, o1, o2, null); |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
864 |
} |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
865 |
|
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
866 |
/** |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
867 |
* Get the configuration string as a content. |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
868 |
* |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
869 |
* @param key the key to look for in the configuration file |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
870 |
* @param o1 string or content argument added to configuration text |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
871 |
* @param o2 string or content argument added to configuration text |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
872 |
* @return a content tree for the text |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
873 |
*/ |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
874 |
public Content getResource(String key, Object o0, Object o1, Object o2) { |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
875 |
Content c = getContentForResource(); |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
876 |
Pattern p = Pattern.compile("\\{([012])\\}"); |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
877 |
String text = getText(key); |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
878 |
Matcher m = p.matcher(text); |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
879 |
int start = 0; |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
880 |
while (m.find(start)) { |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
881 |
c.addContent(text.substring(start, m.start())); |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
882 |
|
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
883 |
Object o = null; |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
884 |
switch (m.group(1).charAt(0)) { |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
885 |
case '0': o = o0; break; |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
886 |
case '1': o = o1; break; |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
887 |
case '2': o = o2; break; |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
888 |
} |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
889 |
|
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
890 |
if (o == null) { |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
891 |
c.addContent("{" + m.group(1) + "}"); |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
892 |
} else if (o instanceof String) { |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
893 |
c.addContent((String) o); |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
894 |
} else if (o instanceof Content) { |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
895 |
c.addContent((Content) o); |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
896 |
} |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
897 |
|
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
898 |
start = m.end(); |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
899 |
} |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
900 |
|
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
901 |
c.addContent(text.substring(start)); |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
902 |
return c; |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
903 |
} |
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
904 |
|
e8ddeb9bd17c
8011668: Allow HTMLWriter.getResource to take Content args
jjg
parents:
16560
diff
changeset
|
905 |
|
10 | 906 |
/** |
9606
e5a619cb5dd3
6492694: @deprecated tag doesn't work in package-info files.
bpatel
parents:
5520
diff
changeset
|
907 |
* Return true if the ClassDoc element is getting documented, depending upon |
e5a619cb5dd3
6492694: @deprecated tag doesn't work in package-info files.
bpatel
parents:
5520
diff
changeset
|
908 |
* -nodeprecated option and the deprecation information. Return true if |
e5a619cb5dd3
6492694: @deprecated tag doesn't work in package-info files.
bpatel
parents:
5520
diff
changeset
|
909 |
* -nodeprecated is not used. Return false if -nodeprecated is used and if |
e5a619cb5dd3
6492694: @deprecated tag doesn't work in package-info files.
bpatel
parents:
5520
diff
changeset
|
910 |
* either ClassDoc element is deprecated or the containing package is deprecated. |
e5a619cb5dd3
6492694: @deprecated tag doesn't work in package-info files.
bpatel
parents:
5520
diff
changeset
|
911 |
* |
e5a619cb5dd3
6492694: @deprecated tag doesn't work in package-info files.
bpatel
parents:
5520
diff
changeset
|
912 |
* @param cd the ClassDoc for which the page generation is checked |
10 | 913 |
*/ |
9606
e5a619cb5dd3
6492694: @deprecated tag doesn't work in package-info files.
bpatel
parents:
5520
diff
changeset
|
914 |
public boolean isGeneratedDoc(ClassDoc cd) { |
10 | 915 |
if (!nodeprecated) { |
916 |
return true; |
|
917 |
} |
|
9606
e5a619cb5dd3
6492694: @deprecated tag doesn't work in package-info files.
bpatel
parents:
5520
diff
changeset
|
918 |
return !(Util.isDeprecated(cd) || Util.isDeprecated(cd.containingPackage())); |
10 | 919 |
} |
920 |
||
921 |
/** |
|
922 |
* Return the doclet specific instance of a writer factory. |
|
923 |
* @return the {@link WriterFactory} for the doclet. |
|
924 |
*/ |
|
925 |
public abstract WriterFactory getWriterFactory(); |
|
926 |
||
927 |
/** |
|
928 |
* Return the input stream to the builder XML. |
|
929 |
* |
|
930 |
* @return the input steam to the builder XML. |
|
931 |
* @throws FileNotFoundException when the given XML file cannot be found. |
|
932 |
*/ |
|
14544 | 933 |
public InputStream getBuilderXML() throws IOException { |
10 | 934 |
return builderXMLPath == null ? |
935 |
Configuration.class.getResourceAsStream(DEFAULT_BUILDER_XML) : |
|
14368
6f4c62de6985
8001664: refactor javadoc to use abstraction to handle files
jjg
parents:
14361
diff
changeset
|
936 |
DocFile.createFileForInput(this, builderXMLPath).openInputStream(); |
10 | 937 |
} |
938 |
||
939 |
/** |
|
1863
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1789
diff
changeset
|
940 |
* Return the Locale for this document. |
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1789
diff
changeset
|
941 |
*/ |
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1789
diff
changeset
|
942 |
public abstract Locale getLocale(); |
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1789
diff
changeset
|
943 |
|
e5de9abc0eb1
6786682: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - HTML tag should have lang attribute
bpatel
parents:
1789
diff
changeset
|
944 |
/** |
14544 | 945 |
* Return the current file manager. |
946 |
*/ |
|
947 |
public abstract JavaFileManager getFileManager(); |
|
948 |
||
949 |
/** |
|
10 | 950 |
* Return the comparator that will be used to sort member documentation. |
951 |
* To no do any sorting, return null. |
|
952 |
* |
|
953 |
* @return the {@link java.util.Comparator} used to sort members. |
|
954 |
*/ |
|
868 | 955 |
public abstract Comparator<ProgramElementDoc> getMemberComparator(); |
14542 | 956 |
|
957 |
private void setTabWidth(int n) { |
|
958 |
sourcetab = n; |
|
959 |
tabSpaces = String.format("%" + n + "s", ""); |
|
960 |
} |
|
15354 | 961 |
|
962 |
public abstract boolean showMessage(SourcePosition pos, String key); |
|
10 | 963 |
} |