8263300: add HtmlId for the block containing a class's description.
Reviewed-by: jjg
This commit is contained in:
parent
d82464f851
commit
f69afba527
@ -176,7 +176,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWrite
|
||||
|
||||
@Override
|
||||
public Content getClassInfo(Content classInfoTree) {
|
||||
return getMemberTree(HtmlStyle.description, classInfoTree);
|
||||
return getMemberTree(HtmlIds.CLASS_DESCRIPTION, HtmlStyle.classDescription, classInfoTree);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -71,6 +71,7 @@ public class HtmlIds {
|
||||
static final HtmlId ANNOTATION_TYPE_ELEMENT_DETAIL = HtmlId.of("annotation-interface-element-detail");
|
||||
static final HtmlId ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY = HtmlId.of("annotation-interface-optional-element-summary");
|
||||
static final HtmlId ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY = HtmlId.of("annotation-interface-required-element-summary");
|
||||
static final HtmlId CLASS_DESCRIPTION = HtmlId.of("class-description");
|
||||
static final HtmlId CONSTRUCTOR_DETAIL = HtmlId.of("constructor-detail");
|
||||
static final HtmlId CONSTRUCTOR_SUMMARY = HtmlId.of("constructor-summary");
|
||||
static final HtmlId ENUM_CONSTANT_DETAIL = HtmlId.of("enum-constant-detail");
|
||||
|
@ -327,11 +327,12 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
|
||||
/**
|
||||
* Get the member tree
|
||||
*
|
||||
* @param id the id to be used for the content tree
|
||||
* @param style the style class to be added to the content tree
|
||||
* @param contentTree the tree used to generate the complete member tree
|
||||
* @return the member tree
|
||||
*/
|
||||
public Content getMemberTree(HtmlStyle style, Content contentTree) {
|
||||
return HtmlTree.SECTION(style, contentTree);
|
||||
public Content getMemberTree(HtmlId id, HtmlStyle style, Content contentTree) {
|
||||
return HtmlTree.SECTION(style, contentTree).setId(id);
|
||||
}
|
||||
}
|
||||
|
@ -476,11 +476,10 @@ public enum HtmlStyle {
|
||||
// generated from documentation comments.
|
||||
|
||||
/**
|
||||
* The class of the element used to present the documentation comment for a type or member
|
||||
* element.
|
||||
* The class of the element used to present the documentation comment for a type element.
|
||||
* The content of the block tags will be in a nested element with class {@link #notes}.
|
||||
*/
|
||||
description,
|
||||
classDescription,
|
||||
|
||||
/**
|
||||
* The class of the element used to present the documentation comment for a module element,
|
||||
|
@ -655,7 +655,7 @@ ul.ui-autocomplete li {
|
||||
.inherited-list {
|
||||
margin: 10px 0 10px 0;
|
||||
}
|
||||
section.description {
|
||||
section.class-description {
|
||||
line-height: 1.4;
|
||||
}
|
||||
.summary section[class$="-summary"], .details section[class$="-details"],
|
||||
|
@ -119,7 +119,7 @@ public class TestMemberInheritance extends JavadocTester {
|
||||
|
||||
checkOutput("pkg2/DocumentedNonGenericChild.html", true,
|
||||
"""
|
||||
<section class="description">
|
||||
<section class="class-description" id="class-description">
|
||||
<hr>
|
||||
<div class="type-signature"><span class="modifiers">public abstract class </span\
|
||||
><span class="element-name type-name-label">DocumentedNonGenericChild</span>
|
||||
|
@ -1359,7 +1359,7 @@ public class TestModules extends JavadocTester {
|
||||
""");
|
||||
checkOutput("moduleA/testpkgmdlA/TestClassInModuleA.html", true,
|
||||
"""
|
||||
<section class="description">
|
||||
<section class="class-description" id="class-description">
|
||||
<hr>
|
||||
<div class="type-signature"><span class="modifiers">public class </span><span cl\
|
||||
ass="element-name"><a href="../../src-html/moduleA/testpkgmdlA/TestClassInModule\
|
||||
|
Loading…
Reference in New Issue
Block a user