8313204: Inconsistent order of sections in generated class documentation
Reviewed-by: hannesw, prappo
This commit is contained in:
parent
4ae75cab53
commit
e2cb0bc6f1
@ -331,13 +331,20 @@ public class ClassWriter extends SubWriterHolderWriter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void buildSummaries(Content target) {
|
protected void buildSummaries(Content target) {
|
||||||
buildPropertiesSummary(target);
|
// compare with buildMemberDetails:
|
||||||
|
// buildPropertyDetails(detailsList);
|
||||||
|
// buildEnumConstantsDetails(detailsList);
|
||||||
|
// buildFieldDetails(detailsList);
|
||||||
|
// buildConstructorDetails(detailsList);
|
||||||
|
// buildAnnotationTypeMemberDetails(detailsList);
|
||||||
|
// buildMethodDetails(detailsList);
|
||||||
buildNestedClassesSummary(target);
|
buildNestedClassesSummary(target);
|
||||||
|
buildPropertiesSummary(target);
|
||||||
buildEnumConstantsSummary(target);
|
buildEnumConstantsSummary(target);
|
||||||
buildAnnotationTypeRequiredMemberSummary(target);
|
|
||||||
buildAnnotationTypeOptionalMemberSummary(target);
|
|
||||||
buildFieldsSummary(target);
|
buildFieldsSummary(target);
|
||||||
buildConstructorsSummary(target);
|
buildConstructorsSummary(target);
|
||||||
|
buildAnnotationTypeRequiredMemberSummary(target);
|
||||||
|
buildAnnotationTypeOptionalMemberSummary(target);
|
||||||
buildMethodsSummary(target);
|
buildMethodsSummary(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -562,8 +569,18 @@ public class ClassWriter extends SubWriterHolderWriter {
|
|||||||
protected void buildMemberDetails(Content classContent) throws DocletException {
|
protected void buildMemberDetails(Content classContent) throws DocletException {
|
||||||
Content detailsList = getDetailsList();
|
Content detailsList = getDetailsList();
|
||||||
|
|
||||||
buildEnumConstantsDetails(detailsList);
|
// compare with buildSummaries()
|
||||||
|
// buildNestedClassesSummary(target);
|
||||||
|
// buildPropertiesSummary(target);
|
||||||
|
// buildEnumConstantsSummary(target);
|
||||||
|
// buildFieldsSummary(target);
|
||||||
|
// buildConstructorsSummary(target);
|
||||||
|
// buildAnnotationTypeRequiredMemberSummary(target);
|
||||||
|
// buildAnnotationTypeOptionalMemberSummary(target);
|
||||||
|
// buildMethodsSummary(target);
|
||||||
|
|
||||||
buildPropertyDetails(detailsList);
|
buildPropertyDetails(detailsList);
|
||||||
|
buildEnumConstantsDetails(detailsList);
|
||||||
buildFieldDetails(detailsList);
|
buildFieldDetails(detailsList);
|
||||||
buildConstructorDetails(detailsList);
|
buildConstructorDetails(detailsList);
|
||||||
buildAnnotationTypeMemberDetails(detailsList);
|
buildAnnotationTypeMemberDetails(detailsList);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2004, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2004, 2023, 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
|
||||||
@ -24,7 +24,7 @@
|
|||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 4973609 8015249 8025633 8026567 6469561 8071982 8162363 8182765 8223364
|
* @bug 4973609 8015249 8025633 8026567 6469561 8071982 8162363 8182765 8223364
|
||||||
8242056 8261976 8223358
|
8242056 8261976 8223358 8313204
|
||||||
* @summary Make sure that annotation types with 0 members does not have
|
* @summary Make sure that annotation types with 0 members does not have
|
||||||
* extra HR tags.
|
* extra HR tags.
|
||||||
* @library ../../lib
|
* @library ../../lib
|
||||||
@ -185,4 +185,22 @@ public class TestAnnotationTypes extends JavadocTester {
|
|||||||
"""
|
"""
|
||||||
<span class="modifiers">public @interface </span><span class="element-name"><a href="../src-html/pkg/AnnotationTypeField.html#line-31">AnnotationTypeField</a></span></div>""");
|
<span class="modifiers">public @interface </span><span class="element-name"><a href="../src-html/pkg/AnnotationTypeField.html#line-31">AnnotationTypeField</a></span></div>""");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testSectionOrdering() {
|
||||||
|
javadoc("-d", "out-3",
|
||||||
|
"-linksource",
|
||||||
|
"--no-platform-links",
|
||||||
|
"-sourcepath", testSrc,
|
||||||
|
"pkg");
|
||||||
|
checkExit(Exit.OK);
|
||||||
|
|
||||||
|
checkOrder("pkg/AnnotationTypeField.html",
|
||||||
|
"<ul class=\"summary-list\">",
|
||||||
|
"<section class=\"field-summary\" id=\"field-summary\">",
|
||||||
|
"<section class=\"member-summary\" id=\"annotation-interface-optional-element-summary\">",
|
||||||
|
"<ul class=\"details-list\">",
|
||||||
|
"<section class=\"field-details\" id=\"field-detail\">",
|
||||||
|
"<section class=\"detail\" id=\"DEFAULT_NAME\">");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2017, 2023, 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
|
||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 8157000 8192850 8182765 8223607 8261976 8281376
|
* @bug 8157000 8192850 8182765 8223607 8261976 8281376 8313204
|
||||||
* @summary test the behavior of --override-methods option
|
* @summary test the behavior of --override-methods option
|
||||||
* @library ../../lib
|
* @library ../../lib
|
||||||
* @modules jdk.javadoc/jdk.javadoc.internal.tool
|
* @modules jdk.javadoc/jdk.javadoc.internal.tool
|
||||||
@ -78,13 +78,6 @@ public class TestOverrideMethods extends JavadocTester {
|
|||||||
checkExit(Exit.OK);
|
checkExit(Exit.OK);
|
||||||
|
|
||||||
checkOrder("pkg5/Classes.C.html",
|
checkOrder("pkg5/Classes.C.html",
|
||||||
// Check properties
|
|
||||||
"""
|
|
||||||
Properties declared in class pkg5.<a href="Classes.P.html""",
|
|
||||||
"Classes.P",
|
|
||||||
"""
|
|
||||||
Classes.P.html#rateProperty">rate""",
|
|
||||||
|
|
||||||
// Check nested classes
|
// Check nested classes
|
||||||
"Nested classes/interfaces declared in class pkg5.",
|
"Nested classes/interfaces declared in class pkg5.",
|
||||||
"Classes.P",
|
"Classes.P",
|
||||||
@ -95,6 +88,13 @@ public class TestOverrideMethods extends JavadocTester {
|
|||||||
"type parameter in Classes.P.PN",
|
"type parameter in Classes.P.PN",
|
||||||
"V",
|
"V",
|
||||||
|
|
||||||
|
// Check properties
|
||||||
|
"""
|
||||||
|
Properties declared in class pkg5.<a href="Classes.P.html""",
|
||||||
|
"Classes.P",
|
||||||
|
"""
|
||||||
|
Classes.P.html#rateProperty">rate""",
|
||||||
|
|
||||||
// Check fields
|
// Check fields
|
||||||
"""
|
"""
|
||||||
Fields declared in class pkg5.<a href="Classes.P.html""",
|
Fields declared in class pkg5.<a href="Classes.P.html""",
|
||||||
@ -220,16 +220,16 @@ public class TestOverrideMethods extends JavadocTester {
|
|||||||
"""
|
"""
|
||||||
Interfaces.C.html#o()"><code>Interfaces.C.o()""",
|
Interfaces.C.html#o()"><code>Interfaces.C.o()""",
|
||||||
|
|
||||||
// Check properties
|
|
||||||
"""
|
|
||||||
Properties declared in interface pkg5.<a href="Interfaces.A.html" title="interface in pkg5">Interfaces.A</a>""",
|
|
||||||
|
|
||||||
// Check nested classes
|
// Check nested classes
|
||||||
"Nested classes/interfaces declared in interface pkg5.",
|
"Nested classes/interfaces declared in interface pkg5.",
|
||||||
"Interfaces.A",
|
"Interfaces.A",
|
||||||
"Interfaces.A.AA.html",
|
"Interfaces.A.AA.html",
|
||||||
"Interfaces.A.AA",
|
"Interfaces.A.AA",
|
||||||
|
|
||||||
|
// Check properties
|
||||||
|
"""
|
||||||
|
Properties declared in interface pkg5.<a href="Interfaces.A.html" title="interface in pkg5">Interfaces.A</a>""",
|
||||||
|
|
||||||
// Check Fields
|
// Check Fields
|
||||||
"""
|
"""
|
||||||
Fields declared in interface pkg5.<a href="Interfaces.A.html""",
|
Fields declared in interface pkg5.<a href="Interfaces.A.html""",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user