author | pmuthuswamy |
Tue, 23 Apr 2019 18:28:48 +0530 | |
changeset 54596 | 86c1da00dd6a |
parent 54350 | 4f9772f4403d |
permissions | -rw-r--r-- |
37009
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
1 |
/* |
53562 | 2 |
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. |
37009
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
4 |
* |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
8 |
* |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
13 |
* accompanied this code). |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
14 |
* |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
18 |
* |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
21 |
* questions. |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
22 |
*/ |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
23 |
|
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
24 |
/* |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
25 |
* @test |
50293
edfb87b2520e
8196202: Javadoc should not generate frames by default
jjg
parents:
49139
diff
changeset
|
26 |
* @bug 8073100 8182765 8196202 |
37009
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
27 |
* @summary ensure the hidden tag works as intended |
53097 | 28 |
* @library ../../lib |
37009
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
29 |
* @modules jdk.javadoc/jdk.javadoc.internal.tool |
53097 | 30 |
* @build javadoc.tester.* |
37009
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
31 |
* @run main TestHiddenTag |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
32 |
*/ |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
33 |
|
53097 | 34 |
import javadoc.tester.JavadocTester; |
35 |
||
37009
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
36 |
public class TestHiddenTag extends JavadocTester { |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
37 |
|
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
38 |
public static void main(String... args) throws Exception { |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
39 |
TestHiddenTag tester = new TestHiddenTag(); |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
40 |
tester.runTests(); |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
41 |
} |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
42 |
|
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
43 |
/** |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
44 |
* Perform tests on @hidden tags |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
45 |
*/ |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
46 |
@Test |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
47 |
public void test1() { |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
48 |
javadoc("-d", "out1", |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
49 |
"-sourcepath", testSrc, |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
50 |
"-package", |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
51 |
"pkg1"); |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
52 |
checkExit(Exit.OK); |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
53 |
|
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
54 |
checkOutput("pkg1/A.html", true, |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
55 |
"<a id=\"visibleField\">", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
56 |
"<a id=\"visibleMethod()\">", |
37009
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
57 |
"<dt>Direct Known Subclasses:</dt>\n" + |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47216
diff
changeset
|
58 |
"<dd><code><a href=\"A.VisibleInner.html\" title=\"class in pkg1\">" + |
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47216
diff
changeset
|
59 |
"A.VisibleInner</a></code>, <code><a href=\"A.VisibleInnerExtendsInvisibleInner.html\" " + |
40506
258ad5fd9b57
8163800: The fix for JDK-8072052 shows up other minor incorrect use of styles
jjg
parents:
37009
diff
changeset
|
60 |
"title=\"class in pkg1\">A.VisibleInnerExtendsInvisibleInner</a></code></dd>"); |
37009
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
61 |
|
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
62 |
checkOutput("pkg1/A.html", false, |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
63 |
"<a id=\"inVisibleField\">", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
64 |
"<a id=\"inVisibleMethod()\">"); |
37009
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
65 |
|
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
66 |
checkOutput("pkg1/A.VisibleInner.html", true, |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47216
diff
changeset
|
67 |
"<code><a href=\"A.html#visibleField\">visibleField</a></code>", |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
68 |
"<code><a href=\"A.html#visibleMethod()\">visibleMethod</a></code>", |
53991 | 69 |
"<h2>Nested classes/interfaces inherited from class pkg1." + |
70 |
"<a href=\"A.html\" title=\"class in pkg1\">A</a></h2>\n" + |
|
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
71 |
"<a id=\"nested.classes.inherited.from.class.pkg1.A\">\n" + |
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
72 |
"<!-- -->\n" + |
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
73 |
"</a><code><a href=\"A.VisibleInner.html\" title=\"class in pkg1\">" + |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47216
diff
changeset
|
74 |
"A.VisibleInner</a>, <a href=\"A.VisibleInnerExtendsInvisibleInner.html\" " + |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
75 |
"title=\"class in pkg1\">A.VisibleInnerExtendsInvisibleInner</a></code></div>\n"); |
37009
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
76 |
|
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
77 |
checkOutput("pkg1/A.VisibleInner.html", false, |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
78 |
"../pkg1/A.VisibleInner.html#VisibleInner()", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
79 |
"<a id=\"inVisibleField\">", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
80 |
"<a id=\"inVisibleMethod()\">"); |
37009
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
81 |
|
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
82 |
checkOutput("pkg1/A.VisibleInnerExtendsInvisibleInner.html", true, |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
83 |
"<pre>public static class <span class=\"typeNameLabel\">" + |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
84 |
"A.VisibleInnerExtendsInvisibleInner</span>\n" + |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47216
diff
changeset
|
85 |
"extends <a href=\"A.html\" title=\"class in pkg1\">A</a></pre>", |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54350
diff
changeset
|
86 |
"<code><a href=\"A.html#visibleField\">visibleField</a></code>", |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
87 |
"<code><a href=\"A.html#visibleMethod()\">visibleMethod</a></code>"); |
37009
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
88 |
|
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
89 |
checkOutput("pkg1/A.VisibleInnerExtendsInvisibleInner.html", false, |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
90 |
"invisibleField", |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
91 |
"invisibleMethod", |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
92 |
"A.InvisibleInner"); |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
93 |
|
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
94 |
checkOutput("pkg1/package-summary.html", false, "A.InvisibleInner"); |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
95 |
|
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
96 |
checkOutput("pkg1/package-tree.html", false, "A.InvisibleInner"); |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
97 |
|
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
98 |
checkFiles(false, |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
99 |
"pkg1/A.InvisibleInner.html", |
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
100 |
"pkg1/A.InvisibleInnerExtendsVisibleInner.html"); |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
101 |
} |
37009
476d8d615222
8073100: [javadoc] Provide an ability to suppress document generation for specific elements.
ksrini
parents:
diff
changeset
|
102 |
} |