Skip to content
Permalink
Browse files

8241625: use new "member-list" CSS class instead of general "block-li…

…st" for list of members

Reviewed-by: hannesw
  • Loading branch information
jonathan-gibbons committed Mar 31, 2020
1 parent 6d44ff7 commit 35f4df51d447cbc62a0010adef57ab796be84850
Showing with 284 additions and 194 deletions.
  1. +12 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java
  2. +0 −5 ...avadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeFieldWriterImpl.java
  3. +0 −5 ...are/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java
  4. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java
  5. +1 −2 ...k.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstantsSummaryWriterImpl.java
  6. +0 −5 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java
  7. +2 −3 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DeprecatedListWriter.java
  8. +0 −5 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/EnumConstantWriterImpl.java
  9. +0 −5 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriterImpl.java
  10. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java
  11. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java
  12. +0 −5 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java
  13. +3 −3 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleWriterImpl.java
  14. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageUseWriter.java
  15. +1 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java
  16. +0 −5 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriterImpl.java
  17. +1 −1 ...jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriterImpl.java
  18. +20 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java
  19. +1 −0 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlStyle.java
  20. +1 −9 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AnnotationTypeFieldWriter.java
  21. +1 −9 ...avadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AnnotationTypeRequiredMemberWriter.java
  22. +1 −9 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/ConstructorWriter.java
  23. +1 −9 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/EnumConstantWriter.java
  24. +1 −9 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/FieldWriter.java
  25. +54 −0 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/MemberWriter.java
  26. +1 −10 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/MethodWriter.java
  27. +1 −9 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/PropertyWriter.java
  28. +4 −4 ...vadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeFieldBuilder.java
  29. +4 −4 ...re/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java
  30. +5 −5 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstructorBuilder.java
  31. +5 −5 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/EnumConstantBuilder.java
  32. +4 −4 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/FieldBuilder.java
  33. +4 −4 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MethodBuilder.java
  34. +4 −4 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PropertyBuilder.java
  35. +6 −6 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css
  36. +4 −4 test/langtools/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java
  37. +27 −27 test/langtools/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java
  38. +4 −4 test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java
  39. +100 −0 test/langtools/jdk/javadoc/doclet/testLists/TestLists.java
  40. +6 −6 test/langtools/jdk/javadoc/doclet/testModules/TestModules.java
  41. +1 −1 test/langtools/jdk/javadoc/doclet/testUseOption/TestUseOption.java
@@ -51,6 +51,7 @@
import jdk.javadoc.internal.doclets.formats.html.markup.TableHeader;
import jdk.javadoc.internal.doclets.toolkit.Content;
import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter;
import jdk.javadoc.internal.doclets.toolkit.MemberWriter;
import jdk.javadoc.internal.doclets.toolkit.Resources;
import jdk.javadoc.internal.doclets.toolkit.taglets.DeprecatedTaglet;
import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
@@ -70,7 +71,7 @@
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*/
public abstract class AbstractMemberWriter implements MemberSummaryWriter {
public abstract class AbstractMemberWriter implements MemberSummaryWriter, MemberWriter {

protected final HtmlConfiguration configuration;
protected final HtmlOptions options;
@@ -467,6 +468,16 @@ public Content getMemberTree(Content memberTree) {
return writer.getMemberTree(memberTree);
}

@Override
public Content getMemberList() {
return writer.getMemberList();
}

@Override
public Content getMemberListItem(Content memberTree) {
return writer.getMemberListItem(memberTree);
}

/**
* A content builder for member signatures.
*/
@@ -140,11 +140,6 @@ public Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content
.setId(SectionName.ANNOTATION_TYPE_FIELD_DETAIL.getName()));
}

@Override
public Content getAnnotationDoc(Content annotationDocTree) {
return getMemberTree(annotationDocTree);
}

@Override
public void addSummaryLabel(Content memberTree) {
HtmlTree label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
@@ -140,11 +140,6 @@ public Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content
return getMemberTree(HtmlTree.SECTION(HtmlStyle.memberDetails, annotationDetails));
}

@Override
public Content getAnnotationDoc(Content annotationDocTree) {
return getMemberTree(annotationDocTree);
}

@Override
public void addSummaryLabel(Content memberTree) {
HtmlTree label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
@@ -316,7 +316,7 @@ protected void addClassList(Content contentTree) {
Content heading = HtmlTree.HEADING(Headings.TypeUse.SUMMARY_HEADING, link);
htmlTree.add(heading);
addClassUse(pkg, htmlTree);
ul.add(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
ul.add(HtmlTree.LI(htmlTree));
}
Content li = HtmlTree.SECTION(HtmlStyle.classUses, ul);
contentTree.add(li);
@@ -214,8 +214,7 @@ public void addConstantMembers(TypeElement typeElement, Collection<VariableEleme
for (VariableElement field : fields) {
table.addRow(getTypeColumn(field), getNameColumn(field), getValue(field));
}
Content li = HtmlTree.LI(HtmlStyle.blockList, table);
classConstantTree.add(li);
classConstantTree.add(HtmlTree.LI(table));
}

/**
@@ -158,11 +158,6 @@ public Content getConstructorDetails(Content constructorDetailsTreeHeader, Conte
.setId(SectionName.CONSTRUCTOR_DETAIL.getName()));
}

@Override
public Content getConstructorDoc(Content constructorDocTree) {
return getMemberTree(constructorDocTree);
}

/**
* Let the writer know whether a non public constructor was found.
*
@@ -401,9 +401,8 @@ protected void addDeprecatedAPI(SortedSet<Element> deprList, String id, String h
}
table.addRow(link, desc);
}
Content li = HtmlTree.LI(HtmlStyle.blockList, table);
Content ul = HtmlTree.UL(HtmlStyle.blockList, li);
contentTree.add(ul);
// note: singleton list
contentTree.add(HtmlTree.UL(HtmlStyle.blockList, HtmlTree.LI(table)));
}
}

@@ -127,11 +127,6 @@ public Content getEnumConstantsDetails(Content enumConstantsDetailsTreeHeader,
.setId(SectionName.ENUM_CONSTANT_DETAIL.getName()));
}

@Override
public Content getEnumConstants(Content enumConstantsTree) {
return getMemberTree(enumConstantsTree);
}

@Override
public void addSummaryLabel(Content memberTree) {
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
@@ -127,11 +127,6 @@ public Content getFieldDetails(Content fieldDetailsTreeHeader, Content fieldDeta
.setId(SectionName.FIELD_DETAIL.getName()));
}

@Override
public Content getFieldDoc(Content fieldTree) {
return getMemberTree(fieldTree);
}

@Override
public void addSummaryLabel(Content memberTree) {
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
@@ -107,7 +107,7 @@ public Content getSerializableFields(String heading, Content serializableFieldsT
section.add(serialHeading);
section.add(serializableFieldsTree);
}
return HtmlTree.LI(HtmlStyle.blockList, section);
return HtmlTree.LI(section);
}

@Override
@@ -94,7 +94,7 @@ public Content getSerializableMethods(String heading, Content serializableMethod
Content serialHeading = HtmlTree.HEADING(Headings.SerializedForm.CLASS_SUBHEADING, headingContent);
Content section = HtmlTree.SECTION(HtmlStyle.detail, serialHeading);
section.add(serializableMethodContent);
return HtmlTree.LI(HtmlStyle.blockList, section);
return HtmlTree.LI(section);
}

/**
@@ -176,11 +176,6 @@ public Content getMethodDetails(Content methodDetailsTreeHeader, Content methodD
.setId(SectionName.METHOD_DETAIL.getName()));
}

@Override
public Content getMethodDoc(Content methodDocTree) {
return getMemberTree(methodDocTree);
}

@Override
public void addSummaryLabel(Content memberTree) {
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
@@ -514,7 +514,7 @@ public void addModulesSummary(Content summaryContentTree) {
addModulesList(indirectModules, amrTable);
section.add(amrTable);
}
summaryContentTree.add(HtmlTree.LI(HtmlStyle.blockList, section));
summaryContentTree.add(HtmlTree.LI(section));
}
}

@@ -560,7 +560,7 @@ public void addPackagesSummary(Content summaryContentTree) {
addIndirectPackages(aopTable, indirectOpenPackages);
section.add(aopTable);
}
summaryContentTree.add(HtmlTree.LI(HtmlStyle.blockList, section));
summaryContentTree.add(HtmlTree.LI(section));
}
}

@@ -735,7 +735,7 @@ public void addServicesSummary(Content summaryContentTree) {
section.add(table);
}
}
summaryContentTree.add(HtmlTree.LI(HtmlStyle.blockList, section));
summaryContentTree.add(HtmlTree.LI(section));
}
}

@@ -220,7 +220,7 @@ protected void addClassList(Content contentTree) {
table.addRow(typeContent, summary);
}
section.add(table);
ul.add(HtmlTree.LI(HtmlStyle.blockList, section));
ul.add(HtmlTree.LI(section));
}
Content li = HtmlTree.SECTION(HtmlStyle.packageUses, ul);
contentTree.add(li);
@@ -234,8 +234,7 @@ public void addClassesSummary(SortedSet<TypeElement> classes, String label,
}
table.addRow(classLink, description);
}
Content li = HtmlTree.LI(HtmlStyle.blockList, table);
summaryContentTree.add(li);
summaryContentTree.add(HtmlTree.LI(table));
}
}

@@ -139,11 +139,6 @@ public Content getPropertyDetails(Content propertyDetailsTreeHeader, Content pro
.setId(SectionName.PROPERTY_DETAIL.getName()));
}

@Override
public Content getPropertyDoc(Content propertyDocTree) {
return getMemberTree(propertyDocTree);
}

@Override
public void addSummaryLabel(Content memberTree) {
Content label = HtmlTree.HEADING(Headings.TypeDeclaration.SUMMARY_HEADING,
@@ -231,7 +231,7 @@ public void addSerializedContent(Content serializedTreeContent) {
public void addPackageSerializedTree(Content serializedSummariesTree,
Content packageSerializedTree)
{
serializedSummariesTree.add(HtmlTree.LI(HtmlStyle.blockList, packageSerializedTree));
serializedSummariesTree.add(HtmlTree.LI(packageSerializedTree));
}

/**
@@ -212,6 +212,25 @@ public Content getMemberTreeHeader() {
return ul;
}

/**
* Returns a list to be used for the list of members of a given kind.
*
* @return a list to be used for the list of members of a given kind
*/
public Content getMemberList() {
return new HtmlTree(TagName.UL).setStyle(HtmlStyle.memberList);
}

/**
* Returns an item for the list of elements of a given kind
*
* @param contentTree the tree used to generate the complete member tree
* @return an item for the list of elements of a given kind
*/
public Content getMemberListItem(Content contentTree) {
return HtmlTree.LI(contentTree);
}

public Content getMemberInheritedTree() {
HtmlTree div = new HtmlTree(TagName.DIV);
div.setStyle(HtmlStyle.inheritedList);
@@ -238,7 +257,7 @@ public void addMemberTree(HtmlStyle style, SectionName sectionName, Content memb
* @return a content tree for the member
*/
public Content getMemberTree(Content contentTree) {
return HtmlTree.LI(HtmlStyle.blockList, contentTree);
return HtmlTree.LI(contentTree);
}

/**
@@ -85,6 +85,7 @@
interfaceName,
legalCopy,
memberDetails,
memberList,
memberNameLabel,
memberNameLink,
memberSummary,
@@ -37,7 +37,7 @@
* deletion without notice.</b>
*/

public interface AnnotationTypeFieldWriter {
public interface AnnotationTypeFieldWriter extends MemberWriter {

/**
* Add the annotation type member tree header.
@@ -77,14 +77,6 @@
*/
Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content annotationDetailsTree);

/**
* Get the annotation type documentation.
*
* @param annotationDocTree the content tree representing annotation type documentation
* @return content tree for the annotation type documentation
*/
Content getAnnotationDoc(Content annotationDocTree);

/**
* Get the signature for the given member.
*
@@ -37,7 +37,7 @@
* deletion without notice.</b>
*/

public interface AnnotationTypeRequiredMemberWriter {
public interface AnnotationTypeRequiredMemberWriter extends MemberWriter {

/**
* Add the annotation type member tree header.
@@ -77,14 +77,6 @@
*/
Content getAnnotationDetails(Content annotationDetailsTreeHeader, Content annotationDetailsTree);

/**
* Get the annotation type documentation.
*
* @param annotationDocTree the content tree representing annotation type documentation
* @return content tree for the annotation type documentation
*/
Content getAnnotationDoc(Content annotationDocTree);

/**
* Get the signature for the given member.
*
@@ -37,7 +37,7 @@
* deletion without notice.</b>
*/

public interface ConstructorWriter {
public interface ConstructorWriter extends MemberWriter {

/**
* Get the constructor details tree header.
@@ -96,14 +96,6 @@
*/
Content getConstructorDetails(Content memberDetailsTreeHeader, Content memberDetailsTree);

/**
* Get the constructor documentation.
*
* @param constructorDocTree the content tree representing constructor documentation
* @return content tree for the constructor documentation
*/
Content getConstructorDoc(Content constructorDocTree);

/**
* Let the writer know whether a non public constructor was found.
*
@@ -37,7 +37,7 @@
* deletion without notice.</b>
*/

public interface EnumConstantWriter {
public interface EnumConstantWriter extends MemberWriter {

/**
* Get the enum constants details tree header.
@@ -99,14 +99,6 @@ Content getEnumConstantsTreeHeader(VariableElement enumConstant,
*/
Content getEnumConstantsDetails(Content memberDetailsTreeHeader, Content memberDetailsTree);

/**
* Get the enum constants documentation.
*
* @param enumConstantsTree the content tree representing enum constants documentation
* @return content tree for the enum constants documentation
*/
Content getEnumConstants(Content enumConstantsTree);

/**
* Gets the member header tree.
*
@@ -38,7 +38,7 @@
* deletion without notice.</b>
*/

public interface FieldWriter {
public interface FieldWriter extends MemberWriter {

/**
* Get the field details tree header.
@@ -97,14 +97,6 @@
*/
Content getFieldDetails(Content memberDetailsTreeHeader, Content memberDetailsTree);

/**
* Get the field documentation.
*
* @param fieldDocTree the content tree representing field documentation
* @return content tree for the field documentation
*/
Content getFieldDoc(Content fieldDocTree);

/**
* Gets the member header tree.
*

0 comments on commit 35f4df5

Please sign in to comment.