8240136: Cleanup/simplify HTML/CSS for definition lists

Reviewed-by: prappo
This commit is contained in:
Jonathan Gibbons 2020-02-28 12:46:58 -08:00
parent b38f3cf3bd
commit 1be89d9640
22 changed files with 89 additions and 97 deletions

View file

@ -111,7 +111,7 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
addHeading(uc, contentTree); addHeading(uc, contentTree);
// Display the list only if there are elements to be displayed. // Display the list only if there are elements to be displayed.
if (!memberlist.isEmpty()) { if (!memberlist.isEmpty()) {
Content dl = new HtmlTree(HtmlTag.DL); HtmlTree dl = HtmlTree.DL(HtmlStyle.index);
for (Element element : memberlist) { for (Element element : memberlist) {
addDescription(dl, element); addDescription(dl, element);
} }
@ -124,7 +124,7 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
addHeading(uc, contentTree); addHeading(uc, contentTree);
// Display the list only if there are elements to be displayed. // Display the list only if there are elements to be displayed.
if (!searchList.isEmpty()) { if (!searchList.isEmpty()) {
Content dl = new HtmlTree(HtmlTag.DL); HtmlTree dl = HtmlTree.DL(HtmlStyle.index);
for (SearchIndexItem sii : searchList) { for (SearchIndexItem sii : searchList) {
addDescription(sii, dl); addDescription(sii, dl);
} }
@ -139,7 +139,7 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
int searchListSize = searchList.size(); int searchListSize = searchList.size();
int i = 0; int i = 0;
int j = 0; int j = 0;
Content dl = new HtmlTree(HtmlTag.DL); HtmlTree dl = HtmlTree.DL(HtmlStyle.index);
while (i < memberListSize && j < searchListSize) { while (i < memberListSize && j < searchListSize) {
Element elem = memberlist.get(i); Element elem = memberlist.get(i);
String name = (utils.isModule(elem)) String name = (utils.isModule(elem))

View file

@ -82,13 +82,12 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
@Override @Override
public void addDefaultValueInfo(Element member, Content annotationDocTree) { public void addDefaultValueInfo(Element member, Content annotationDocTree) {
if (utils.isAnnotationType(member)) { if (utils.isAnnotationType(member)) {
ExecutableElement ee = (ExecutableElement)member; ExecutableElement ee = (ExecutableElement) member;
AnnotationValue value = ee.getDefaultValue(); AnnotationValue value = ee.getDefaultValue();
if (value != null) { if (value != null) {
Content dt = HtmlTree.DT(contents.default_); Content dl = HtmlTree.DL(HtmlStyle.notes);
Content dl = HtmlTree.DL(dt); dl.add(HtmlTree.DT(contents.default_));
Content dd = HtmlTree.DD(new StringContent(value.toString())); dl.add(HtmlTree.DD(new StringContent(value.toString())));
dl.add(dd);
annotationDocTree.add(dl); annotationDocTree.add(dl);
} }
} }

View file

@ -351,7 +351,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
Content paramInfo = (new ParamTaglet()).getTagletOutput(typeElement, Content paramInfo = (new ParamTaglet()).getTagletOutput(typeElement,
getTagletWriterInstance(false)); getTagletWriterInstance(false));
if (!paramInfo.isEmpty()) { if (!paramInfo.isEmpty()) {
classInfoTree.add(HtmlTree.DL(paramInfo).setStyle(HtmlStyle.notes)); classInfoTree.add(HtmlTree.DL(HtmlStyle.notes, paramInfo));
} }
} }
} }
@ -366,11 +366,9 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
} }
Set<TypeElement> subclasses = classtree.directSubClasses(typeElement, false); Set<TypeElement> subclasses = classtree.directSubClasses(typeElement, false);
if (!subclasses.isEmpty()) { if (!subclasses.isEmpty()) {
Content label = contents.subclassesLabel; HtmlTree dl = HtmlTree.DL(HtmlStyle.notes);
Content dt = HtmlTree.DT(label); dl.add(HtmlTree.DT(contents.subclassesLabel));
Content dl = HtmlTree.DL(dt); dl.add(HtmlTree.DD(getClassLinks(LinkInfoImpl.Kind.SUBCLASSES, subclasses)));
dl.add(getClassLinks(LinkInfoImpl.Kind.SUBCLASSES,
subclasses));
classInfoTree.add(dl); classInfoTree.add(dl);
} }
} }
@ -381,11 +379,9 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
if (utils.isInterface(typeElement)) { if (utils.isInterface(typeElement)) {
Set<TypeElement> subInterfaces = classtree.allSubClasses(typeElement, false); Set<TypeElement> subInterfaces = classtree.allSubClasses(typeElement, false);
if (!subInterfaces.isEmpty()) { if (!subInterfaces.isEmpty()) {
Content label = contents.subinterfacesLabel; Content dl = HtmlTree.DL(HtmlStyle.notes);
Content dt = HtmlTree.DT(label); dl.add(HtmlTree.DT(contents.subinterfacesLabel));
Content dl = HtmlTree.DL(dt); dl.add(HtmlTree.DD(getClassLinks(LinkInfoImpl.Kind.SUBINTERFACES, subInterfaces)));
dl.add(getClassLinks(LinkInfoImpl.Kind.SUBINTERFACES,
subInterfaces));
classInfoTree.add(dl); classInfoTree.add(dl);
} }
} }
@ -403,11 +399,9 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
} }
Set<TypeElement> implcl = classtree.implementingClasses(typeElement); Set<TypeElement> implcl = classtree.implementingClasses(typeElement);
if (!implcl.isEmpty()) { if (!implcl.isEmpty()) {
Content label = contents.implementingClassesLabel; HtmlTree dl = HtmlTree.DL(HtmlStyle.notes);
Content dt = HtmlTree.DT(label); dl.add(HtmlTree.DT(contents.implementingClassesLabel));
Content dl = HtmlTree.DL(dt); dl.add(HtmlTree.DD(getClassLinks(LinkInfoImpl.Kind.IMPLEMENTED_CLASSES, implcl)));
dl.add(getClassLinks(LinkInfoImpl.Kind.IMPLEMENTED_CLASSES,
implcl));
classInfoTree.add(dl); classInfoTree.add(dl);
} }
} }
@ -417,10 +411,9 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
SortedSet<TypeMirror> interfaces = new TreeSet<>(utils.makeTypeMirrorClassUseComparator()); SortedSet<TypeMirror> interfaces = new TreeSet<>(utils.makeTypeMirrorClassUseComparator());
interfaces.addAll(utils.getAllInterfaces(typeElement)); interfaces.addAll(utils.getAllInterfaces(typeElement));
if (utils.isClass(typeElement) && !interfaces.isEmpty()) { if (utils.isClass(typeElement) && !interfaces.isEmpty()) {
Content label = contents.allImplementedInterfacesLabel; HtmlTree dl = HtmlTree.DL(HtmlStyle.notes);
Content dt = HtmlTree.DT(label); dl.add(HtmlTree.DT(contents.allImplementedInterfacesLabel));
Content dl = HtmlTree.DL(dt); dl.add(HtmlTree.DD(getClassLinks(LinkInfoImpl.Kind.IMPLEMENTED_INTERFACES, interfaces)));
dl.add(getClassLinks(LinkInfoImpl.Kind.IMPLEMENTED_INTERFACES, interfaces));
classInfoTree.add(dl); classInfoTree.add(dl);
} }
} }
@ -432,10 +425,9 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
interfaces.addAll(utils.getAllInterfaces(typeElement)); interfaces.addAll(utils.getAllInterfaces(typeElement));
if (utils.isInterface(typeElement) && !interfaces.isEmpty()) { if (utils.isInterface(typeElement) && !interfaces.isEmpty()) {
Content label = contents.allSuperinterfacesLabel; HtmlTree dl = HtmlTree.DL(HtmlStyle.notes);
Content dt = HtmlTree.DT(label); dl.add(HtmlTree.DT(contents.allSuperinterfacesLabel));
Content dl = HtmlTree.DL(dt); dl.add(HtmlTree.DD(getClassLinks(LinkInfoImpl.Kind.SUPER_INTERFACES, interfaces)));
dl.add(getClassLinks(LinkInfoImpl.Kind.SUPER_INTERFACES, interfaces));
classInfoTree.add(dl); classInfoTree.add(dl);
} }
} }
@ -448,11 +440,10 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
new SimpleElementVisitor8<Void, Void>() { new SimpleElementVisitor8<Void, Void>() {
@Override @Override
public Void visitType(TypeElement e, Void p) { public Void visitType(TypeElement e, Void p) {
Content label = utils.isInterface(e) HtmlTree dl = HtmlTree.DL(HtmlStyle.notes);
dl.add(HtmlTree.DT(utils.isInterface(e)
? contents.enclosingInterfaceLabel ? contents.enclosingInterfaceLabel
: contents.enclosingClassLabel; : contents.enclosingClassLabel));
Content dt = HtmlTree.DT(label);
Content dl = HtmlTree.DL(dt);
Content dd = new HtmlTree(HtmlTag.DD); Content dd = new HtmlTree(HtmlTag.DD);
dd.add(getLink(new LinkInfoImpl(configuration, dd.add(getLink(new LinkInfoImpl(configuration,
LinkInfoImpl.Kind.CLASS, e))); LinkInfoImpl.Kind.CLASS, e)));
@ -466,8 +457,8 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
@Override @Override
public void addFunctionalInterfaceInfo (Content classInfoTree) { public void addFunctionalInterfaceInfo (Content classInfoTree) {
if (isFunctionalInterface()) { if (isFunctionalInterface()) {
Content dt = HtmlTree.DT(contents.functionalInterface); HtmlTree dl = HtmlTree.DL(HtmlStyle.notes);
Content dl = HtmlTree.DL(dt); dl.add(HtmlTree.DT(contents.functionalInterface));
Content dd = new HtmlTree(HtmlTag.DD); Content dd = new HtmlTree(HtmlTag.DD);
dd.add(contents.functionalInterfaceMessage); dd.add(contents.functionalInterfaceMessage);
dl.add(dd); dl.add(dd);
@ -512,12 +503,12 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
* @return a content tree for the class list * @return a content tree for the class list
*/ */
private Content getClassLinks(LinkInfoImpl.Kind context, Collection<?> list) { private Content getClassLinks(LinkInfoImpl.Kind context, Collection<?> list) {
Content dd = new HtmlTree(HtmlTag.DD); Content content = new ContentBuilder();
boolean isFirst = true; boolean isFirst = true;
for (Object type : list) { for (Object type : list) {
if (!isFirst) { if (!isFirst) {
Content separator = new StringContent(", "); Content separator = new StringContent(", ");
dd.add(separator); content.add(separator);
} else { } else {
isFirst = false; isFirst = false;
} }
@ -525,14 +516,14 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
if (type instanceof TypeElement) { if (type instanceof TypeElement) {
Content link = getLink( Content link = getLink(
new LinkInfoImpl(configuration, context, (TypeElement)(type))); new LinkInfoImpl(configuration, context, (TypeElement)(type)));
dd.add(HtmlTree.CODE(link)); content.add(HtmlTree.CODE(link));
} else { } else {
Content link = getLink( Content link = getLink(
new LinkInfoImpl(configuration, context, ((TypeMirror)type))); new LinkInfoImpl(configuration, context, ((TypeMirror)type)));
dd.add(HtmlTree.CODE(link)); content.add(HtmlTree.CODE(link));
} }
} }
return dd; return content;
} }
/** /**

View file

@ -348,7 +348,7 @@ public class HtmlDocletWriter {
if (options.noComment()) { if (options.noComment()) {
return; return;
} }
Content dl = new HtmlTree(HtmlTag.DL).setStyle(HtmlStyle.notes); HtmlTree dl = HtmlTree.DL(HtmlStyle.notes);
if (utils.isExecutableElement(e) && !utils.isConstructor(e)) { if (utils.isExecutableElement(e) && !utils.isConstructor(e)) {
addMethodInfo((ExecutableElement)e, dl); addMethodInfo((ExecutableElement)e, dl);
} }

View file

@ -200,9 +200,9 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
TagletWriter.genTagOutput(configuration.tagletManager, field, TagletWriter.genTagOutput(configuration.tagletManager, field,
configuration.tagletManager.getBlockTaglets(field), configuration.tagletManager.getBlockTaglets(field),
writer.getTagletWriterInstance(false), tagContent); writer.getTagletWriterInstance(false), tagContent);
Content dlTags = new HtmlTree(HtmlTag.DL).setStyle(HtmlStyle.notes); HtmlTree dl = HtmlTree.DL(HtmlStyle.notes);
dlTags.add(tagContent); dl.add(tagContent);
contentTree.add(dlTags); // TODO: what if empty? contentTree.add(dl); // TODO: what if empty?
} }
/** /**

View file

@ -159,9 +159,9 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
TagletWriter.genTagOutput(tagletManager, member, TagletWriter.genTagOutput(tagletManager, member,
tagletManager.getSerializedFormTaglets(), tagletManager.getSerializedFormTaglets(),
writer.getTagletWriterInstance(false), tagContent); writer.getTagletWriterInstance(false), tagContent);
Content dlTags = new HtmlTree(HtmlTag.DL).setStyle(HtmlStyle.notes); HtmlTree dl = HtmlTree.DL(HtmlStyle.notes);
dlTags.add(tagContent); dl.add(tagContent);
methodsContentTree.add(dlTags); methodsContentTree.add(dl);
if (name(member).compareTo("writeExternal") == 0 if (name(member).compareTo("writeExternal") == 0
&& utils.getSerialDataTrees(member).isEmpty()) { && utils.getSerialDataTrees(member).isEmpty()) {
serialWarning(member, "doclet.MissingSerialDataTag", serialWarning(member, "doclet.MissingSerialDataTag",

View file

@ -184,7 +184,7 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
*/ */
@Override @Override
public Content getSerialUIDInfoHeader() { public Content getSerialUIDInfoHeader() {
return new HtmlTree(HtmlTag.DL).setStyle(HtmlStyle.nameValue); return HtmlTree.DL(HtmlStyle.nameValue);
} }
/** /**

View file

@ -79,6 +79,7 @@ public enum HtmlStyle {
hierarchy, hierarchy,
horizontal, horizontal,
implementationLabel, implementationLabel,
index,
inheritance, inheritance,
inheritedList, inheritedList,
interfaceName, interfaceName,

View file

@ -309,14 +309,24 @@ public class HtmlTree extends Content {
} }
/** /**
* Generates a DL tag with some content. * Generates a DL tag with a given style.
* *
* @param body content for the tag * @param style the style
* @return an HtmlTree object for the DL tag * @return an HtmlTree object for the DL tag
*/ */
public static HtmlTree DL(Content body) { public static HtmlTree DL(HtmlStyle style) {
HtmlTree htmltree = new HtmlTree(HtmlTag.DL, nullCheck(body)); return new HtmlTree(HtmlTag.DL).setStyle(style);
return htmltree; }
/**
* Generates a DL tag with some content.
*
* @param style the style for the tag
* @param body content for the tag
* @return an HtmlTree object for the DL tag
*/
public static HtmlTree DL(HtmlStyle style, Content body) {
return new HtmlTree(HtmlTag.DL, nullCheck(body)).setStyle(style);
} }
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it

View file

@ -24,6 +24,7 @@
/* /*
* @test * @test
* @bug 6786690 6820360 8025633 8026567 8175200 8183511 8186332 8074407 8182765 * @bug 6786690 6820360 8025633 8026567 8175200 8183511 8186332 8074407 8182765
* 8230136
* @summary This test verifies the nesting of definition list tags. * @summary This test verifies the nesting of definition list tags.
* @library ../../lib * @library ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool * @modules jdk.javadoc/jdk.javadoc.internal.tool
@ -46,9 +47,6 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
@Test @Test
public void test_Comment_Deprecated() { public void test_Comment_Deprecated() {
// tester.run(ARGS1, TEST_ALL, NEGATED_TEST_NO_C5);
// tester.runTestsOnHTML(NO_TEST, NEGATED_TEST_C5);
// tester.runTestsOnHTML(TEST_CMNT_DEPR, NO_TEST);
javadoc("-Xdoclint:none", javadoc("-Xdoclint:none",
"-d", "out-1", "-d", "out-1",
"-sourcepath", testSrc, "-sourcepath", testSrc,
@ -60,9 +58,6 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
@Test @Test
public void test_NoComment_Deprecated() { public void test_NoComment_Deprecated() {
// tester.run(ARGS2, TEST_ALL, NEGATED_TEST_NO_C5);
// tester.runTestsOnHTML(NO_TEST, NEGATED_TEST_C5);
// tester.runTestsOnHTML(NO_TEST, TEST_CMNT_DEPR);
javadoc("-Xdoclint:none", javadoc("-Xdoclint:none",
"-d", "out-2", "-d", "out-2",
"-nocomment", "-nocomment",
@ -75,8 +70,6 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
@Test @Test
public void test_Comment_NoDeprecated() { public void test_Comment_NoDeprecated() {
// tester.run(ARGS3, TEST_ALL, NEGATED_TEST_NO_C5);
// tester.runTestsOnHTML(TEST_NODEPR, TEST_NOCMNT_NODEPR);
javadoc("-Xdoclint:none", javadoc("-Xdoclint:none",
"-d", "out-3", "-d", "out-3",
"-nodeprecated", "-nodeprecated",
@ -90,8 +83,6 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
@Test @Test
public void testNoCommentNoDeprecated() { public void testNoCommentNoDeprecated() {
// tester.run(ARGS4, TEST_ALL, NEGATED_TEST_NO_C5);
// tester.runTestsOnHTML(TEST_NOCMNT_NODEPR, TEST_CMNT_DEPR);
javadoc("-Xdoclint:none", javadoc("-Xdoclint:none",
"-d", "out-4", "-d", "out-4",
"-nocomment", "-nocomment",
@ -114,7 +105,7 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
"extends java.lang.Object\n" + "extends java.lang.Object\n" +
"implements java.io.Serializable</pre>"); "implements java.io.Serializable</pre>");
checkOutput("pkg1/C4.html", true, checkOutput("pkg1/C4.html", true,
"<dl>\n" + "<dl class=\"notes\">\n" +
"<dt>Default:</dt>\n" + "<dt>Default:</dt>\n" +
"<dd>true</dd>\n" + "<dd>true</dd>\n" +
"</dl>"); "</dl>");

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -63,7 +63,7 @@ public class TestIndex extends JavadocTester {
+ "<span class=\"typeNameLink\">Coin</span></a> - Enum in " + "<span class=\"typeNameLink\">Coin</span></a> - Enum in "
+ "<a href=\"pkg/package-summary.html\">pkg</a>", + "<a href=\"pkg/package-summary.html\">pkg</a>",
"Class in <a href=\"package-summary.html\">&lt;Unnamed&gt;</a>", "Class in <a href=\"package-summary.html\">&lt;Unnamed&gt;</a>",
"<dl>\n" "<dl class=\"index\">\n"
+ "<dt><span class=\"memberNameLink\"><a href=\"pkg/C.html#Java\">" + "<dt><span class=\"memberNameLink\"><a href=\"pkg/C.html#Java\">"
+ "Java</a></span> - Static variable in class pkg.<a href=\"pkg/C.html\" " + "Java</a></span> - Static variable in class pkg.<a href=\"pkg/C.html\" "
+ "title=\"class in pkg\">C</a></dt>\n" + "title=\"class in pkg\">C</a></dt>\n"

View file

@ -71,7 +71,7 @@ public class TestInterface extends JavadocTester {
"<div class=\"memberSignature\"><span class=\"modifiers\">static final</span>&nbsp;" "<div class=\"memberSignature\"><span class=\"modifiers\">static final</span>&nbsp;"
+ "<span class=\"returnType\">int</span>&nbsp;<span class=\"memberName\">field</span></div>", + "<span class=\"returnType\">int</span>&nbsp;<span class=\"memberName\">field</span></div>",
// Make sure known implementing class list is correct and omits type parameters. // Make sure known implementing class list is correct and omits type parameters.
"<dl>\n" "<dl class=\"notes\">\n"
+ "<dt>All Known Implementing Classes:</dt>\n" + "<dt>All Known Implementing Classes:</dt>\n"
+ "<dd><code><a href=\"Child.html\" title=\"class in pkg\">Child" + "<dd><code><a href=\"Child.html\" title=\"class in pkg\">Child"
+ "</a></code>, <code><a href=\"Parent.html\" title=\"class in pkg\">Parent" + "</a></code>, <code><a href=\"Parent.html\" title=\"class in pkg\">Parent"
@ -80,7 +80,7 @@ public class TestInterface extends JavadocTester {
checkOutput("pkg/Child.html", true, checkOutput("pkg/Child.html", true,
// Make sure "All Implemented Interfaces": has substituted type parameters // Make sure "All Implemented Interfaces": has substituted type parameters
"<dl>\n" "<dl class=\"notes\">\n"
+ "<dt>All Implemented Interfaces:</dt>\n" + "<dt>All Implemented Interfaces:</dt>\n"
+ "<dd><code><a href=\"Interface.html\" title=\"interface in pkg\">" + "<dd><code><a href=\"Interface.html\" title=\"interface in pkg\">"
+ "Interface</a>&lt;CE&gt;</code></dd>\n" + "Interface</a>&lt;CE&gt;</code></dd>\n"
@ -106,8 +106,8 @@ public class TestInterface extends JavadocTester {
+ "title=\"type parameter in Child\">CE</a>&gt;</code></dd>"); + "title=\"type parameter in Child\">CE</a>&gt;</code></dd>");
checkOutput("pkg/Parent.html", true, checkOutput("pkg/Parent.html", true,
//Make sure "Direct Know Subclasses" omits type parameters //Make sure "Direct Known Subclasses" omits type parameters
"<dl>\n" "<dl class=\"notes\">\n"
+ "<dt>Direct Known Subclasses:</dt>\n" + "<dt>Direct Known Subclasses:</dt>\n"
+ "<dd><code><a href=\"Child.html\" title=\"class in pkg\">Child" + "<dd><code><a href=\"Child.html\" title=\"class in pkg\">Child"
+ "</a></code></dd>\n" + "</a></code></dd>\n"

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -69,7 +69,7 @@ public class TestLambdaFeature extends JavadocTester {
+ " onclick=\"show(4);\">Abstract Methods</button><button role=\"tab\" aria-selected=\"false\"" + " onclick=\"show(4);\">Abstract Methods</button><button role=\"tab\" aria-selected=\"false\""
+ " aria-controls=\"memberSummary_tabpanel\" tabindex=\"-1\" onkeydown=\"switchTab(event)\"" + " aria-controls=\"memberSummary_tabpanel\" tabindex=\"-1\" onkeydown=\"switchTab(event)\""
+ " id=\"t5\" class=\"tableTab\" onclick=\"show(16);\">Default Methods</button></div>", + " id=\"t5\" class=\"tableTab\" onclick=\"show(16);\">Default Methods</button></div>",
"<dl>\n" "<dl class=\"notes\">\n"
+ "<dt>Functional Interface:</dt>\n" + "<dt>Functional Interface:</dt>\n"
+ "<dd>This is a functional interface and can therefore be used as " + "<dd>This is a functional interface and can therefore be used as "
+ "the assignment target for a lambda expression or method " + "the assignment target for a lambda expression or method "
@ -77,7 +77,7 @@ public class TestLambdaFeature extends JavadocTester {
+ "</dl>"); + "</dl>");
checkOutput("pkg1/FuncInf.html", true, checkOutput("pkg1/FuncInf.html", true,
"<dl>\n" "<dl class=\"notes\">\n"
+ "<dt>Functional Interface:</dt>\n" + "<dt>Functional Interface:</dt>\n"
+ "<dd>This is a functional interface and can therefore be used as " + "<dd>This is a functional interface and can therefore be used as "
+ "the assignment target for a lambda expression or method " + "the assignment target for a lambda expression or method "
@ -90,11 +90,11 @@ public class TestLambdaFeature extends JavadocTester {
checkOutput("pkg/B.html", false, checkOutput("pkg/B.html", false,
"<td class=\"colFirst\"><code>default void</code></td>", "<td class=\"colFirst\"><code>default void</code></td>",
"<dl>\n" "<dl class=\"notes\">\n"
+ "<dt>Functional Interface:</dt>"); + "<dt>Functional Interface:</dt>");
checkOutput("pkg1/NotAFuncInf.html", false, checkOutput("pkg1/NotAFuncInf.html", false,
"<dl>\n" "<dl class=\"notes\">\n"
+ "<dt>Functional Interface:</dt>\n" + "<dt>Functional Interface:</dt>\n"
+ "<dd>This is a functional interface and can therefore be used as " + "<dd>This is a functional interface and can therefore be used as "
+ "the assignment target for a lambda expression or method " + "the assignment target for a lambda expression or method "
@ -111,7 +111,7 @@ public class TestLambdaFeature extends JavadocTester {
checkExit(Exit.OK); checkExit(Exit.OK);
checkOutput("pkg1/FuncInf.html", false, checkOutput("pkg1/FuncInf.html", false,
"<dl>\n" "<dl class=\"notes\">\n"
+ "<dt>Functional Interface:</dt>"); + "<dt>Functional Interface:</dt>");
} }
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -64,7 +64,7 @@ public class TestLinkTaglet extends JavadocTester {
+ " Link to another inner class: <a href=\"C.InnerC2.html\" title=\"class in pkg\"><code>C.InnerC2</code></a>"); + " Link to another inner class: <a href=\"C.InnerC2.html\" title=\"class in pkg\"><code>C.InnerC2</code></a>");
checkOutput("pkg/C.InnerC2.html", true, checkOutput("pkg/C.InnerC2.html", true,
"<dl>\n" "<dl class=\"notes\">\n"
+ "<dt>Enclosing class:</dt>\n" + "<dt>Enclosing class:</dt>\n"
+ "<dd><a href=\"C.html\" title=\"class in pkg\">C</a></dd>\n" + "<dd><a href=\"C.html\" title=\"class in pkg\">C</a></dd>\n"
+ "</dl>"); + "</dl>");

View file

@ -872,7 +872,7 @@ public class TestModules extends JavadocTester {
void checkModulesInSearch(boolean found) { void checkModulesInSearch(boolean found) {
checkOutput("index-all.html", found, checkOutput("index-all.html", found,
"<dl>\n" "<dl class=\"index\">\n"
+ "<dt><a href=\"moduleA/module-summary.html\">moduleA</a> - module moduleA</dt>\n" + "<dt><a href=\"moduleA/module-summary.html\">moduleA</a> - module moduleA</dt>\n"
+ "<dd>\n" + "<dd>\n"
+ "<div class=\"block\">This is a test description for the moduleA module with a Search " + "<div class=\"block\">This is a test description for the moduleA module with a Search "
@ -883,7 +883,7 @@ public class TestModules extends JavadocTester {
+ "<div class=\"block\">This is a test description for the moduleB module.</div>\n" + "<div class=\"block\">This is a test description for the moduleB module.</div>\n"
+ "</dd>\n" + "</dd>\n"
+ "</dl>", + "</dl>",
"<dl>\n" "<dl class=\"index\">\n"
+ "<dt><span class=\"searchTagLink\"><a href=\"moduleB/module-summary.html#search_word\">" + "<dt><span class=\"searchTagLink\"><a href=\"moduleB/module-summary.html#search_word\">"
+ "search_word</a></span> - Search tag in module moduleB</dt>\n" + "search_word</a></span> - Search tag in module moduleB</dt>\n"
+ "<dd>&nbsp;</dd>\n" + "<dd>&nbsp;</dd>\n"
@ -1226,7 +1226,7 @@ public class TestModules extends JavadocTester {
+ "</div>"); + "</div>");
checkOutput("index-all.html", found, checkOutput("index-all.html", found,
"<h2 class=\"title\" id=\"I:T\">T</h2>\n" "<h2 class=\"title\" id=\"I:T\">T</h2>\n"
+ "<dl>\n" + "<dl class=\"index\">\n"
+ "<dt><a href=\"test.moduleFullName/module-summary.html\">test.moduleFullName</a> - module test.moduleFullName</dt>\n" + "<dt><a href=\"test.moduleFullName/module-summary.html\">test.moduleFullName</a> - module test.moduleFullName</dt>\n"
+ "<dd>\n" + "<dd>\n"
+ "<div class=\"block\">This is a test description for the test.moduleFullName.</div>\n" + "<div class=\"block\">This is a test description for the test.moduleFullName.</div>\n"
@ -1236,7 +1236,7 @@ public class TestModules extends JavadocTester {
+ "<h1 title=\"Module\" class=\"title\">Module&nbsp;moduleFullName</h1>\n" + "<h1 title=\"Module\" class=\"title\">Module&nbsp;moduleFullName</h1>\n"
+ "</div>"); + "</div>");
checkOutput("index-all.html", !found, checkOutput("index-all.html", !found,
"<dl>\n" "<dl class=\"index\">\n"
+ "<dt><a href=\"test.moduleFullName/module-summary.html\">moduleFullName</a> - module moduleFullName</dt>\n" + "<dt><a href=\"test.moduleFullName/module-summary.html\">moduleFullName</a> - module moduleFullName</dt>\n"
+ "<dd>\n" + "<dd>\n"
+ "<div class=\"block\">This is a test description for the test.moduleFullName.</div>\n" + "<div class=\"block\">This is a test description for the test.moduleFullName.</div>\n"

View file

@ -191,7 +191,7 @@ public class TestNewLanguageFeatures extends JavadocTester {
// Interface generic parameter substitution // Interface generic parameter substitution
// Signature of subclass that has type parameters. // Signature of subclass that has type parameters.
checkOutput("pkg/TypeParameters.html", true, checkOutput("pkg/TypeParameters.html", true,
"<dl>\n" "<dl class=\"notes\">\n"
+ "<dt>All Implemented Interfaces:</dt>\n" + "<dt>All Implemented Interfaces:</dt>\n"
+ "<dd><code><a href=\"SubInterface.html\" title=\"interface in pkg\">" + "<dd><code><a href=\"SubInterface.html\" title=\"interface in pkg\">"
+ "SubInterface</a>&lt;E&gt;</code>, <code><a href=\"SuperInterface.html\" " + "SubInterface</a>&lt;E&gt;</code>, <code><a href=\"SuperInterface.html\" "
@ -199,13 +199,13 @@ public class TestNewLanguageFeatures extends JavadocTester {
+ "</dl>"); + "</dl>");
checkOutput("pkg/SuperInterface.html", true, checkOutput("pkg/SuperInterface.html", true,
"<dl>\n" "<dl class=\"notes\">\n"
+ "<dt>All Known Subinterfaces:</dt>\n" + "<dt>All Known Subinterfaces:</dt>\n"
+ "<dd><code><a href=\"SubInterface.html\" title=\"interface in pkg\">" + "<dd><code><a href=\"SubInterface.html\" title=\"interface in pkg\">"
+ "SubInterface</a>&lt;V&gt;</code></dd>\n" + "SubInterface</a>&lt;V&gt;</code></dd>\n"
+ "</dl>"); + "</dl>");
checkOutput("pkg/SubInterface.html", true, checkOutput("pkg/SubInterface.html", true,
"<dl>\n" "<dl class=\"notes\">\n"
+ "<dt>All Superinterfaces:</dt>\n" + "<dt>All Superinterfaces:</dt>\n"
+ "<dd><code><a href=\"SuperInterface.html\" title=\"interface in pkg\">" + "<dd><code><a href=\"SuperInterface.html\" title=\"interface in pkg\">"
+ "SuperInterface</a>&lt;V&gt;</code></dd>\n" + "SuperInterface</a>&lt;V&gt;</code></dd>\n"

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -59,7 +59,7 @@ public class TestPackageHtml extends JavadocTester {
"pkg2", "pkg3", "pkg4"); "pkg2", "pkg3", "pkg4");
checkExit(Exit.OK); checkExit(Exit.OK);
checkOutput("index-all.html", true, checkOutput("index-all.html", true,
"<dl>\n" "<dl class=\"index\">\n"
+ "<dt><a href=\"pkg2/package-summary.html\">pkg2</a> - package pkg2</dt>\n" + "<dt><a href=\"pkg2/package-summary.html\">pkg2</a> - package pkg2</dt>\n"
+ "<dt><a href=\"pkg3/package-summary.html\">pkg3</a> - package pkg3</dt>\n" + "<dt><a href=\"pkg3/package-summary.html\">pkg3</a> - package pkg3</dt>\n"
+ "<dd>\n" + "<dd>\n"

View file

@ -73,7 +73,7 @@ public class TestPrivateClasses extends JavadocTester {
+ "<span class=\"returnType\">void</span>&nbsp;<span class=\"memberName\">" + "<span class=\"returnType\">void</span>&nbsp;<span class=\"memberName\">"
+ "methodInheritedFromParent</span>&#8203;(<span class=\"arguments\">int&nbsp;p1)</span>\n" + "methodInheritedFromParent</span>&#8203;(<span class=\"arguments\">int&nbsp;p1)</span>\n"
+ " throws <span class=\"exceptions\">java.lang.Exception</span></div>", + " throws <span class=\"exceptions\">java.lang.Exception</span></div>",
"<dl>\n" "<dl class=\"notes\">\n"
+ "<dt>All Implemented Interfaces:</dt>\n" + "<dt>All Implemented Interfaces:</dt>\n"
+ "<dd><code><a href=\"PublicInterface.html\" title=\"interface in pkg\">" + "<dd><code><a href=\"PublicInterface.html\" title=\"interface in pkg\">"
+ "PublicInterface</a></code></dd>\n" + "PublicInterface</a></code></dd>\n"
@ -111,7 +111,7 @@ public class TestPrivateClasses extends JavadocTester {
"<a href=\"#methodInterface(int)\">" "<a href=\"#methodInterface(int)\">"
+ "methodInterface</a>", + "methodInterface</a>",
//Make sure implemented interfaces from private superclass are inherited //Make sure implemented interfaces from private superclass are inherited
"<dl>\n" "<dl class=\"notes\">\n"
+ "<dt>All Known Implementing Classes:</dt>\n" + "<dt>All Known Implementing Classes:</dt>\n"
+ "<dd><code><a href=\"PublicChild.html\" title=\"class in pkg\">" + "<dd><code><a href=\"PublicChild.html\" title=\"class in pkg\">"
+ "PublicChild</a></code></dd>\n" + "PublicChild</a></code></dd>\n"
@ -174,7 +174,7 @@ public class TestPrivateClasses extends JavadocTester {
"Description copied from", "Description copied from",
// Extend documented private classes or interfaces // Extend documented private classes or interfaces
"extends", "extends",
"<dl>\n" "<dl class=\"notes\">\n"
+ "<dt>All Implemented Interfaces:</dt>\n" + "<dt>All Implemented Interfaces:</dt>\n"
+ "<dd><code><a href=\"PrivateInterface.html\" title=\"interface in pkg\">" + "<dd><code><a href=\"PrivateInterface.html\" title=\"interface in pkg\">"
+ "PrivateInterface</a></code>, " + "PrivateInterface</a></code>, "
@ -198,7 +198,7 @@ public class TestPrivateClasses extends JavadocTester {
"extends", "extends",
"All Superinterfaces", "All Superinterfaces",
//Make sure implemented interfaces from private superclass are inherited //Make sure implemented interfaces from private superclass are inherited
"<dl>\n" "<dl class=\"notes\">\n"
+ "<dt>All Known Implementing Classes:</dt>\n" + "<dt>All Known Implementing Classes:</dt>\n"
+ "<dd><code><a href=\"PrivateParent.html\" title=\"class in pkg\">" + "<dd><code><a href=\"PrivateParent.html\" title=\"class in pkg\">"
+ "PrivateParent</a></code>, " + "PrivateParent</a></code>, "

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -48,7 +48,7 @@ public class TestSummaryTag extends JavadocTester {
checkExit(Exit.OK); checkExit(Exit.OK);
checkOutput("index-all.html", true, checkOutput("index-all.html", true,
"<dl>\n" "<dl class=\"index\">\n"
+ "<dt><span class=\"memberNameLink\"><a href=\"p1/A.html#m()\">m()" + "<dt><span class=\"memberNameLink\"><a href=\"p1/A.html#m()\">m()"
+ "</a></span> - Method in class p1.<a href=\"p1/A.html\" title=\"class in p1\">A</a></dt>\n" + "</a></span> - Method in class p1.<a href=\"p1/A.html\" title=\"class in p1\">A</a></dt>\n"
+ "<dd>\n" + "<dd>\n"