Fwd: RFR: 8190552/8185985: Augment the Compiler API tree ; Html files in doc-files directories should be wrapped
Jonathan Gibbons
jonathan.gibbons at oracle.com
Tue Nov 7 23:15:53 UTC 2017
[1] https://bugs.openjdk.java.net/browse/JDK-8190552
src/jdk.compiler/share/classes/com/sun/source/doctree/DocTypeTree.java
line 32: typo: @lt; should be < > should be >
JavacTrees.java, 1041, 1042, duplicate call
> 1040 DocCommentTree docCommentTree = getDocCommentTree(jfo);
> 1041 docCommentTree = getDocCommentTree(jfo);
In DocCommentParser, the inPhase field can be reduced to a parameter on
blockComment.
Also, the following replacement for 191-208 is more robust in the face
of malformed docs:
191 if (isFileContent) {
192 switch (inPhase) {
193 case PREAMBLE:
if (peek("body") == PeekKind.OPEN) {
194 trees.add(html());
195 if (textStart == -1) {
196 textStart = bp;
197 lastNonWhite = -1;
198 }
199 // mark this as the start, for processing purposes
200 newline = true;
201 break loop;
}
break;
202 case BLOCK:
if(peek("body") == PeekKind.CLOSE) {
203 addPendingText(trees, lastNonWhite);
204 break loop;
}
break;
205 default:
206 // fall through
207 }
208 }
(As a further simplification, you could even make "peek" be "boolean
peek(String)" and handle the / in the impl of peek, thus eliminating
PeekKind.)
DCTree: 161-165
Format the new lines like the preceding lines (3-line form).
DCTree: 303,305
Use "text" instead of "body" consistently
test/langtools/tools/javac/doctree/dcapi/DocCommentTreeApiTester.java
line 196: do you mean "incorrect" here? do you mean"invalid"?
(I don't know what it means to say "incorrect input document")
line 239: ditto
test/langtools/tools/javac/doctree/dcapi/overview0.html and friends
why do you still need the partial comment "<!--EXPECT_START"
test/langtools/tools/javac/doctree/dcapi/package.html
<!DOCTYPE...> must be the _first_ line of the file
On 11/06/2017 06:09 PM, Kumar Srinivasan wrote:
> Hello,
>
> Please review fix to augment the Compiler API tree to represent the
> entire HTML content of a file, please see bug [1] and webrev [2].
> The above are required to implement the bug [3] and webrev [4], please
> review these as well.
>
> Please note these patches exist as mq patches in my repo, and will be
> pushed as two discrete changesets.
>
> Thanks Kumar
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8190552
> [2] http://cr.openjdk.java.net/~ksrini/8190552/webrev.00/
>
> [3] https://bugs.openjdk.java.net/browse/JDK-8185985
> [4] http://cr.openjdk.java.net/~ksrini/8185985/webrev.00/
>
>
More information about the javadoc-dev
mailing list