< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/EnumConstantWriterImpl.java

Print this page

        

*** 30,39 **** --- 30,40 ---- import javax.lang.model.element.TypeElement; import javax.lang.model.element.VariableElement; import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle; + import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree; import jdk.javadoc.internal.doclets.formats.html.markup.StringContent; import jdk.javadoc.internal.doclets.formats.html.markup.Table; import jdk.javadoc.internal.doclets.formats.html.markup.TableHeader; import jdk.javadoc.internal.doclets.toolkit.Content;
*** 90,102 **** Content memberDetailsTree) { memberDetailsTree.add(MarkerComments.START_OF_ENUM_CONSTANT_DETAILS); Content enumConstantsDetailsTree = new ContentBuilder(); Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING, contents.enumConstantDetailLabel); enumConstantsDetailsTree.add(links.createAnchor( SectionName.ENUM_CONSTANT_DETAIL)); - enumConstantsDetailsTree.add(heading); return enumConstantsDetailsTree; } /** * {@inheritDoc} --- 91,103 ---- Content memberDetailsTree) { memberDetailsTree.add(MarkerComments.START_OF_ENUM_CONSTANT_DETAILS); Content enumConstantsDetailsTree = new ContentBuilder(); Content heading = HtmlTree.HEADING(Headings.TypeDeclaration.DETAILS_HEADING, contents.enumConstantDetailLabel); + enumConstantsDetailsTree.add(heading); enumConstantsDetailsTree.add(links.createAnchor( SectionName.ENUM_CONSTANT_DETAIL)); return enumConstantsDetailsTree; } /** * {@inheritDoc}
*** 104,126 **** @Override public Content getEnumConstantsTreeHeader(VariableElement enumConstant, Content enumConstantsDetailsTree) { Content enumConstantsTree = new ContentBuilder(); Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING); ! heading.add(links.createAnchor(name(enumConstant), new StringContent(name(enumConstant)))); enumConstantsTree.add(heading); return HtmlTree.SECTION(HtmlStyle.detail, enumConstantsTree); } /** * {@inheritDoc} */ @Override public Content getSignature(VariableElement enumConstant) { ! return new MemberSignature(enumConstant) ! .addType(enumConstant.asType()) ! .toContent(); } /** * {@inheritDoc} */ --- 105,139 ---- @Override public Content getEnumConstantsTreeHeader(VariableElement enumConstant, Content enumConstantsDetailsTree) { Content enumConstantsTree = new ContentBuilder(); Content heading = new HtmlTree(Headings.TypeDeclaration.MEMBER_HEADING); ! heading.add(name(enumConstant)); enumConstantsTree.add(heading); + enumConstantsTree.add(links.createAnchor(name(enumConstant))); return HtmlTree.SECTION(HtmlStyle.detail, enumConstantsTree); } /** * {@inheritDoc} */ @Override public Content getSignature(VariableElement enumConstant) { ! Content pre = new HtmlTree(HtmlTag.PRE); ! writer.addAnnotationInfo(enumConstant, pre); ! addModifiers(enumConstant, pre); ! Content enumConstantLink = writer.getLink(new LinkInfoImpl( ! configuration, LinkInfoImpl.Kind.MEMBER, enumConstant.asType())); ! pre.add(enumConstantLink); ! pre.add(" "); ! if (configuration.linksource) { ! Content enumConstantName = new StringContent(name(enumConstant)); ! writer.addSrcLink(enumConstant, enumConstantName, pre); ! } else { ! addName(name(enumConstant), pre); ! } ! return pre; } /** * {@inheritDoc} */
*** 158,169 **** /** * {@inheritDoc} */ @Override ! public Content getEnumConstants(Content enumConstantsTree) { ! return getMemberTree(enumConstantsTree); } /** * {@inheritDoc} */ --- 171,183 ---- /** * {@inheritDoc} */ @Override ! public Content getEnumConstants(Content enumConstantsTree, ! boolean isLastContent) { ! return getMemberTree(enumConstantsTree, isLastContent); } /** * {@inheritDoc} */
< prev index next >