# HG changeset patch # User jjg # Date 1508977080 25200 # Node ID d3e20c816f608593db1cedb4ee819898d0d25158 # Parent afa66f3c34c1f730299bb4329023d5b09640232a 8189843: Missing \"id\" attributes in table rows Reviewed-by: bpatel, ksrini diff -r afa66f3c34c1 -r d3e20c816f60 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java Wed Oct 25 17:16:18 2017 -0700 +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java Wed Oct 25 17:18:00 2017 -0700 @@ -36,7 +36,6 @@ import javax.lang.model.type.TypeMirror; import com.sun.source.doctree.DocTree; -import jdk.javadoc.internal.doclets.formats.html.TableHeader; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlAttr; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants; import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle; @@ -44,6 +43,7 @@ import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree; import jdk.javadoc.internal.doclets.formats.html.markup.StringContent; import jdk.javadoc.internal.doclets.toolkit.Content; +import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter; import jdk.javadoc.internal.doclets.toolkit.Resources; import jdk.javadoc.internal.doclets.toolkit.taglets.DeprecatedTaglet; import jdk.javadoc.internal.doclets.toolkit.util.MethodTypes; @@ -65,7 +65,7 @@ * @author Jamie Ho (Re-write) * @author Bhavesh Patel (Modified) */ -public abstract class AbstractMemberWriter { +public abstract class AbstractMemberWriter implements MemberSummaryWriter { protected final HtmlConfiguration configuration; protected final Utils utils; @@ -519,7 +519,8 @@ * @param counter the counter for determining id and style for the table row */ public void addMemberSummary(TypeElement tElement, Element member, - List firstSentenceTags, List tableContents, int counter) { + List firstSentenceTags, List tableContents, int counter, + VisibleMemberMap.Kind vmmKind) { HtmlTree tdSummaryType = new HtmlTree(HtmlTag.TD); tdSummaryType.addStyle(HtmlStyle.colFirst); writer.addSummaryType(this, member, tdSummaryType); @@ -532,7 +533,8 @@ tdDesc.addStyle(HtmlStyle.colLast); writer.addSummaryLinkComment(this, member, firstSentenceTags, tdDesc); tr.addContent(tdDesc); - if (utils.isMethod(member) && !utils.isAnnotationType(member) && !utils.isProperty(name(member))) { + if (utils.isMethod(member) && !utils.isAnnotationType(member) + && vmmKind != VisibleMemberMap.Kind.PROPERTIES) { int methodType = utils.isStatic(member) ? MethodTypes.STATIC.tableTabs().value() : MethodTypes.INSTANCE.tableTabs().value(); if (utils.isInterface(member.getEnclosingElement())) { diff -r afa66f3c34c1 -r d3e20c816f60 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/MemberSummaryWriter.java --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/MemberSummaryWriter.java Wed Oct 25 17:16:18 2017 -0700 +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/MemberSummaryWriter.java Wed Oct 25 17:18:00 2017 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,6 +32,7 @@ import javax.lang.model.element.TypeElement; import com.sun.source.doctree.DocTree; +import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap; /** * The interface for writing member summary output. @@ -77,7 +78,8 @@ * @param counter the counter for determining id and style for the table row */ public void addMemberSummary(TypeElement typeElement, Element member, - List firstSentenceTags, List tableContents, int counter); + List firstSentenceTags, List tableContents, int counter, + VisibleMemberMap.Kind vmmKind); /** * Get the inherited member summary header for the given class. diff -r afa66f3c34c1 -r d3e20c816f60 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MemberSummaryBuilder.java --- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MemberSummaryBuilder.java Wed Oct 25 17:16:18 2017 -0700 +++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MemberSummaryBuilder.java Wed Oct 25 17:18:00 2017 -0700 @@ -356,7 +356,7 @@ } } writer.addMemberSummary(typeElement, member, firstSentenceTags, - tableContents, counter); + tableContents, counter, visibleMemberMap.kind); counter++; } summaryTreeList.add(writer.getSummaryTableTree(typeElement, tableContents)); diff -r afa66f3c34c1 -r d3e20c816f60 test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java --- a/test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java Wed Oct 25 17:16:18 2017 -0700 +++ b/test/langtools/jdk/javadoc/doclet/testProperty/TestProperty.java Wed Oct 25 17:18:00 2017 -0700 @@ -23,7 +23,7 @@ /* * @test - * @bug 8176231 + * @bug 8176231 8189843 * @summary Test JavaFX property. * @library ../lib/ * @modules jdk.javadoc/jdk.javadoc.internal.tool @@ -71,7 +71,23 @@ + "
getBad(), \n" + "" + "setBad(MyObj[])
\n" - + "" + + "", + + // id should not be used in the property table + "\n" + + "ObjectProperty<MyObj[]>\n" + + "" + + "bad", + + // id should be used in the method table + "\n" + + "ObjectProperty<MyObj[]>\n" + + "" + + "badProperty()" ); checkOutput("pkg/MyClassT.html", true,