Sun, 24 Feb 2013 11:36:58 -0800
7112427: The doclet needs to be able to generate JavaFX documentation.
Reviewed-by: jjg
Contributed-by: jan.valenta@oracle.com
1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java Fri Feb 22 18:19:51 2013 +0000 1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java Sun Feb 24 11:36:58 2013 -0800 1.3 @@ -60,7 +60,7 @@ 1.4 ClassDoc classDoc) { 1.5 super(writer, classDoc); 1.6 VisibleMemberMap visibleMemberMap = new VisibleMemberMap(classDoc, 1.7 - VisibleMemberMap.CONSTRUCTORS, configuration.nodeprecated); 1.8 + VisibleMemberMap.CONSTRUCTORS, configuration); 1.9 List<ProgramElementDoc> constructors = new ArrayList<ProgramElementDoc>(visibleMemberMap.getMembersFor(classDoc)); 1.10 for (int i = 0; i < constructors.size(); i++) { 1.11 if ((constructors.get(i)).isProtected() ||
2.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Fri Feb 22 18:19:51 2013 +0000 2.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Sun Feb 24 11:36:58 2013 -0800 2.3 @@ -543,7 +543,8 @@ 2.4 } 2.5 HtmlTree navList = new HtmlTree(HtmlTag.UL); 2.6 navList.addStyle(HtmlStyle.navList); 2.7 - navList.addAttr(HtmlAttr.TITLE, "Navigation"); 2.8 + navList.addAttr(HtmlAttr.TITLE, 2.9 + configuration.getText("doclet.Navigation")); 2.10 if (configuration.createoverview) { 2.11 navList.addContent(getNavLinkContents()); 2.12 } 2.13 @@ -1299,13 +1300,31 @@ 2.14 */ 2.15 public String getDocLink(int context, ClassDoc classDoc, MemberDoc doc, 2.16 String label, boolean strong) { 2.17 + return getDocLink(context, classDoc, doc, label, strong, false); 2.18 + } 2.19 + 2.20 + /** 2.21 + * Return the link for the given member. 2.22 + * 2.23 + * @param context the id of the context where the link will be printed. 2.24 + * @param classDoc the classDoc that we should link to. This is not 2.25 + * necessarily equal to doc.containingClass(). We may be 2.26 + * inheriting comments. 2.27 + * @param doc the member being linked to. 2.28 + * @param label the label for the link. 2.29 + * @param strong true if the link should be strong. 2.30 + * @param isProperty true if the doc parameter is a JavaFX property. 2.31 + * @return the link for the given member. 2.32 + */ 2.33 + public String getDocLink(int context, ClassDoc classDoc, MemberDoc doc, 2.34 + String label, boolean strong, boolean isProperty) { 2.35 if (! (doc.isIncluded() || 2.36 Util.isLinkable(classDoc, configuration))) { 2.37 return label; 2.38 } else if (doc instanceof ExecutableMemberDoc) { 2.39 ExecutableMemberDoc emd = (ExecutableMemberDoc)doc; 2.40 return getLink(new LinkInfoImpl(configuration, context, classDoc, 2.41 - getAnchor(emd), label, strong)); 2.42 + getAnchor(emd, isProperty), label, strong)); 2.43 } else if (doc instanceof MemberDoc) { 2.44 return getLink(new LinkInfoImpl(configuration, context, classDoc, 2.45 doc.name(), label, strong)); 2.46 @@ -1343,6 +1362,13 @@ 2.47 } 2.48 2.49 public String getAnchor(ExecutableMemberDoc emd) { 2.50 + return getAnchor(emd, false); 2.51 + } 2.52 + 2.53 + public String getAnchor(ExecutableMemberDoc emd, boolean isProperty) { 2.54 + if (isProperty) { 2.55 + return emd.name(); 2.56 + } 2.57 StringBuilder signature = new StringBuilder(emd.signature()); 2.58 StringBuilder signatureParsed = new StringBuilder(); 2.59 int counter = 0;
3.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/LinkInfoImpl.java Fri Feb 22 18:19:51 2013 +0000 3.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/LinkInfoImpl.java Sun Feb 24 11:36:58 2013 -0800 3.3 @@ -198,6 +198,11 @@ 3.4 */ 3.5 public static final int CONTEXT_CLASS_USE_HEADER = 33; 3.6 3.7 + /** 3.8 + * The header for property documentation copied from parent. 3.9 + */ 3.10 + public static final int CONTEXT_PROPERTY_DOC_COPY = 34; 3.11 + 3.12 public final ConfigurationImpl configuration; 3.13 3.14 /** 3.15 @@ -422,6 +427,7 @@ 3.16 case CONTEXT_SUBCLASSES: 3.17 case CONTEXT_METHOD_DOC_COPY: 3.18 case CONTEXT_FIELD_DOC_COPY: 3.19 + case CONTEXT_PROPERTY_DOC_COPY: 3.20 case CONTEXT_CLASS_USE_HEADER: 3.21 includeTypeInClassLinkLabel = false; 3.22 break;
4.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java Fri Feb 22 18:19:51 2013 +0000 4.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java Sun Feb 24 11:36:58 2013 -0800 4.3 @@ -1,5 +1,5 @@ 4.4 /* 4.5 - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 4.6 + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 4.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4.8 * 4.9 * This code is free software; you can redistribute it and/or modify it 4.10 @@ -161,6 +161,7 @@ 4.11 */ 4.12 protected void addClassKindListing(ClassDoc[] arr, Content labelContent, 4.13 Content contentTree) { 4.14 + arr = Util.filterOutPrivateClasses(arr, configuration.javafx); 4.15 if(arr.length > 0) { 4.16 Arrays.sort(arr); 4.17 boolean printedHeader = false;
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java Sun Feb 24 11:36:58 2013 -0800 5.3 @@ -0,0 +1,322 @@ 5.4 +/* 5.5 + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. 5.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5.7 + * 5.8 + * This code is free software; you can redistribute it and/or modify it 5.9 + * under the terms of the GNU General Public License version 2 only, as 5.10 + * published by the Free Software Foundation. Oracle designates this 5.11 + * particular file as subject to the "Classpath" exception as provided 5.12 + * by Oracle in the LICENSE file that accompanied this code. 5.13 + * 5.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 5.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 5.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 5.17 + * version 2 for more details (a copy is included in the LICENSE file that 5.18 + * accompanied this code). 5.19 + * 5.20 + * You should have received a copy of the GNU General Public License version 5.21 + * 2 along with this work; if not, write to the Free Software Foundation, 5.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 5.23 + * 5.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 5.25 + * or visit www.oracle.com if you need additional information or have any 5.26 + * questions. 5.27 + */ 5.28 + 5.29 +package com.sun.tools.doclets.formats.html; 5.30 + 5.31 +import java.io.*; 5.32 + 5.33 +import com.sun.javadoc.*; 5.34 +import com.sun.tools.doclets.formats.html.markup.*; 5.35 +import com.sun.tools.doclets.internal.toolkit.*; 5.36 +import com.sun.tools.doclets.internal.toolkit.util.*; 5.37 + 5.38 +/** 5.39 + * Writes property documentation in HTML format. 5.40 + * 5.41 + * <p><b>This is NOT part of any supported API. 5.42 + * If you write code that depends on this, you do so at your own risk. 5.43 + * This code and its internal interfaces are subject to change or 5.44 + * deletion without notice.</b> 5.45 + * 5.46 + * @author Robert Field 5.47 + * @author Atul M Dambalkar 5.48 + * @author Jamie Ho (rewrite) 5.49 + * @author Bhavesh Patel (Modified) 5.50 + */ 5.51 +public class PropertyWriterImpl extends AbstractMemberWriter 5.52 + implements PropertyWriter, MemberSummaryWriter { 5.53 + 5.54 + public PropertyWriterImpl(SubWriterHolderWriter writer, ClassDoc classdoc) { 5.55 + super(writer, classdoc); 5.56 + } 5.57 + 5.58 + /** 5.59 + * {@inheritDoc} 5.60 + */ 5.61 + public Content getMemberSummaryHeader(ClassDoc classDoc, 5.62 + Content memberSummaryTree) { 5.63 + memberSummaryTree.addContent(HtmlConstants.START_OF_PROPERTY_SUMMARY); 5.64 + Content memberTree = writer.getMemberTreeHeader(); 5.65 + writer.addSummaryHeader(this, classDoc, memberTree); 5.66 + return memberTree; 5.67 + } 5.68 + 5.69 + /** 5.70 + * {@inheritDoc} 5.71 + */ 5.72 + public Content getPropertyDetailsTreeHeader(ClassDoc classDoc, 5.73 + Content memberDetailsTree) { 5.74 + memberDetailsTree.addContent(HtmlConstants.START_OF_PROPERTY_DETAILS); 5.75 + Content propertyDetailsTree = writer.getMemberTreeHeader(); 5.76 + propertyDetailsTree.addContent(writer.getMarkerAnchor("property_detail")); 5.77 + Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, 5.78 + writer.propertyDetailsLabel); 5.79 + propertyDetailsTree.addContent(heading); 5.80 + return propertyDetailsTree; 5.81 + } 5.82 + 5.83 + /** 5.84 + * {@inheritDoc} 5.85 + */ 5.86 + public Content getPropertyDocTreeHeader(MethodDoc property, 5.87 + Content propertyDetailsTree) { 5.88 + propertyDetailsTree.addContent( 5.89 + writer.getMarkerAnchor(property.name())); 5.90 + Content propertyDocTree = writer.getMemberTreeHeader(); 5.91 + Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING); 5.92 + heading.addContent(property.name().substring(0, property.name().lastIndexOf("Property"))); 5.93 + propertyDocTree.addContent(heading); 5.94 + return propertyDocTree; 5.95 + } 5.96 + 5.97 + /** 5.98 + * {@inheritDoc} 5.99 + */ 5.100 + public Content getSignature(MethodDoc property) { 5.101 + Content pre = new HtmlTree(HtmlTag.PRE); 5.102 + writer.addAnnotationInfo(property, pre); 5.103 + addModifiers(property, pre); 5.104 + Content propertylink = new RawHtml(writer.getLink(new LinkInfoImpl( 5.105 + configuration, LinkInfoImpl.CONTEXT_MEMBER, 5.106 + property.returnType()))); 5.107 + pre.addContent(propertylink); 5.108 + pre.addContent(" "); 5.109 + if (configuration.linksource) { 5.110 + Content propertyName = new StringContent(property.name()); 5.111 + writer.addSrcLink(property, propertyName, pre); 5.112 + } else { 5.113 + addName(property.name(), pre); 5.114 + } 5.115 + return pre; 5.116 + } 5.117 + 5.118 + /** 5.119 + * {@inheritDoc} 5.120 + */ 5.121 + public void addDeprecated(MethodDoc property, Content propertyDocTree) { 5.122 + } 5.123 + 5.124 + /** 5.125 + * {@inheritDoc} 5.126 + */ 5.127 + public void addComments(MethodDoc property, Content propertyDocTree) { 5.128 + ClassDoc holder = property.containingClass(); 5.129 + if (property.inlineTags().length > 0) { 5.130 + if (holder.equals(classdoc) || 5.131 + (! (holder.isPublic() || Util.isLinkable(holder, configuration)))) { 5.132 + writer.addInlineComment(property, propertyDocTree); 5.133 + } else { 5.134 + Content link = new RawHtml( 5.135 + writer.getDocLink(LinkInfoImpl.CONTEXT_PROPERTY_DOC_COPY, 5.136 + holder, property, 5.137 + holder.isIncluded() ? 5.138 + holder.typeName() : holder.qualifiedTypeName(), 5.139 + false)); 5.140 + Content codeLink = HtmlTree.CODE(link); 5.141 + Content strong = HtmlTree.STRONG(holder.isClass()? 5.142 + writer.descfrmClassLabel : writer.descfrmInterfaceLabel); 5.143 + strong.addContent(writer.getSpace()); 5.144 + strong.addContent(codeLink); 5.145 + propertyDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, strong)); 5.146 + writer.addInlineComment(property, propertyDocTree); 5.147 + } 5.148 + } 5.149 + } 5.150 + 5.151 + /** 5.152 + * {@inheritDoc} 5.153 + */ 5.154 + public void addTags(MethodDoc property, Content propertyDocTree) { 5.155 + writer.addTagsInfo(property, propertyDocTree); 5.156 + } 5.157 + 5.158 + /** 5.159 + * {@inheritDoc} 5.160 + */ 5.161 + public Content getPropertyDetails(Content propertyDetailsTree) { 5.162 + return getMemberTree(propertyDetailsTree); 5.163 + } 5.164 + 5.165 + /** 5.166 + * {@inheritDoc} 5.167 + */ 5.168 + public Content getPropertyDoc(Content propertyDocTree, 5.169 + boolean isLastContent) { 5.170 + return getMemberTree(propertyDocTree, isLastContent); 5.171 + } 5.172 + 5.173 + /** 5.174 + * Close the writer. 5.175 + */ 5.176 + public void close() throws IOException { 5.177 + writer.close(); 5.178 + } 5.179 + 5.180 + public int getMemberKind() { 5.181 + return VisibleMemberMap.PROPERTIES; 5.182 + } 5.183 + 5.184 + /** 5.185 + * {@inheritDoc} 5.186 + */ 5.187 + public void addSummaryLabel(Content memberTree) { 5.188 + Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, 5.189 + writer.getResource("doclet.Property_Summary")); 5.190 + memberTree.addContent(label); 5.191 + } 5.192 + 5.193 + /** 5.194 + * {@inheritDoc} 5.195 + */ 5.196 + public String getTableSummary() { 5.197 + return configuration.getText("doclet.Member_Table_Summary", 5.198 + configuration.getText("doclet.Property_Summary"), 5.199 + configuration.getText("doclet.properties")); 5.200 + } 5.201 + 5.202 + /** 5.203 + * {@inheritDoc} 5.204 + */ 5.205 + public String getCaption() { 5.206 + return configuration.getText("doclet.Properties"); 5.207 + } 5.208 + 5.209 + /** 5.210 + * {@inheritDoc} 5.211 + */ 5.212 + public String[] getSummaryTableHeader(ProgramElementDoc member) { 5.213 + String[] header = new String[] { 5.214 + configuration.getText("doclet.Type"), 5.215 + configuration.getText("doclet.0_and_1", 5.216 + configuration.getText("doclet.Property"), 5.217 + configuration.getText("doclet.Description")) 5.218 + }; 5.219 + return header; 5.220 + } 5.221 + 5.222 + /** 5.223 + * {@inheritDoc} 5.224 + */ 5.225 + public void addSummaryAnchor(ClassDoc cd, Content memberTree) { 5.226 + memberTree.addContent(writer.getMarkerAnchor("property_summary")); 5.227 + } 5.228 + 5.229 + /** 5.230 + * {@inheritDoc} 5.231 + */ 5.232 + public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) { 5.233 + inheritedTree.addContent(writer.getMarkerAnchor( 5.234 + "properties_inherited_from_class_" + configuration.getClassName(cd))); 5.235 + } 5.236 + 5.237 + /** 5.238 + * {@inheritDoc} 5.239 + */ 5.240 + public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) { 5.241 + Content classLink = new RawHtml(writer.getPreQualifiedClassLink( 5.242 + LinkInfoImpl.CONTEXT_MEMBER, cd, false)); 5.243 + Content label = new StringContent(cd.isClass() ? 5.244 + configuration.getText("doclet.Properties_Inherited_From_Class") : 5.245 + configuration.getText("doclet.Properties_Inherited_From_Interface")); 5.246 + Content labelHeading = HtmlTree.HEADING(HtmlConstants.INHERITED_SUMMARY_HEADING, 5.247 + label); 5.248 + labelHeading.addContent(writer.getSpace()); 5.249 + labelHeading.addContent(classLink); 5.250 + inheritedTree.addContent(labelHeading); 5.251 + } 5.252 + 5.253 + /** 5.254 + * {@inheritDoc} 5.255 + */ 5.256 + protected void addSummaryLink(int context, ClassDoc cd, ProgramElementDoc member, 5.257 + Content tdSummary) { 5.258 + Content strong = HtmlTree.STRONG(new RawHtml( 5.259 + writer.getDocLink(context, 5.260 + cd, 5.261 + (MemberDoc) member, 5.262 + member.name().substring(0, member.name().lastIndexOf("Property")), 5.263 + false, 5.264 + true))); 5.265 + 5.266 + Content code = HtmlTree.CODE(strong); 5.267 + tdSummary.addContent(code); 5.268 + } 5.269 + 5.270 + /** 5.271 + * {@inheritDoc} 5.272 + */ 5.273 + protected void addInheritedSummaryLink(ClassDoc cd, 5.274 + ProgramElementDoc member, Content linksTree) { 5.275 + linksTree.addContent(new RawHtml( 5.276 + writer.getDocLink(LinkInfoImpl.CONTEXT_MEMBER, cd, (MemberDoc)member, 5.277 + ((member.name().lastIndexOf("Property") != -1) && configuration.javafx) 5.278 + ? member.name().substring(0, member.name().length() - "Property".length()) 5.279 + : member.name(), 5.280 + false, true))); 5.281 + } 5.282 + 5.283 + /** 5.284 + * {@inheritDoc} 5.285 + */ 5.286 + protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) { 5.287 + MethodDoc property = (MethodDoc)member; 5.288 + addModifierAndType(property, property.returnType(), tdSummaryType); 5.289 + } 5.290 + 5.291 + /** 5.292 + * {@inheritDoc} 5.293 + */ 5.294 + protected Content getDeprecatedLink(ProgramElementDoc member) { 5.295 + return writer.getDocLink(LinkInfoImpl.CONTEXT_MEMBER, 5.296 + (MemberDoc) member, ((MethodDoc)member).qualifiedName()); 5.297 + } 5.298 + 5.299 + /** 5.300 + * {@inheritDoc} 5.301 + */ 5.302 + protected Content getNavSummaryLink(ClassDoc cd, boolean link) { 5.303 + if (link) { 5.304 + return writer.getHyperLink((cd == null)? 5.305 + "property_summary": 5.306 + "properties_inherited_from_class_" + 5.307 + configuration.getClassName(cd), 5.308 + writer.getResource("doclet.navProperty")); 5.309 + } else { 5.310 + return writer.getResource("doclet.navProperty"); 5.311 + } 5.312 + } 5.313 + 5.314 + /** 5.315 + * {@inheritDoc} 5.316 + */ 5.317 + protected void addNavDetailLink(boolean link, Content liNav) { 5.318 + if (link) { 5.319 + liNav.addContent(writer.getHyperLink("property_detail", 5.320 + writer.getResource("doclet.navProperty"))); 5.321 + } else { 5.322 + liNav.addContent(writer.getResource("doclet.navProperty")); 5.323 + } 5.324 + } 5.325 +}
6.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/WriterFactoryImpl.java Fri Feb 22 18:19:51 2013 +0000 6.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/WriterFactoryImpl.java Sun Feb 24 11:36:58 2013 -0800 6.3 @@ -146,6 +146,15 @@ 6.4 /** 6.5 * {@inheritDoc} 6.6 */ 6.7 + public PropertyWriterImpl getPropertyWriter(ClassWriter classWriter) 6.8 + throws Exception { 6.9 + return new PropertyWriterImpl((SubWriterHolderWriter) classWriter, 6.10 + classWriter.getClassDoc()); 6.11 + } 6.12 + 6.13 + /** 6.14 + * {@inheritDoc} 6.15 + */ 6.16 public MethodWriterImpl getMethodWriter(ClassWriter classWriter) 6.17 throws Exception { 6.18 return new MethodWriterImpl((SubWriterHolderWriter) classWriter, 6.19 @@ -174,6 +183,8 @@ 6.20 return getEnumConstantWriter(classWriter); 6.21 case VisibleMemberMap.FIELDS: 6.22 return getFieldWriter(classWriter); 6.23 + case VisibleMemberMap.PROPERTIES: 6.24 + return getPropertyWriter(classWriter); 6.25 case VisibleMemberMap.INNERCLASSES: 6.26 return new NestedClassWriterImpl((SubWriterHolderWriter) 6.27 classWriter, classWriter.getClassDoc());
7.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlConstants.java Fri Feb 22 18:19:51 2013 +0000 7.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlConstants.java Sun Feb 24 11:36:58 2013 -0800 7.3 @@ -112,6 +112,12 @@ 7.4 new Comment("=========== FIELD SUMMARY ==========="); 7.5 7.6 /** 7.7 + * Marker to identify start of properties summary. 7.8 + */ 7.9 + public static final Content START_OF_PROPERTY_SUMMARY = 7.10 + new Comment("=========== PROPERTY SUMMARY ==========="); 7.11 + 7.12 + /** 7.13 * Marker to identify start of method summary. 7.14 */ 7.15 public static final Content START_OF_METHOD_SUMMARY = 7.16 @@ -136,6 +142,12 @@ 7.17 new Comment("============ FIELD DETAIL ==========="); 7.18 7.19 /** 7.20 + * Marker to identify start of property details. 7.21 + */ 7.22 + public static final Content START_OF_PROPERTY_DETAILS = 7.23 + new Comment("============ PROPERTY DETAIL ==========="); 7.24 + 7.25 + /** 7.26 * Marker to identify start of constructor details. 7.27 */ 7.28 public static final Content START_OF_CONSTRUCTOR_DETAILS =
8.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Fri Feb 22 18:19:51 2013 +0000 8.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Sun Feb 24 11:36:58 2013 -0800 8.3 @@ -148,6 +148,8 @@ 8.4 8.5 public final Content fieldDetailsLabel; 8.6 8.7 + public final Content propertyDetailsLabel; 8.8 + 8.9 public final Content constructorDetailsLabel; 8.10 8.11 public final Content enumConstantsDetailsLabel; 8.12 @@ -226,6 +228,7 @@ 8.13 methodDetailsLabel = getResource("doclet.Method_Detail"); 8.14 annotationTypeDetailsLabel = getResource("doclet.Annotation_Type_Member_Detail"); 8.15 fieldDetailsLabel = getResource("doclet.Field_Detail"); 8.16 + propertyDetailsLabel = getResource("doclet.Property_Detail"); 8.17 constructorDetailsLabel = getResource("doclet.Constructor_Detail"); 8.18 enumConstantsDetailsLabel = getResource("doclet.Enum_Constant_Detail"); 8.19 specifiedByLabel = getResource("doclet.Specified_By");
9.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties Fri Feb 22 18:19:51 2013 +0000 9.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties Sun Feb 24 11:36:58 2013 -0800 9.3 @@ -36,6 +36,7 @@ 9.4 doclet.navAnnotationTypeRequiredMember=Required 9.5 doclet.navAnnotationTypeMember=Element 9.6 doclet.navField=Field 9.7 +doclet.navProperty=Property 9.8 doclet.navEnum=Enum Constants 9.9 doclet.navConstructor=Constr 9.10 doclet.navMethod=Method 9.11 @@ -44,6 +45,7 @@ 9.12 doclet.Window_Split_Index={0}-Index 9.13 doclet.Help=Help 9.14 doclet.Skip_navigation_links=Skip navigation links 9.15 +doclet.Navigation=Navigation 9.16 doclet.New_Page=NewPage 9.17 doclet.navDeprecated=Deprecated 9.18 doclet.Window_Deprecated_List=Deprecated List 9.19 @@ -95,7 +97,7 @@ 9.20 doclet.Subinterfaces=All Known Subinterfaces: 9.21 doclet.Implementing_Classes=All Known Implementing Classes: 9.22 doclet.Functional_Interface=Functional Interface: 9.23 -doclet.Functional_Interface_Message=This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference. 9.24 +doclet.Functional_Interface_Message=This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference. 9.25 doclet.also=also 9.26 doclet.Frames=Frames 9.27 doclet.No_Frames=No Frames
10.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java Fri Feb 22 18:19:51 2013 +0000 10.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java Sun Feb 24 11:36:58 2013 -0800 10.3 @@ -176,6 +176,12 @@ 10.4 public boolean showauthor = false; 10.5 10.6 /** 10.7 + * Generate documentation for JavaFX getters and setters automatically 10.8 + * by copying it from the appropriate property definition. 10.9 + */ 10.10 + public boolean javafx = false; 10.11 + 10.12 + /** 10.13 * Generate version specific information for the all the classes 10.14 * if @version tag is used in the doc comment and if -version option is 10.15 * used. <code>showversion</code> is set to true if -version option is 10.16 @@ -317,6 +323,7 @@ 10.17 option = option.toLowerCase(); 10.18 if (option.equals("-author") || 10.19 option.equals("-docfilessubdirs") || 10.20 + option.equals("-javafx") || 10.21 option.equals("-keywords") || 10.22 option.equals("-linksource") || 10.23 option.equals("-nocomment") || 10.24 @@ -422,6 +429,8 @@ 10.25 encoding = os[1]; 10.26 } else if (opt.equals("-author")) { 10.27 showauthor = true; 10.28 + } else if (opt.equals("-javafx")) { 10.29 + javafx = true; 10.30 } else if (opt.equals("-nosince")) { 10.31 nosince = true; 10.32 } else if (opt.equals("-version")) { 10.33 @@ -517,7 +526,7 @@ 10.34 */ 10.35 private void initTagletManager(Set<String[]> customTagStrs) { 10.36 tagletManager = tagletManager == null ? 10.37 - new TagletManager(nosince, showversion, showauthor, message) : 10.38 + new TagletManager(nosince, showversion, showauthor, javafx, message) : 10.39 tagletManager; 10.40 String[] args; 10.41 for (Iterator<String[]> it = customTagStrs.iterator(); it.hasNext(); ) {
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 11.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/PropertyWriter.java Sun Feb 24 11:36:58 2013 -0800 11.3 @@ -0,0 +1,119 @@ 11.4 +/* 11.5 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 11.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 11.7 + * 11.8 + * This code is free software; you can redistribute it and/or modify it 11.9 + * under the terms of the GNU General Public License version 2 only, as 11.10 + * published by the Free Software Foundation. Oracle designates this 11.11 + * particular file as subject to the "Classpath" exception as provided 11.12 + * by Oracle in the LICENSE file that accompanied this code. 11.13 + * 11.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 11.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 11.17 + * version 2 for more details (a copy is included in the LICENSE file that 11.18 + * accompanied this code). 11.19 + * 11.20 + * You should have received a copy of the GNU General Public License version 11.21 + * 2 along with this work; if not, write to the Free Software Foundation, 11.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 11.23 + * 11.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 11.25 + * or visit www.oracle.com if you need additional information or have any 11.26 + * questions. 11.27 + */ 11.28 + 11.29 +package com.sun.tools.doclets.internal.toolkit; 11.30 + 11.31 +import java.io.*; 11.32 +import com.sun.javadoc.*; 11.33 + 11.34 +/** 11.35 + * The interface for writing property output. 11.36 + * 11.37 + * <p><b>This is NOT part of any supported API. 11.38 + * If you write code that depends on this, you do so at your own risk. 11.39 + * This code and its internal interfaces are subject to change or 11.40 + * deletion without notice.</b> 11.41 + * 11.42 + * @author Jamie Ho 11.43 + * @author Bhavesh Patel (Modified) 11.44 + * @since 1.7 11.45 + */ 11.46 + 11.47 +public interface PropertyWriter { 11.48 + 11.49 + /** 11.50 + * Get the property details tree header. 11.51 + * 11.52 + * @param classDoc the class being documented 11.53 + * @param memberDetailsTree the content tree representing member details 11.54 + * @return content tree for the property details header 11.55 + */ 11.56 + public Content getPropertyDetailsTreeHeader(ClassDoc classDoc, 11.57 + Content memberDetailsTree); 11.58 + 11.59 + /** 11.60 + * Get the property documentation tree header. 11.61 + * 11.62 + * @param property the property being documented 11.63 + * @param propertyDetailsTree the content tree representing property details 11.64 + * @return content tree for the property documentation header 11.65 + */ 11.66 + public Content getPropertyDocTreeHeader(MethodDoc property, 11.67 + Content propertyDetailsTree); 11.68 + 11.69 + /** 11.70 + * Get the signature for the given property. 11.71 + * 11.72 + * @param property the property being documented 11.73 + * @return content tree for the property signature 11.74 + */ 11.75 + public Content getSignature(MethodDoc property); 11.76 + 11.77 + /** 11.78 + * Add the deprecated output for the given property. 11.79 + * 11.80 + * @param property the property being documented 11.81 + * @param propertyDocTree content tree to which the deprecated information will be added 11.82 + */ 11.83 + public void addDeprecated(MethodDoc property, Content propertyDocTree); 11.84 + 11.85 + /** 11.86 + * Add the comments for the given property. 11.87 + * 11.88 + * @param property the property being documented 11.89 + * @param propertyDocTree the content tree to which the comments will be added 11.90 + */ 11.91 + public void addComments(MethodDoc property, Content propertyDocTree); 11.92 + 11.93 + /** 11.94 + * Add the tags for the given property. 11.95 + * 11.96 + * @param property the property being documented 11.97 + * @param propertyDocTree the content tree to which the tags will be added 11.98 + */ 11.99 + public void addTags(MethodDoc property, Content propertyDocTree); 11.100 + 11.101 + /** 11.102 + * Get the property details tree. 11.103 + * 11.104 + * @param memberDetailsTree the content tree representing member details 11.105 + * @return content tree for the property details 11.106 + */ 11.107 + public Content getPropertyDetails(Content memberDetailsTree); 11.108 + 11.109 + /** 11.110 + * Get the property documentation. 11.111 + * 11.112 + * @param propertyDocTree the content tree representing property documentation 11.113 + * @param isLastContent true if the content to be added is the last content 11.114 + * @return content tree for the property documentation 11.115 + */ 11.116 + public Content getPropertyDoc(Content propertyDocTree, boolean isLastContent); 11.117 + 11.118 + /** 11.119 + * Close the writer. 11.120 + */ 11.121 + public void close() throws IOException; 11.122 +}
12.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/WriterFactory.java Fri Feb 22 18:19:51 2013 +0000 12.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/WriterFactory.java Sun Feb 24 11:36:58 2013 -0800 12.3 @@ -175,6 +175,16 @@ 12.4 throws Exception; 12.5 12.6 /** 12.7 + * Return the property writer for a given class. 12.8 + * 12.9 + * @param classWriter the writer for the class being documented. 12.10 + * @return the property writer for the give class. Return null if this 12.11 + * writer is not supported by the doclet. 12.12 + */ 12.13 + public abstract PropertyWriter getPropertyWriter(ClassWriter classWriter) 12.14 + throws Exception; 12.15 + 12.16 + /** 12.17 * Return the constructor writer for a given class. 12.18 * 12.19 * @param classWriter the writer for the class being documented.
13.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java Fri Feb 22 18:19:51 2013 +0000 13.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java Sun Feb 24 11:36:58 2013 -0800 13.3 @@ -1,5 +1,5 @@ 13.4 /* 13.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 13.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 13.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 13.8 * 13.9 * This code is free software; you can redistribute it and/or modify it 13.10 @@ -86,7 +86,7 @@ 13.11 this.classDoc = classDoc; 13.12 this.writer = writer; 13.13 this.visibleMemberMap = new VisibleMemberMap(classDoc, memberType, 13.14 - configuration.nodeprecated); 13.15 + configuration); 13.16 this.members = new ArrayList<ProgramElementDoc>( 13.17 this.visibleMemberMap.getMembersFor(classDoc)); 13.18 if (configuration.getMemberComparator() != null) {
14.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/BuilderFactory.java Fri Feb 22 18:19:51 2013 +0000 14.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/BuilderFactory.java Sun Feb 24 11:36:58 2013 -0800 14.3 @@ -228,6 +228,19 @@ 14.4 } 14.5 14.6 /** 14.7 + * Return an instance of the property builder for the given class. 14.8 + * 14.9 + * @return an instance of the field builder for the given class. 14.10 + */ 14.11 + public AbstractBuilder getPropertyBuilder(ClassWriter classWriter) throws Exception { 14.12 + final PropertyWriter propertyWriter = 14.13 + writerFactory.getPropertyWriter(classWriter); 14.14 + return PropertyBuilder.getInstance(context, 14.15 + classWriter.getClassDoc(), 14.16 + propertyWriter); 14.17 + } 14.18 + 14.19 + /** 14.20 * Return an instance of the constructor builder for the given class. 14.21 * 14.22 * @return an instance of the constructor builder for the given class.
15.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java Fri Feb 22 18:19:51 2013 +0000 15.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java Sun Feb 24 11:36:58 2013 -0800 15.3 @@ -1,5 +1,5 @@ 15.4 /* 15.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 15.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 15.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 15.8 * 15.9 * This code is free software; you can redistribute it and/or modify it 15.10 @@ -381,6 +381,17 @@ 15.11 } 15.12 15.13 /** 15.14 + * Build the property documentation. 15.15 + * 15.16 + * @param elements the XML elements that specify how a field is documented. 15.17 + */ 15.18 + public void buildPropertyDetails(XMLNode node, 15.19 + Content memberDetailsTree) throws Exception { 15.20 + configuration.getBuilderFactory(). 15.21 + getPropertyBuilder(writer).buildChildren(node, memberDetailsTree); 15.22 + } 15.23 + 15.24 + /** 15.25 * Build the constructor documentation. 15.26 * 15.27 * @param node the XML element that specifies which components to document
16.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java Fri Feb 22 18:19:51 2013 +0000 16.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java Sun Feb 24 11:36:58 2013 -0800 16.3 @@ -1,5 +1,5 @@ 16.4 /* 16.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 16.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 16.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 16.8 * 16.9 * This code is free software; you can redistribute it and/or modify it 16.10 @@ -265,7 +265,7 @@ 16.11 */ 16.12 private boolean hasConstantField (ClassDoc classDoc) { 16.13 VisibleMemberMap visibleMemberMapFields = new VisibleMemberMap(classDoc, 16.14 - VisibleMemberMap.FIELDS, configuration.nodeprecated); 16.15 + VisibleMemberMap.FIELDS, configuration); 16.16 List<?> fields = visibleMemberMapFields.getLeafClassMembers(configuration); 16.17 for (Iterator<?> iter = fields.iterator(); iter.hasNext(); ) { 16.18 FieldDoc field = (FieldDoc) iter.next(); 16.19 @@ -323,9 +323,9 @@ 16.20 public ConstantFieldBuilder(ClassDoc classdoc) { 16.21 this.classdoc = classdoc; 16.22 visibleMemberMapFields = new VisibleMemberMap(classdoc, 16.23 - VisibleMemberMap.FIELDS, configuration.nodeprecated); 16.24 + VisibleMemberMap.FIELDS, configuration); 16.25 visibleMemberMapEnumConst = new VisibleMemberMap(classdoc, 16.26 - VisibleMemberMap.ENUM_CONSTANTS, configuration.nodeprecated); 16.27 + VisibleMemberMap.ENUM_CONSTANTS, configuration); 16.28 } 16.29 16.30 /**
17.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java Fri Feb 22 18:19:51 2013 +0000 17.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java Sun Feb 24 11:36:58 2013 -0800 17.3 @@ -1,5 +1,5 @@ 17.4 /* 17.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 17.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 17.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 17.8 * 17.9 * This code is free software; you can redistribute it and/or modify it 17.10 @@ -93,7 +93,7 @@ 17.11 new VisibleMemberMap( 17.12 classDoc, 17.13 VisibleMemberMap.CONSTRUCTORS, 17.14 - configuration.nodeprecated); 17.15 + configuration); 17.16 constructors = 17.17 new ArrayList<ProgramElementDoc>(visibleMemberMap.getMembersFor(classDoc)); 17.18 for (int i = 0; i < constructors.size(); i++) {
18.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java Fri Feb 22 18:19:51 2013 +0000 18.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java Sun Feb 24 11:36:58 2013 -0800 18.3 @@ -1,5 +1,5 @@ 18.4 /* 18.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 18.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 18.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 18.8 * 18.9 * This code is free software; you can redistribute it and/or modify it 18.10 @@ -87,7 +87,7 @@ 18.11 new VisibleMemberMap( 18.12 classDoc, 18.13 VisibleMemberMap.ENUM_CONSTANTS, 18.14 - configuration.nodeprecated); 18.15 + configuration); 18.16 enumConstants = 18.17 new ArrayList<ProgramElementDoc>(visibleMemberMap.getMembersFor(classDoc)); 18.18 if (configuration.getMemberComparator() != null) {
19.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java Fri Feb 22 18:19:51 2013 +0000 19.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java Sun Feb 24 11:36:58 2013 -0800 19.3 @@ -1,5 +1,5 @@ 19.4 /* 19.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 19.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 19.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 19.8 * 19.9 * This code is free software; you can redistribute it and/or modify it 19.10 @@ -88,7 +88,7 @@ 19.11 new VisibleMemberMap( 19.12 classDoc, 19.13 VisibleMemberMap.FIELDS, 19.14 - configuration.nodeprecated); 19.15 + configuration); 19.16 fields = 19.17 new ArrayList<ProgramElementDoc>(visibleMemberMap.getLeafClassMembers( 19.18 configuration));
20.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java Fri Feb 22 18:19:51 2013 +0000 20.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java Sun Feb 24 11:36:58 2013 -0800 20.3 @@ -1,5 +1,5 @@ 20.4 /* 20.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 20.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 20.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 20.8 * 20.9 * This code is free software; you can redistribute it and/or modify it 20.10 @@ -26,6 +26,7 @@ 20.11 package com.sun.tools.doclets.internal.toolkit.builders; 20.12 20.13 import java.util.*; 20.14 +import java.text.MessageFormat; 20.15 20.16 import com.sun.javadoc.*; 20.17 import com.sun.tools.doclets.internal.toolkit.*; 20.18 @@ -82,7 +83,7 @@ 20.19 new VisibleMemberMap( 20.20 classDoc, 20.21 i, 20.22 - configuration.nodeprecated); 20.23 + configuration); 20.24 } 20.25 } 20.26 20.27 @@ -254,6 +255,17 @@ 20.28 } 20.29 20.30 /** 20.31 + * Build the summary for the fields. 20.32 + */ 20.33 + public void buildPropertiesSummary(XMLNode node, Content memberSummaryTree) { 20.34 + MemberSummaryWriter writer = 20.35 + memberSummaryWriters[VisibleMemberMap.PROPERTIES]; 20.36 + VisibleMemberMap visibleMemberMap = 20.37 + visibleMemberMaps[VisibleMemberMap.PROPERTIES]; 20.38 + addSummary(writer, visibleMemberMap, true, memberSummaryTree); 20.39 + } 20.40 + 20.41 + /** 20.42 * Build the summary for the nested classes. 20.43 * 20.44 * @param node the XML element that specifies which components to document 20.45 @@ -311,6 +323,11 @@ 20.46 List<Content> tableContents = new LinkedList<Content>(); 20.47 for (int i = 0; i < members.size(); i++) { 20.48 ProgramElementDoc member = members.get(i); 20.49 + final ProgramElementDoc propertyDoc = 20.50 + visibleMemberMap.getPropertyMemberDoc(member); 20.51 + if (propertyDoc != null) { 20.52 + processProperty(visibleMemberMap, member, propertyDoc); 20.53 + } 20.54 Tag[] firstSentenceTags = member.firstSentenceTags(); 20.55 if (member instanceof MethodDoc && firstSentenceTags.length == 0) { 20.56 //Inherit comments from overriden or implemented method if 20.57 @@ -330,6 +347,106 @@ 20.58 } 20.59 20.60 /** 20.61 + * Process the property method, property setter and/or property getter 20.62 + * comment text so that it contains the documentation from 20.63 + * the property field. The method adds the leading sentence, 20.64 + * copied documentation including the defaultValue tag and 20.65 + * the see tags if the appropriate property getter and setter are 20.66 + * available. 20.67 + * 20.68 + * @param visibleMemberMap the members information. 20.69 + * @param member the member which is to be augmented. 20.70 + * @param propertyDoc the original property documentation. 20.71 + */ 20.72 + private void processProperty(VisibleMemberMap visibleMemberMap, 20.73 + ProgramElementDoc member, 20.74 + ProgramElementDoc propertyDoc) { 20.75 + StringBuilder commentTextBuilder = new StringBuilder(); 20.76 + final boolean isSetter = isSetter(member); 20.77 + final boolean isGetter = isGetter(member); 20.78 + if (isGetter || isSetter) { 20.79 + //add "[GS]ets the value of the property PROPERTY_NAME." 20.80 + if (isSetter) { 20.81 + commentTextBuilder.append( 20.82 + MessageFormat.format( 20.83 + configuration.getText("doclet.PropertySetterWithName"), 20.84 + Util.propertyNameFromMethodName(member.name()))); 20.85 + } 20.86 + if (isGetter) { 20.87 + commentTextBuilder.append( 20.88 + MessageFormat.format( 20.89 + configuration.getText("doclet.PropertyGetterWithName"), 20.90 + Util.propertyNameFromMethodName(member.name()))); 20.91 + } 20.92 + if (propertyDoc.commentText() != null 20.93 + && !propertyDoc.commentText().isEmpty()) { 20.94 + commentTextBuilder.append(" \n @propertyDescription "); 20.95 + } 20.96 + } 20.97 + commentTextBuilder.append(propertyDoc.commentText()); 20.98 + 20.99 + Tag[] tags = propertyDoc.tags("@defaultValue"); 20.100 + if (tags != null) { 20.101 + for (Tag tag: tags) { 20.102 + commentTextBuilder.append("\n") 20.103 + .append(tag.name()) 20.104 + .append(" ") 20.105 + .append(tag.text()); 20.106 + } 20.107 + } 20.108 + 20.109 + //add @see tags 20.110 + if (!isGetter && !isSetter) { 20.111 + MethodDoc getter = (MethodDoc) visibleMemberMap.getGetterForProperty(member); 20.112 + MethodDoc setter = (MethodDoc) visibleMemberMap.getSetterForProperty(member); 20.113 + 20.114 + if ((null != getter) 20.115 + && (commentTextBuilder.indexOf("@see #" + getter.name()) == -1)) { 20.116 + commentTextBuilder.append("\n @see #") 20.117 + .append(getter.name()) 20.118 + .append("() "); 20.119 + } 20.120 + 20.121 + if ((null != setter) 20.122 + && (commentTextBuilder.indexOf("@see #" + setter.name()) == -1)) { 20.123 + String typeName = setter.parameters()[0].typeName(); 20.124 + // Removal of type parameters and package information. 20.125 + typeName = typeName.split("<")[0]; 20.126 + if (typeName.contains(".")) { 20.127 + typeName = typeName.substring(typeName.lastIndexOf(".") + 1); 20.128 + } 20.129 + commentTextBuilder.append("\n @see #").append(setter.name()); 20.130 + 20.131 + if (setter.parameters()[0].type().asTypeVariable() == null) { 20.132 + commentTextBuilder.append("(").append(typeName).append(")"); 20.133 + } 20.134 + commentTextBuilder.append(" \n"); 20.135 + } 20.136 + } 20.137 + member.setRawCommentText(commentTextBuilder.toString()); 20.138 + } 20.139 + /** 20.140 + * Test whether the method is a getter. 20.141 + * @param ped property method documentation. Needs to be either property 20.142 + * method, property getter, or property setter. 20.143 + * @return true if the given documentation belongs to a getter. 20.144 + */ 20.145 + private boolean isGetter(ProgramElementDoc ped) { 20.146 + final String pedName = ped.name(); 20.147 + return pedName.startsWith("get") || pedName.startsWith("is"); 20.148 + } 20.149 + 20.150 + /** 20.151 + * Test whether the method is a setter. 20.152 + * @param ped property method documentation. Needs to be either property 20.153 + * method, property getter, or property setter. 20.154 + * @return true if the given documentation belongs to a setter. 20.155 + */ 20.156 + private boolean isSetter(ProgramElementDoc ped) { 20.157 + return ped.name().startsWith("set"); 20.158 + } 20.159 + 20.160 + /** 20.161 * Build the inherited member summary for the given methods. 20.162 * 20.163 * @param writer the writer for this member summary.
21.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java Fri Feb 22 18:19:51 2013 +0000 21.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java Sun Feb 24 11:36:58 2013 -0800 21.3 @@ -1,5 +1,5 @@ 21.4 /* 21.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 21.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 21.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 21.8 * 21.9 * This code is free software; you can redistribute it and/or modify it 21.10 @@ -88,7 +88,7 @@ 21.11 visibleMemberMap = new VisibleMemberMap( 21.12 classDoc, 21.13 VisibleMemberMap.METHODS, 21.14 - configuration.nodeprecated); 21.15 + configuration); 21.16 methods = 21.17 new ArrayList<ProgramElementDoc>(visibleMemberMap.getLeafClassMembers( 21.18 configuration));
22.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java Fri Feb 22 18:19:51 2013 +0000 22.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java Sun Feb 24 11:36:58 2013 -0800 22.3 @@ -1,5 +1,5 @@ 22.4 /* 22.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 22.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 22.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 22.8 * 22.9 * This code is free software; you can redistribute it and/or modify it 22.10 @@ -176,6 +176,7 @@ 22.11 ? packageDoc.interfaces() 22.12 : configuration.classDocCatalog.interfaces( 22.13 Util.getPackageName(packageDoc)); 22.14 + interfaces = Util.filterOutPrivateClasses(interfaces, configuration.javafx); 22.15 if (interfaces.length > 0) { 22.16 packageWriter.addClassesSummary( 22.17 interfaces, 22.18 @@ -205,6 +206,7 @@ 22.19 ? packageDoc.ordinaryClasses() 22.20 : configuration.classDocCatalog.ordinaryClasses( 22.21 Util.getPackageName(packageDoc)); 22.22 + classes = Util.filterOutPrivateClasses(classes, configuration.javafx); 22.23 if (classes.length > 0) { 22.24 packageWriter.addClassesSummary( 22.25 classes, 22.26 @@ -234,6 +236,7 @@ 22.27 ? packageDoc.enums() 22.28 : configuration.classDocCatalog.enums( 22.29 Util.getPackageName(packageDoc)); 22.30 + enums = Util.filterOutPrivateClasses(enums, configuration.javafx); 22.31 if (enums.length > 0) { 22.32 packageWriter.addClassesSummary( 22.33 enums, 22.34 @@ -263,6 +266,7 @@ 22.35 ? packageDoc.exceptions() 22.36 : configuration.classDocCatalog.exceptions( 22.37 Util.getPackageName(packageDoc)); 22.38 + exceptions = Util.filterOutPrivateClasses(exceptions, configuration.javafx); 22.39 if (exceptions.length > 0) { 22.40 packageWriter.addClassesSummary( 22.41 exceptions, 22.42 @@ -292,6 +296,7 @@ 22.43 ? packageDoc.errors() 22.44 : configuration.classDocCatalog.errors( 22.45 Util.getPackageName(packageDoc)); 22.46 + errors = Util.filterOutPrivateClasses(errors, configuration.javafx); 22.47 if (errors.length > 0) { 22.48 packageWriter.addClassesSummary( 22.49 errors, 22.50 @@ -321,6 +326,7 @@ 22.51 ? packageDoc.annotationTypes() 22.52 : configuration.classDocCatalog.annotationTypes( 22.53 Util.getPackageName(packageDoc)); 22.54 + annotationTypes = Util.filterOutPrivateClasses(annotationTypes, configuration.javafx); 22.55 if (annotationTypes.length > 0) { 22.56 packageWriter.addClassesSummary( 22.57 annotationTypes,
23.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 23.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PropertyBuilder.java Sun Feb 24 11:36:58 2013 -0800 23.3 @@ -0,0 +1,228 @@ 23.4 +/* 23.5 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 23.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 23.7 + * 23.8 + * This code is free software; you can redistribute it and/or modify it 23.9 + * under the terms of the GNU General Public License version 2 only, as 23.10 + * published by the Free Software Foundation. Oracle designates this 23.11 + * particular file as subject to the "Classpath" exception as provided 23.12 + * by Oracle in the LICENSE file that accompanied this code. 23.13 + * 23.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 23.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 23.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 23.17 + * version 2 for more details (a copy is included in the LICENSE file that 23.18 + * accompanied this code). 23.19 + * 23.20 + * You should have received a copy of the GNU General Public License version 23.21 + * 2 along with this work; if not, write to the Free Software Foundation, 23.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 23.23 + * 23.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 23.25 + * or visit www.oracle.com if you need additional information or have any 23.26 + * questions. 23.27 + */ 23.28 + 23.29 +package com.sun.tools.doclets.internal.toolkit.builders; 23.30 + 23.31 +import java.util.*; 23.32 + 23.33 +import com.sun.tools.doclets.internal.toolkit.util.*; 23.34 +import com.sun.tools.doclets.internal.toolkit.*; 23.35 +import com.sun.javadoc.*; 23.36 + 23.37 +/** 23.38 + * Builds documentation for a property. 23.39 + * 23.40 + * <p><b>This is NOT part of any supported API. 23.41 + * If you write code that depends on this, you do so at your own risk. 23.42 + * This code and its internal interfaces are subject to change or 23.43 + * deletion without notice.</b> 23.44 + * 23.45 + * @author Jamie Ho 23.46 + * @author Bhavesh Patel (Modified) 23.47 + * @since 1.7 23.48 + */ 23.49 +public class PropertyBuilder extends AbstractMemberBuilder { 23.50 + 23.51 + /** 23.52 + * The class whose properties are being documented. 23.53 + */ 23.54 + private final ClassDoc classDoc; 23.55 + 23.56 + /** 23.57 + * The visible properties for the given class. 23.58 + */ 23.59 + private final VisibleMemberMap visibleMemberMap; 23.60 + 23.61 + /** 23.62 + * The writer to output the property documentation. 23.63 + */ 23.64 + private final PropertyWriter writer; 23.65 + 23.66 + /** 23.67 + * The list of properties being documented. 23.68 + */ 23.69 + private final List<ProgramElementDoc> properties; 23.70 + 23.71 + /** 23.72 + * The index of the current property that is being documented at this point 23.73 + * in time. 23.74 + */ 23.75 + private int currentPropertyIndex; 23.76 + 23.77 + /** 23.78 + * Construct a new PropertyBuilder. 23.79 + * 23.80 + * @param context the build context. 23.81 + * @param classDoc the class whoses members are being documented. 23.82 + * @param writer the doclet specific writer. 23.83 + */ 23.84 + private PropertyBuilder(Context context, 23.85 + ClassDoc classDoc, 23.86 + PropertyWriter writer) { 23.87 + super(context); 23.88 + this.classDoc = classDoc; 23.89 + this.writer = writer; 23.90 + visibleMemberMap = 23.91 + new VisibleMemberMap( 23.92 + classDoc, 23.93 + VisibleMemberMap.PROPERTIES, 23.94 + configuration); 23.95 + properties = 23.96 + new ArrayList<ProgramElementDoc>(visibleMemberMap.getMembersFor(classDoc)); 23.97 + if (configuration.getMemberComparator() != null) { 23.98 + Collections.sort(properties, configuration.getMemberComparator()); 23.99 + } 23.100 + } 23.101 + 23.102 + /** 23.103 + * Construct a new PropertyBuilder. 23.104 + * 23.105 + * @param context the build context. 23.106 + * @param classDoc the class whoses members are being documented. 23.107 + * @param writer the doclet specific writer. 23.108 + */ 23.109 + public static PropertyBuilder getInstance(Context context, 23.110 + ClassDoc classDoc, 23.111 + PropertyWriter writer) { 23.112 + return new PropertyBuilder(context, classDoc, writer); 23.113 + } 23.114 + 23.115 + /** 23.116 + * {@inheritDoc} 23.117 + */ 23.118 + public String getName() { 23.119 + return "PropertyDetails"; 23.120 + } 23.121 + 23.122 + /** 23.123 + * Returns a list of properties that will be documented for the given class. 23.124 + * This information can be used for doclet specific documentation 23.125 + * generation. 23.126 + * 23.127 + * @param classDoc the {@link ClassDoc} we want to check. 23.128 + * @return a list of properties that will be documented. 23.129 + */ 23.130 + public List<ProgramElementDoc> members(ClassDoc classDoc) { 23.131 + return visibleMemberMap.getMembersFor(classDoc); 23.132 + } 23.133 + 23.134 + /** 23.135 + * Returns the visible member map for the properties of this class. 23.136 + * 23.137 + * @return the visible member map for the properties of this class. 23.138 + */ 23.139 + public VisibleMemberMap getVisibleMemberMap() { 23.140 + return visibleMemberMap; 23.141 + } 23.142 + 23.143 + /** 23.144 + * summaryOrder.size() 23.145 + */ 23.146 + public boolean hasMembersToDocument() { 23.147 + return properties.size() > 0; 23.148 + } 23.149 + 23.150 + /** 23.151 + * Build the property documentation. 23.152 + * 23.153 + * @param node the XML element that specifies which components to document 23.154 + * @param memberDetailsTree the content tree to which the documentation will be added 23.155 + */ 23.156 + public void buildPropertyDoc(XMLNode node, Content memberDetailsTree) { 23.157 + if (writer == null) { 23.158 + return; 23.159 + } 23.160 + int size = properties.size(); 23.161 + if (size > 0) { 23.162 + Content propertyDetailsTree = writer.getPropertyDetailsTreeHeader( 23.163 + classDoc, memberDetailsTree); 23.164 + for (currentPropertyIndex = 0; currentPropertyIndex < size; 23.165 + currentPropertyIndex++) { 23.166 + Content propertyDocTree = writer.getPropertyDocTreeHeader( 23.167 + (MethodDoc) properties.get(currentPropertyIndex), 23.168 + propertyDetailsTree); 23.169 + buildChildren(node, propertyDocTree); 23.170 + propertyDetailsTree.addContent(writer.getPropertyDoc( 23.171 + propertyDocTree, (currentPropertyIndex == size - 1))); 23.172 + } 23.173 + memberDetailsTree.addContent( 23.174 + writer.getPropertyDetails(propertyDetailsTree)); 23.175 + } 23.176 + } 23.177 + 23.178 + /** 23.179 + * Build the signature. 23.180 + * 23.181 + * @param node the XML element that specifies which components to document 23.182 + * @param propertyDocTree the content tree to which the documentation will be added 23.183 + */ 23.184 + public void buildSignature(XMLNode node, Content propertyDocTree) { 23.185 + propertyDocTree.addContent( 23.186 + writer.getSignature((MethodDoc) properties.get(currentPropertyIndex))); 23.187 + } 23.188 + 23.189 + /** 23.190 + * Build the deprecation information. 23.191 + * 23.192 + * @param node the XML element that specifies which components to document 23.193 + * @param propertyDocTree the content tree to which the documentation will be added 23.194 + */ 23.195 + public void buildDeprecationInfo(XMLNode node, Content propertyDocTree) { 23.196 + writer.addDeprecated( 23.197 + (MethodDoc) properties.get(currentPropertyIndex), propertyDocTree); 23.198 + } 23.199 + 23.200 + /** 23.201 + * Build the comments for the property. Do nothing if 23.202 + * {@link Configuration#nocomment} is set to true. 23.203 + * 23.204 + * @param node the XML element that specifies which components to document 23.205 + * @param propertyDocTree the content tree to which the documentation will be added 23.206 + */ 23.207 + public void buildPropertyComments(XMLNode node, Content propertyDocTree) { 23.208 + if (!configuration.nocomment) { 23.209 + writer.addComments((MethodDoc) properties.get(currentPropertyIndex), propertyDocTree); 23.210 + } 23.211 + } 23.212 + 23.213 + /** 23.214 + * Build the tag information. 23.215 + * 23.216 + * @param node the XML element that specifies which components to document 23.217 + * @param propertyDocTree the content tree to which the documentation will be added 23.218 + */ 23.219 + public void buildTagInfo(XMLNode node, Content propertyDocTree) { 23.220 + writer.addTags((MethodDoc) properties.get(currentPropertyIndex), propertyDocTree); 23.221 + } 23.222 + 23.223 + /** 23.224 + * Return the property writer for this builder. 23.225 + * 23.226 + * @return the property writer for this builder. 23.227 + */ 23.228 + public PropertyWriter getWriter() { 23.229 + return writer; 23.230 + } 23.231 +}
24.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclet.xml Fri Feb 22 18:19:51 2013 +0000 24.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclet.xml Sun Feb 24 11:36:58 2013 -0800 24.3 @@ -1,7 +1,7 @@ 24.4 <?xml version='1.0' encoding='utf-8'?> 24.5 24.6 <!-- 24.7 - Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 24.8 + Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 24.9 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 24.10 24.11 This code is free software; you can redistribute it and/or modify it 24.12 @@ -107,6 +107,7 @@ 24.13 <ClassTagInfo/> 24.14 </ClassInfo> 24.15 <MemberSummary> 24.16 + <PropertiesSummary/> 24.17 <NestedClassesSummary/> 24.18 <EnumConstantsSummary/> 24.19 <FieldsSummary/> 24.20 @@ -122,6 +123,13 @@ 24.21 <TagInfo/> 24.22 </EnumConstant> 24.23 </EnumConstantsDetails> 24.24 + <PropertyDetails> 24.25 + <PropertyDoc> 24.26 + <Signature/> 24.27 + <PropertyComments/> 24.28 + <TagInfo/> 24.29 + </PropertyDoc> 24.30 + </PropertyDetails> 24.31 <FieldDetails> 24.32 <FieldDoc> 24.33 <Signature/>
25.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties Fri Feb 22 18:19:51 2013 +0000 25.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties Sun Feb 24 11:36:58 2013 -0800 25.3 @@ -40,6 +40,12 @@ 25.4 doclet.Error_taglet_not_registered=Error - Exception {0} thrown while trying to register Taglet {1}... 25.5 doclet.Error_invalid_custom_tag_argument=Error - {0} is an invalid argument to the -tag option... 25.6 doclet.Author=Author: 25.7 +doclet.DefaultValue=Default value: 25.8 +doclet.PropertyDescription=Property description: 25.9 +doclet.PropertyGetter=Gets the value of the property 25.10 +doclet.PropertySetter=Sets the value of the property 25.11 +doclet.PropertyGetterWithName=Gets the value of the property {0}. 25.12 +doclet.PropertySetterWithName=Sets the value of the property {0}. 25.13 doclet.Default=Default: 25.14 doclet.Parameters=Parameters: 25.15 doclet.TypeParameters=Type Parameters: 25.16 @@ -61,6 +67,7 @@ 25.17 doclet.noInheritedDoc=@inheritDoc used but {0} does not override or implement any method. 25.18 doclet.malformed_html_link_tag=<a> tag is malformed:\n"{0}" 25.19 doclet.tag_misuse=Tag {0} cannot be used in {1} documentation. It can only be used in the following types of documentation: {2}. 25.20 +doclet.javafx_tag_misuse=Tags @propertyGetter, @propertySetter and @propertyDescription can only be used in JavaFX properties getters and setters. 25.21 doclet.Package_Summary=Package Summary 25.22 doclet.Profile_Summary=Profile Summary 25.23 doclet.Interface_Summary=Interface Summary 25.24 @@ -73,6 +80,7 @@ 25.25 doclet.Annotation_Type_Optional_Member_Summary=Optional Element Summary 25.26 doclet.Annotation_Type_Required_Member_Summary=Required Element Summary 25.27 doclet.Field_Summary=Field Summary 25.28 +doclet.Property_Summary=Property Summary 25.29 doclet.Enum_Constant_Summary=Enum Constant Summary 25.30 doclet.Constructor_Summary=Constructor Summary 25.31 doclet.Method_Summary=Method Summary 25.32 @@ -115,10 +123,13 @@ 25.33 doclet.Methods_Inherited_From_Interface=Methods inherited from interface 25.34 doclet.Fields_Inherited_From_Class=Fields inherited from class 25.35 doclet.Fields_Inherited_From_Interface=Fields inherited from interface 25.36 +doclet.Properties_Inherited_From_Class=Properties inherited from class 25.37 +doclet.Properties_Inherited_From_Interface=Properties inherited from interface 25.38 doclet.Annotation_Type_Member_Detail=Element Detail 25.39 doclet.Enum_Constant_Detail=Enum Constant Detail 25.40 doclet.Constants_Summary=Constant Field Values 25.41 doclet.Field_Detail=Field Detail 25.42 +doclet.Property_Detail=Property Detail 25.43 doclet.Method_Detail=Method Detail 25.44 doclet.Constructor_Detail=Constructor Detail 25.45 doclet.Deprecated=Deprecated. 25.46 @@ -132,6 +143,8 @@ 25.47 doclet.Member_Table_Summary={0} table, listing {1}, and an explanation 25.48 doclet.fields=fields 25.49 doclet.Fields=Fields 25.50 +doclet.properties=properties 25.51 +doclet.Properties=Properties 25.52 doclet.constructors=constructors 25.53 doclet.Constructors=Constructors 25.54 doclet.methods=methods 25.55 @@ -149,6 +162,7 @@ 25.56 doclet.Modifier=Modifier 25.57 doclet.Type=Type 25.58 doclet.Field=Field 25.59 +doclet.Property=Property 25.60 doclet.Constructor=Constructor 25.61 doclet.Method=Method 25.62 doclet.Annotation_Type_Optional_Member=Optional Element
26.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 26.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BasePropertyTaglet.java Sun Feb 24 11:36:58 2013 -0800 26.3 @@ -0,0 +1,117 @@ 26.4 +/* 26.5 + * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 26.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 26.7 + * 26.8 + * This code is free software; you can redistribute it and/or modify it 26.9 + * under the terms of the GNU General Public License version 2 only, as 26.10 + * published by the Free Software Foundation. Oracle designates this 26.11 + * particular file as subject to the "Classpath" exception as provided 26.12 + * by Oracle in the LICENSE file that accompanied this code. 26.13 + * 26.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 26.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 26.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 26.17 + * version 2 for more details (a copy is included in the LICENSE file that 26.18 + * accompanied this code). 26.19 + * 26.20 + * You should have received a copy of the GNU General Public License version 26.21 + * 2 along with this work; if not, write to the Free Software Foundation, 26.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 26.23 + * 26.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 26.25 + * or visit www.oracle.com if you need additional information or have any 26.26 + * questions. 26.27 + */ 26.28 + 26.29 +package com.sun.tools.doclets.internal.toolkit.taglets; 26.30 + 26.31 +import com.sun.javadoc.Tag; 26.32 + 26.33 +/** 26.34 + * An abstract class that implements the {@link Taglet} interface and 26.35 + * serves as a base for JavaFX property getter and setter taglets. 26.36 + * 26.37 + * <p><b>This is NOT part of any supported API. 26.38 + * If you write code that depends on this, you do so at your own risk. 26.39 + * This code and its internal interfaces are subject to change or 26.40 + * deletion without notice.</b> 26.41 + * 26.42 + */ 26.43 +public abstract class BasePropertyTaglet extends BaseTaglet { 26.44 + 26.45 + public BasePropertyTaglet() { 26.46 + } 26.47 + 26.48 + /** 26.49 + * This method returns the text to be put in the resulting javadoc before 26.50 + * the property name. 26.51 + * 26.52 + * @param tagletWriter the taglet writer for output 26.53 + * @return the string to be put in the resulting javadoc. 26.54 + */ 26.55 + abstract String getText(TagletWriter tagletWriter); 26.56 + 26.57 + /** 26.58 + * Given the <code>Tag</code> representation of this custom 26.59 + * tag, return its string representation, which is output 26.60 + * to the generated page. 26.61 + * @param tag the <code>Tag</code> representation of this custom tag. 26.62 + * @param tagletWriter the taglet writer for output. 26.63 + * @return the TagletOutput representation of this <code>Tag</code>. 26.64 + */ 26.65 + public TagletOutput getTagletOutput(Tag tag, TagletWriter tagletWriter) { 26.66 + TagletOutput tagletOutput = tagletWriter.getOutputInstance(); 26.67 + StringBuilder output = new StringBuilder("<P>"); 26.68 + output.append(getText(tagletWriter)); 26.69 + output.append(" <CODE>"); 26.70 + output.append(tag.text()); 26.71 + output.append("</CODE>.</P>"); 26.72 + tagletOutput.setOutput(output.toString()); 26.73 + return tagletOutput; 26.74 + } 26.75 + 26.76 + /** 26.77 + * Will return false because this tag may 26.78 + * only appear in Methods. 26.79 + * @return false since this is not a method. 26.80 + */ 26.81 + public boolean inConstructor() { 26.82 + return false; 26.83 + } 26.84 + 26.85 + /** 26.86 + * Will return false because this tag may 26.87 + * only appear in Methods. 26.88 + * @return false since this is not a method. 26.89 + */ 26.90 + public boolean inOverview() { 26.91 + return false; 26.92 + } 26.93 + 26.94 + /** 26.95 + * Will return false because this tag may 26.96 + * only appear in Methods. 26.97 + * @return false since this is not a method. 26.98 + */ 26.99 + public boolean inPackage() { 26.100 + return false; 26.101 + } 26.102 + 26.103 + /** 26.104 + * Will return false because this tag may 26.105 + * only appear in Methods. 26.106 + * @return false since this is not a method. 26.107 + */ 26.108 + public boolean inType() { 26.109 + return false; 26.110 + } 26.111 + 26.112 + /** 26.113 + * Will return false because this tag is not inline. 26.114 + * @return false since this is not an inline tag. 26.115 + */ 26.116 + public boolean isInlineTag() { 26.117 + return false; 26.118 + } 26.119 + 26.120 +}
27.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 27.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ExpertTaglet.java Sun Feb 24 11:36:58 2013 -0800 27.3 @@ -0,0 +1,106 @@ 27.4 +/* 27.5 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 27.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 27.7 + * 27.8 + * This code is free software; you can redistribute it and/or modify it 27.9 + * under the terms of the GNU General Public License version 2 only, as 27.10 + * published by the Free Software Foundation. Oracle designates this 27.11 + * particular file as subject to the "Classpath" exception as provided 27.12 + * by Oracle in the LICENSE file that accompanied this code. 27.13 + * 27.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 27.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 27.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 27.17 + * version 2 for more details (a copy is included in the LICENSE file that 27.18 + * accompanied this code). 27.19 + * 27.20 + * You should have received a copy of the GNU General Public License version 27.21 + * 2 along with this work; if not, write to the Free Software Foundation, 27.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 27.23 + * 27.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 27.25 + * or visit www.oracle.com if you need additional information or have any 27.26 + * questions. 27.27 + */ 27.28 + 27.29 +package com.sun.tools.doclets.internal.toolkit.taglets; 27.30 + 27.31 +import java.util.Map; 27.32 + 27.33 +import com.sun.tools.doclets.Taglet; 27.34 +import com.sun.javadoc.Tag; 27.35 + 27.36 +/** 27.37 + * An inline Taglet used to denote information for experts. 27.38 + * 27.39 + * <p><b>This is NOT part of any supported API. 27.40 + * If you write code that depends on this, you do so at your own risk. 27.41 + * This code and its internal interfaces are subject to change or 27.42 + * deletion without notice.</b> 27.43 + * 27.44 + */ 27.45 +public class ExpertTaglet implements Taglet { 27.46 + 27.47 + private static final String NAME = "expert"; 27.48 + private static final String START_TAG = "<sub id=\"expert\">"; 27.49 + private static final String END_TAG = "</sub>"; 27.50 + 27.51 + /** 27.52 + * {@inheritDoc} 27.53 + */ 27.54 + public boolean inField() { 27.55 + return true; 27.56 + } 27.57 + 27.58 + public boolean inConstructor() { 27.59 + return true; 27.60 + } 27.61 + 27.62 + public boolean inMethod() { 27.63 + return true; 27.64 + } 27.65 + 27.66 + public boolean inOverview() { 27.67 + return true; 27.68 + } 27.69 + 27.70 + public boolean inPackage() { 27.71 + return true; 27.72 + } 27.73 + 27.74 + public boolean inType() { 27.75 + return true; 27.76 + } 27.77 + 27.78 + public boolean isInlineTag() { 27.79 + return false; 27.80 + } 27.81 + 27.82 + public String getName() { 27.83 + return NAME; 27.84 + } 27.85 + 27.86 + public static void register(Map<String, Taglet> map) { 27.87 + map.remove(NAME); 27.88 + map.put(NAME, new ExpertTaglet()); 27.89 + } 27.90 + 27.91 + public String toString(Tag tag) { 27.92 + return (tag.text() == null || tag.text().length() == 0) ? null : 27.93 + START_TAG + LiteralTaglet.textToString(tag.text()) + END_TAG; 27.94 + } 27.95 + 27.96 + 27.97 + public String toString(Tag[] tags) { 27.98 + if (tags == null || tags.length == 0) return null; 27.99 + 27.100 + StringBuffer sb = new StringBuffer(START_TAG); 27.101 + 27.102 + for(Tag t:tags) { 27.103 + sb.append(LiteralTaglet.textToString(t.text())); 27.104 + } 27.105 + sb.append(END_TAG); 27.106 + return sb.toString(); 27.107 + } 27.108 + 27.109 +}
28.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 28.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/PropertyGetterTaglet.java Sun Feb 24 11:36:58 2013 -0800 28.3 @@ -0,0 +1,50 @@ 28.4 +/* 28.5 + * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 28.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 28.7 + * 28.8 + * This code is free software; you can redistribute it and/or modify it 28.9 + * under the terms of the GNU General Public License version 2 only, as 28.10 + * published by the Free Software Foundation. Oracle designates this 28.11 + * particular file as subject to the "Classpath" exception as provided 28.12 + * by Oracle in the LICENSE file that accompanied this code. 28.13 + * 28.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 28.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 28.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 28.17 + * version 2 for more details (a copy is included in the LICENSE file that 28.18 + * accompanied this code). 28.19 + * 28.20 + * You should have received a copy of the GNU General Public License version 28.21 + * 2 along with this work; if not, write to the Free Software Foundation, 28.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 28.23 + * 28.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 28.25 + * or visit www.oracle.com if you need additional information or have any 28.26 + * questions. 28.27 + */ 28.28 + 28.29 +package com.sun.tools.doclets.internal.toolkit.taglets; 28.30 + 28.31 +/** 28.32 + * A taglet that adds the initial line of documentation to the JavaFX 28.33 + * property getters. 28.34 + * 28.35 + * <p><b>This is NOT part of any supported API. 28.36 + * If you write code that depends on this, you do so at your own risk. 28.37 + * This code and its internal interfaces are subject to change or 28.38 + * deletion without notice.</b> 28.39 + */ 28.40 +public class PropertyGetterTaglet extends BasePropertyTaglet { 28.41 + 28.42 + /** 28.43 + * Construct a new PropertyGetterTaglet. 28.44 + */ 28.45 + public PropertyGetterTaglet () { 28.46 + name = "propertyGetter"; 28.47 + } 28.48 + 28.49 + @Override 28.50 + String getText(TagletWriter tagletWriter) { 28.51 + return tagletWriter.configuration().getText("doclet.PropertyGetter"); 28.52 + } 28.53 +}
29.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 29.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/PropertySetterTaglet.java Sun Feb 24 11:36:58 2013 -0800 29.3 @@ -0,0 +1,50 @@ 29.4 +/* 29.5 + * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 29.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 29.7 + * 29.8 + * This code is free software; you can redistribute it and/or modify it 29.9 + * under the terms of the GNU General Public License version 2 only, as 29.10 + * published by the Free Software Foundation. Oracle designates this 29.11 + * particular file as subject to the "Classpath" exception as provided 29.12 + * by Oracle in the LICENSE file that accompanied this code. 29.13 + * 29.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 29.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 29.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 29.17 + * version 2 for more details (a copy is included in the LICENSE file that 29.18 + * accompanied this code). 29.19 + * 29.20 + * You should have received a copy of the GNU General Public License version 29.21 + * 2 along with this work; if not, write to the Free Software Foundation, 29.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 29.23 + * 29.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 29.25 + * or visit www.oracle.com if you need additional information or have any 29.26 + * questions. 29.27 + */ 29.28 + 29.29 +package com.sun.tools.doclets.internal.toolkit.taglets; 29.30 + 29.31 +/** 29.32 + * A taglet that adds the initial line of documentation to the JavaFX 29.33 + * property setters. 29.34 + * 29.35 + * <p><b>This is NOT part of any supported API. 29.36 + * If you write code that depends on this, you do so at your own risk. 29.37 + * This code and its internal interfaces are subject to change or 29.38 + * deletion without notice.</b> 29.39 + */ 29.40 +public class PropertySetterTaglet extends BasePropertyTaglet { 29.41 + 29.42 + /** 29.43 + * Construct a new PropertyGetterTaglet. 29.44 + */ 29.45 + public PropertySetterTaglet () { 29.46 + name = "propertySetter"; 29.47 + } 29.48 + 29.49 + @Override 29.50 + String getText(TagletWriter tagletWriter) { 29.51 + return tagletWriter.configuration().getText("doclet.PropertySetter"); 29.52 + } 29.53 +}
30.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java Fri Feb 22 18:19:51 2013 +0000 30.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java Sun Feb 24 11:36:58 2013 -0800 30.3 @@ -1,5 +1,5 @@ 30.4 /* 30.5 - * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 30.6 + * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 30.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 30.8 * 30.9 * This code is free software; you can redistribute it and/or modify it 30.10 @@ -157,6 +157,13 @@ 30.11 private boolean showauthor; 30.12 30.13 /** 30.14 + * True if we want to use JavaFX-related tags (@propertyGetter, 30.15 + * @propertySetter, @propertyDescription, @defaultValue, @treatAsPrivate, 30.16 + * @expert). 30.17 + */ 30.18 + private boolean javafx; 30.19 + 30.20 + /** 30.21 * Construct a new <code>TagletManager</code>. 30.22 * @param nosince true if we do not want to use @since tags. 30.23 * @param showversion true if we want to use @version tags. 30.24 @@ -164,7 +171,8 @@ 30.25 * @param message the message retriever to print warnings. 30.26 */ 30.27 public TagletManager(boolean nosince, boolean showversion, 30.28 - boolean showauthor, MessageRetriever message) { 30.29 + boolean showauthor, boolean javafx, 30.30 + MessageRetriever message) { 30.31 overridenStandardTags = new HashSet<String>(); 30.32 potentiallyConflictingTags = new HashSet<String>(); 30.33 standardTags = new HashSet<String>(); 30.34 @@ -174,6 +182,7 @@ 30.35 this.nosince = nosince; 30.36 this.showversion = showversion; 30.37 this.showauthor = showauthor; 30.38 + this.javafx = javafx; 30.39 this.message = message; 30.40 initStandardTags(); 30.41 initStandardTagsLowercase(); 30.42 @@ -677,6 +686,33 @@ 30.43 standardTags.add("Text"); 30.44 standardTags.add("literal"); 30.45 standardTags.add("code"); 30.46 + 30.47 + if (javafx) { 30.48 + initJavaFXTags(); 30.49 + } 30.50 + } 30.51 + 30.52 + /** 30.53 + * Initialize JavaFX-related tags. 30.54 + */ 30.55 + private void initJavaFXTags() { 30.56 + Taglet temp; 30.57 + customTags.put((temp = new PropertyGetterTaglet()).getName(), temp); 30.58 + customTags.put((temp = new PropertySetterTaglet()).getName(), temp); 30.59 + customTags.put((temp = new SimpleTaglet("propertyDescription", message.getText("doclet.PropertyDescription"), 30.60 + SimpleTaglet.FIELD + SimpleTaglet.METHOD)).getName(), temp); 30.61 + customTags.put((temp = new SimpleTaglet("defaultValue", message.getText("doclet.DefaultValue"), 30.62 + SimpleTaglet.FIELD + SimpleTaglet.METHOD)).getName(), temp); 30.63 + customTags.put((temp = new SimpleTaglet("treatAsPrivate", null, 30.64 + SimpleTaglet.FIELD + SimpleTaglet.METHOD + SimpleTaglet.TYPE)).getName(), temp); 30.65 + customTags.put((temp = new LegacyTaglet(new ExpertTaglet())).getName(), temp); 30.66 + 30.67 + standardTags.add("propertyGetter"); 30.68 + standardTags.add("propertySetter"); 30.69 + standardTags.add("propertyDescription"); 30.70 + standardTags.add("defaultValue"); 30.71 + standardTags.add("treatAsPrivate"); 30.72 + standardTags.add("expert"); 30.73 } 30.74 30.75 /**
31.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java Fri Feb 22 18:19:51 2013 +0000 31.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java Sun Feb 24 11:36:58 2013 -0800 31.3 @@ -1,5 +1,5 @@ 31.4 /* 31.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 31.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 31.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 31.8 * 31.9 * This code is free software; you can redistribute it and/or modify it 31.10 @@ -180,6 +180,7 @@ 31.11 tagletManager.checkTags(doc, doc.inlineTags(), true); 31.12 TagletOutput currentOutput = null; 31.13 for (int i = 0; i < taglets.length; i++) { 31.14 + currentOutput = null; 31.15 if (doc instanceof ClassDoc && taglets[i] instanceof ParamTaglet) { 31.16 //The type parameters are documented in a special section away 31.17 //from the tag info, so skip here.
32.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java Fri Feb 22 18:19:51 2013 +0000 32.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java Sun Feb 24 11:36:58 2013 -0800 32.3 @@ -1,5 +1,5 @@ 32.4 /* 32.5 - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 32.6 + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 32.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 32.8 * 32.9 * This code is free software; you can redistribute it and/or modify it 32.10 @@ -132,6 +132,12 @@ 32.11 Util.isDeprecated(classes[i].containingPackage()))) { 32.12 continue; 32.13 } 32.14 + 32.15 + if (configuration.javafx 32.16 + && classes[i].tags("treatAsPrivate").length > 0) { 32.17 + continue; 32.18 + } 32.19 + 32.20 if (classes[i].isEnum()) { 32.21 processType(classes[i], configuration, baseEnums, subEnums); 32.22 } else if (classes[i].isClass()) {
33.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java Fri Feb 22 18:19:51 2013 +0000 33.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java Sun Feb 24 11:36:58 2013 -0800 33.3 @@ -1,5 +1,5 @@ 33.4 /* 33.5 - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. 33.6 + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. 33.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 33.8 * 33.9 * This code is free software; you can redistribute it and/or modify it 33.10 @@ -63,6 +63,11 @@ 33.11 */ 33.12 private boolean classesOnly; 33.13 33.14 + /** 33.15 + * Indicates javafx mode. 33.16 + */ 33.17 + private boolean javafx; 33.18 + 33.19 // make ProgramElementDoc[] when new toArray is available 33.20 protected final Object[] elements; 33.21 33.22 @@ -115,6 +120,7 @@ 33.23 } 33.24 this.noDeprecated = noDeprecated; 33.25 this.classesOnly = classesOnly; 33.26 + this.javafx = configuration.javafx; 33.27 buildIndexMap(configuration.root); 33.28 Set<Character> set = indexmap.keySet(); 33.29 elements = set.toArray(); 33.30 @@ -209,6 +215,12 @@ 33.31 * Should this doc element be added to the index map? 33.32 */ 33.33 protected boolean shouldAddToIndexMap(Doc element) { 33.34 + if (javafx) { 33.35 + if (element.tags("treatAsPrivate").length > 0) { 33.36 + return false; 33.37 + } 33.38 + } 33.39 + 33.40 if (element instanceof PackageDoc) 33.41 // Do not add to index map if -nodeprecated option is set and the 33.42 // package is marked as deprecated.
34.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java Fri Feb 22 18:19:51 2013 +0000 34.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java Sun Feb 24 11:36:58 2013 -0800 34.3 @@ -722,6 +722,56 @@ 34.4 } 34.5 34.6 /** 34.7 + * A convenience method to get property name from the name of the 34.8 + * getter or setter method. 34.9 + * @param name name of the getter or setter method. 34.10 + * @return the name of the property of the given setter of getter. 34.11 + */ 34.12 + public static String propertyNameFromMethodName(String name) { 34.13 + String propertyName = null; 34.14 + if (name.startsWith("get") || name.startsWith("set")) { 34.15 + propertyName = name.substring(3); 34.16 + } else if (name.startsWith("is")) { 34.17 + propertyName = name.substring(2); 34.18 + } 34.19 + if ((propertyName == null) || propertyName.isEmpty()){ 34.20 + return ""; 34.21 + } 34.22 + return propertyName.substring(0, 1).toLowerCase() 34.23 + + propertyName.substring(1); 34.24 + } 34.25 + 34.26 + /** 34.27 + * In case of JavaFX mode on, filters out classes that are private, 34.28 + * package private or having the @treatAsPrivate annotation. Those are not 34.29 + * documented in JavaFX mode. 34.30 + * 34.31 + * @param classes array of classes to be filtered. 34.32 + * @param javafx set to true if in JavaFX mode. 34.33 + * @return list of filtered classes. 34.34 + */ 34.35 + public static ClassDoc[] filterOutPrivateClasses(final ClassDoc[] classes, 34.36 + boolean javafx) { 34.37 + if (!javafx) { 34.38 + return classes; 34.39 + } 34.40 + final List<ClassDoc> filteredOutClasses = 34.41 + new ArrayList<ClassDoc>(classes.length); 34.42 + for (ClassDoc classDoc : classes) { 34.43 + if (classDoc.isPrivate() || classDoc.isPackagePrivate()) { 34.44 + continue; 34.45 + } 34.46 + Tag[] aspTags = classDoc.tags("treatAsPrivate"); 34.47 + if (aspTags != null && aspTags.length > 0) { 34.48 + continue; 34.49 + } 34.50 + filteredOutClasses.add(classDoc); 34.51 + } 34.52 + 34.53 + return filteredOutClasses.toArray(new ClassDoc[0]); 34.54 + } 34.55 + 34.56 + /** 34.57 * Test whether the given FieldDoc is one of the declaration annotation ElementTypes 34.58 * defined in Java 5. 34.59 * Instead of testing for one of the new enum constants added in Java 8, test for
35.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java Fri Feb 22 18:19:51 2013 +0000 35.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java Sun Feb 24 11:36:58 2013 -0800 35.3 @@ -1,5 +1,5 @@ 35.4 /* 35.5 - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 35.6 + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 35.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 35.8 * 35.9 * This code is free software; you can redistribute it and/or modify it 35.10 @@ -26,6 +26,7 @@ 35.11 package com.sun.tools.doclets.internal.toolkit.util; 35.12 35.13 import java.util.*; 35.14 +import java.util.regex.Pattern; 35.15 35.16 import com.sun.javadoc.*; 35.17 import com.sun.tools.doclets.internal.toolkit.*; 35.18 @@ -56,11 +57,12 @@ 35.19 public static final int METHODS = 4; 35.20 public static final int ANNOTATION_TYPE_MEMBER_OPTIONAL = 5; 35.21 public static final int ANNOTATION_TYPE_MEMBER_REQUIRED = 6; 35.22 + public static final int PROPERTIES = 7; 35.23 35.24 /** 35.25 * The total number of member types is {@value}. 35.26 */ 35.27 - public static final int NUM_MEMBER_TYPES = 7; 35.28 + public static final int NUM_MEMBER_TYPES = 8; 35.29 35.30 public static final String STARTLEVEL = "start"; 35.31 35.32 @@ -93,23 +95,34 @@ 35.33 private final int kind; 35.34 35.35 /** 35.36 - * Deprected members should be excluded or not? 35.37 + * The configuration this VisibleMemberMap was created with. 35.38 */ 35.39 - private final boolean nodepr; 35.40 + private final Configuration configuration; 35.41 + 35.42 + private static final Map<ClassDoc, ProgramElementDoc[]> propertiesCache = 35.43 + new HashMap<ClassDoc, ProgramElementDoc[]>(); 35.44 + private static final Map<ProgramElementDoc, ProgramElementDoc> classPropertiesMap = 35.45 + new HashMap<ProgramElementDoc, ProgramElementDoc>(); 35.46 + private static final Map<ProgramElementDoc, GetterSetter> getterSetterMap = 35.47 + new HashMap<ProgramElementDoc, GetterSetter>(); 35.48 35.49 /** 35.50 * Construct a VisibleMemberMap of the given type for the given 35.51 - * class. If nodepr is true, exclude the deprecated members from 35.52 - * the map. 35.53 + * class. 35.54 * 35.55 * @param classdoc the class whose members are being mapped. 35.56 * @param kind the kind of member that is being mapped. 35.57 - * @param nodepr if true, exclude the deprecated members from the map. 35.58 + * @param configuration the configuration to use to construct this 35.59 + * VisibleMemberMap. If the field configuration.nodeprecated is true the 35.60 + * deprecated members are excluded from the map. If the field 35.61 + * configuration.javafx is true the JavaFX features are used. 35.62 */ 35.63 - public VisibleMemberMap(ClassDoc classdoc, int kind, boolean nodepr) { 35.64 + public VisibleMemberMap(ClassDoc classdoc, 35.65 + int kind, 35.66 + Configuration configuration) { 35.67 this.classdoc = classdoc; 35.68 - this.nodepr = nodepr; 35.69 this.kind = kind; 35.70 + this.configuration = configuration; 35.71 new ClassMembers(classdoc, STARTLEVEL).build(); 35.72 } 35.73 35.74 @@ -124,6 +137,33 @@ 35.75 } 35.76 35.77 /** 35.78 + * Returns the property field documentation belonging to the given member. 35.79 + * @param ped the member for which the property documentation is needed. 35.80 + * @return the property field documentation, null if there is none. 35.81 + */ 35.82 + public ProgramElementDoc getPropertyMemberDoc(ProgramElementDoc ped) { 35.83 + return classPropertiesMap.get(ped); 35.84 + } 35.85 + 35.86 + /** 35.87 + * Returns the getter documentation belonging to the given property method. 35.88 + * @param propertyMethod the method for which the getter is needed. 35.89 + * @return the getter documentation, null if there is none. 35.90 + */ 35.91 + public ProgramElementDoc getGetterForProperty(ProgramElementDoc propertyMethod) { 35.92 + return getterSetterMap.get(propertyMethod).getGetter(); 35.93 + } 35.94 + 35.95 + /** 35.96 + * Returns the setter documentation belonging to the given property method. 35.97 + * @param propertyMethod the method for which the setter is needed. 35.98 + * @return the setter documentation, null if there is none. 35.99 + */ 35.100 + public ProgramElementDoc getSetterForProperty(ProgramElementDoc propertyMethod) { 35.101 + return getterSetterMap.get(propertyMethod).getSetter(); 35.102 + } 35.103 + 35.104 + /** 35.105 * Return the package private members inherited by the class. Only return 35.106 * if parent is package private and not documented. 35.107 * 35.108 @@ -334,8 +374,9 @@ 35.109 ProgramElementDoc pgmelem = cdmembers.get(i); 35.110 if (!found(members, pgmelem) && 35.111 memberIsVisible(pgmelem) && 35.112 - !isOverridden(pgmelem, level)) { 35.113 - incllist.add(pgmelem); 35.114 + !isOverridden(pgmelem, level) && 35.115 + !isTreatedAsPrivate(pgmelem)) { 35.116 + incllist.add(pgmelem); 35.117 } 35.118 } 35.119 if (incllist.size() > 0) { 35.120 @@ -345,6 +386,16 @@ 35.121 fillMemberLevelMap(getClassMembers(fromClass, false), level); 35.122 } 35.123 35.124 + private boolean isTreatedAsPrivate(ProgramElementDoc pgmelem) { 35.125 + if (!configuration.javafx) { 35.126 + return false; 35.127 + } 35.128 + 35.129 + Tag[] aspTags = pgmelem.tags("@treatAsPrivate"); 35.130 + boolean result = (aspTags != null) && (aspTags.length > 0); 35.131 + return result; 35.132 + } 35.133 + 35.134 /** 35.135 * Is given doc item visible in given classdoc in terms fo inheritance? 35.136 * The given doc item is visible in the given classdoc if it is public 35.137 @@ -406,11 +457,16 @@ 35.138 break; 35.139 case METHODS: 35.140 members = cd.methods(filter); 35.141 + checkOnPropertiesTags((MethodDoc[])members); 35.142 + break; 35.143 + case PROPERTIES: 35.144 + members = properties(cd, filter); 35.145 break; 35.146 default: 35.147 members = new ProgramElementDoc[0]; 35.148 } 35.149 - if (nodepr) { 35.150 + // Deprected members should be excluded or not? 35.151 + if (configuration.nodeprecated) { 35.152 return Util.excludeDeprecatedMembersAsList(members); 35.153 } 35.154 return Arrays.asList(members); 35.155 @@ -472,6 +528,206 @@ 35.156 } 35.157 return false; 35.158 } 35.159 + 35.160 + private ProgramElementDoc[] properties(final ClassDoc cd, final boolean filter) { 35.161 + final MethodDoc[] allMethods = cd.methods(filter); 35.162 + final FieldDoc[] allFields = cd.fields(false); 35.163 + 35.164 + if (propertiesCache.containsKey(cd)) { 35.165 + return propertiesCache.get(cd); 35.166 + } 35.167 + 35.168 + final List<MethodDoc> result = new ArrayList<MethodDoc>(); 35.169 + 35.170 + for (final MethodDoc propertyMethod : allMethods) { 35.171 + 35.172 + if (!isPropertyMethod(propertyMethod)) { 35.173 + continue; 35.174 + } 35.175 + 35.176 + final MethodDoc getter = getterForField(allMethods, propertyMethod); 35.177 + final MethodDoc setter = setterForField(allMethods, propertyMethod); 35.178 + final FieldDoc field = fieldForProperty(allFields, propertyMethod); 35.179 + 35.180 + addToPropertiesMap(setter, getter, propertyMethod, field); 35.181 + getterSetterMap.put(propertyMethod, new GetterSetter(getter, setter)); 35.182 + result.add(propertyMethod); 35.183 + } 35.184 + final ProgramElementDoc[] resultAray = 35.185 + result.toArray(new ProgramElementDoc[result.size()]); 35.186 + propertiesCache.put(cd, resultAray); 35.187 + return resultAray; 35.188 + } 35.189 + 35.190 + private void addToPropertiesMap(MethodDoc setter, 35.191 + MethodDoc getter, 35.192 + MethodDoc propertyMethod, 35.193 + FieldDoc field) { 35.194 + if ((field == null) 35.195 + || (field.getRawCommentText() == null) 35.196 + || field.getRawCommentText().length() == 0) { 35.197 + addToPropertiesMap(setter, propertyMethod); 35.198 + addToPropertiesMap(getter, propertyMethod); 35.199 + addToPropertiesMap(propertyMethod, propertyMethod); 35.200 + } else { 35.201 + addToPropertiesMap(getter, field); 35.202 + addToPropertiesMap(setter, field); 35.203 + addToPropertiesMap(propertyMethod, field); 35.204 + } 35.205 + } 35.206 + 35.207 + private void addToPropertiesMap(ProgramElementDoc propertyMethod, 35.208 + ProgramElementDoc commentSource) { 35.209 + if (null == propertyMethod || null == commentSource) { 35.210 + return; 35.211 + } 35.212 + final String methodRawCommentText = propertyMethod.getRawCommentText(); 35.213 + 35.214 + /* The second condition is required for the property buckets. In 35.215 + * this case the comment is at the property method (not at the field) 35.216 + * and it needs to be listed in the map. 35.217 + */ 35.218 + if ((null == methodRawCommentText || 0 == methodRawCommentText.length()) 35.219 + || propertyMethod.equals(commentSource)) { 35.220 + classPropertiesMap.put(propertyMethod, commentSource); 35.221 + } 35.222 + } 35.223 + 35.224 + private MethodDoc getterForField(MethodDoc[] methods, 35.225 + MethodDoc propertyMethod) { 35.226 + final String propertyMethodName = propertyMethod.name(); 35.227 + final String fieldName = 35.228 + propertyMethodName.substring(0, 35.229 + propertyMethodName.lastIndexOf("Property")); 35.230 + final String fieldNameUppercased = 35.231 + "" + Character.toUpperCase(fieldName.charAt(0)) 35.232 + + fieldName.substring(1); 35.233 + final String getterNamePattern; 35.234 + final String fieldTypeName = propertyMethod.returnType().toString(); 35.235 + if ("boolean".equals(fieldTypeName) 35.236 + || fieldTypeName.endsWith("BooleanProperty")) { 35.237 + getterNamePattern = "(is|get)" + fieldNameUppercased; 35.238 + } else { 35.239 + getterNamePattern = "get" + fieldNameUppercased; 35.240 + } 35.241 + 35.242 + for (MethodDoc methodDoc : methods) { 35.243 + if (Pattern.matches(getterNamePattern, methodDoc.name())) { 35.244 + if (0 == methodDoc.parameters().length 35.245 + && (methodDoc.isPublic() || methodDoc.isProtected())) { 35.246 + return methodDoc; 35.247 + } 35.248 + } 35.249 + } 35.250 + return null; 35.251 + } 35.252 + 35.253 + private MethodDoc setterForField(MethodDoc[] methods, 35.254 + MethodDoc propertyMethod) { 35.255 + final String propertyMethodName = propertyMethod.name(); 35.256 + final String fieldName = 35.257 + propertyMethodName.substring(0, 35.258 + propertyMethodName.lastIndexOf("Property")); 35.259 + final String fieldNameUppercased = 35.260 + "" + Character.toUpperCase(fieldName.charAt(0)) 35.261 + + fieldName.substring(1); 35.262 + final String setter = "set" + fieldNameUppercased; 35.263 + 35.264 + for (MethodDoc methodDoc : methods) { 35.265 + if (setter.equals(methodDoc.name())) { 35.266 + if (1 == methodDoc.parameters().length 35.267 + && "void".equals(methodDoc.returnType().simpleTypeName()) 35.268 + && (methodDoc.isPublic() || methodDoc.isProtected())) { 35.269 + return methodDoc; 35.270 + } 35.271 + } 35.272 + } 35.273 + return null; 35.274 + } 35.275 + 35.276 + private FieldDoc fieldForProperty(FieldDoc[] fields, MethodDoc property) { 35.277 + 35.278 + for (FieldDoc field : fields) { 35.279 + final String fieldName = field.name(); 35.280 + final String propertyName = fieldName + "Property"; 35.281 + if (propertyName.equals(property.name())) { 35.282 + return field; 35.283 + } 35.284 + } 35.285 + return null; 35.286 + } 35.287 + 35.288 + // properties aren't named setA* or getA* 35.289 + private final Pattern pattern = Pattern.compile("[sg]et\\p{Upper}.*"); 35.290 + private boolean isPropertyMethod(MethodDoc method) { 35.291 + if (!method.name().endsWith("Property")) { 35.292 + return false; 35.293 + } 35.294 + 35.295 + if (! memberIsVisible(method)) { 35.296 + return false; 35.297 + } 35.298 + 35.299 + if (pattern.matcher(method.name()).matches()) { 35.300 + return false; 35.301 + } 35.302 + 35.303 + return 0 == method.parameters().length 35.304 + && !"void".equals(method.returnType().simpleTypeName()); 35.305 + } 35.306 + 35.307 + private void checkOnPropertiesTags(MethodDoc[] members) { 35.308 + for (MethodDoc methodDoc: members) { 35.309 + if (methodDoc.isIncluded()) { 35.310 + for (Tag tag: methodDoc.tags()) { 35.311 + String tagName = tag.name(); 35.312 + if (tagName.equals("@propertySetter") 35.313 + || tagName.equals("@propertyGetter") 35.314 + || tagName.equals("@propertyDescription")) { 35.315 + if (!isPropertyGetterOrSetter(members, methodDoc)) { 35.316 + configuration.message.warning(tag.position(), 35.317 + "doclet.javafx_tag_misuse"); 35.318 + } 35.319 + break; 35.320 + } 35.321 + } 35.322 + } 35.323 + } 35.324 + } 35.325 + 35.326 + private boolean isPropertyGetterOrSetter(MethodDoc[] members, 35.327 + MethodDoc methodDoc) { 35.328 + boolean found = false; 35.329 + String propertyName = Util.propertyNameFromMethodName(methodDoc.name()); 35.330 + if (!propertyName.isEmpty()) { 35.331 + String propertyMethodName = propertyName + "Property"; 35.332 + for (MethodDoc member: members) { 35.333 + if (member.name().equals(propertyMethodName)) { 35.334 + found = true; 35.335 + break; 35.336 + } 35.337 + } 35.338 + } 35.339 + return found; 35.340 + } 35.341 + } 35.342 + 35.343 + private class GetterSetter { 35.344 + private final ProgramElementDoc getter; 35.345 + private final ProgramElementDoc setter; 35.346 + 35.347 + public GetterSetter(ProgramElementDoc getter, ProgramElementDoc setter) { 35.348 + this.getter = getter; 35.349 + this.setter = setter; 35.350 + } 35.351 + 35.352 + public ProgramElementDoc getGetter() { 35.353 + return getter; 35.354 + } 35.355 + 35.356 + public ProgramElementDoc getSetter() { 35.357 + return setter; 35.358 + } 35.359 } 35.360 35.361 /**
36.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 36.2 +++ b/test/com/sun/javadoc/testJavaFX/C.java Sun Feb 24 11:36:58 2013 -0800 36.3 @@ -0,0 +1,103 @@ 36.4 +/* 36.5 + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 36.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 36.7 + * 36.8 + * This code is free software; you can redistribute it and/or modify it 36.9 + * under the terms of the GNU General Public License version 2 only, as 36.10 + * published by the Free Software Foundation. 36.11 + * 36.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 36.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 36.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 36.15 + * version 2 for more details (a copy is included in the LICENSE file that 36.16 + * accompanied this code). 36.17 + * 36.18 + * You should have received a copy of the GNU General Public License version 36.19 + * 2 along with this work; if not, write to the Free Software Foundation, 36.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 36.21 + * 36.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 36.23 + * or visit www.oracle.com if you need additional information or have any 36.24 + * questions. 36.25 + */ 36.26 + 36.27 +/** 36.28 + * @expert Expert tag text 36.29 + */ 36.30 + 36.31 +public class C { 36.32 + 36.33 + /** 36.34 + * @propertySetter Property 36.35 + * @propertyDescription PropertyDescription 36.36 + */ 36.37 + public void CC() {} 36.38 + 36.39 + /** 36.40 + * @propertyGetter Property 36.41 + * @expert Expert tag text 36.42 + * 36.43 + */ 36.44 + public void B() {} 36.45 + 36.46 + /** 36.47 + * Method A documentation 36.48 + * @treatAsPrivate 36.49 + */ 36.50 + public void A() {} 36.51 + 36.52 + /** 36.53 + * Field i 36.54 + * @defaultValue 1.0 36.55 + */ 36.56 + public int i; 36.57 + 36.58 + 36.59 + /** 36.60 + * Defines the direction/speed at which the {@code Timeline} is expected to 36.61 + * be played. 36.62 + * @defaultValue 11 36.63 + */ 36.64 + private DoubleProperty rate; 36.65 + 36.66 + public final void setRate(double value) {} 36.67 + 36.68 + public final double getRate() {} 36.69 + 36.70 + public final DoubleProperty rateProperty() {} 36.71 + 36.72 + private BooleanProperty paused; 36.73 + 36.74 + public final void setPaused(boolean value) {} 36.75 + 36.76 + public final double isPaused() {} 36.77 + 36.78 + /** 36.79 + * Defines if paused 36.80 + * @defaultValue false 36.81 + */ 36.82 + public final BooleanProperty pausedProperty() {} 36.83 + 36.84 + class DoubleProperty {} 36.85 + 36.86 + class BooleanProperty {} 36.87 + 36.88 + public final BooleanProperty setTestMethodProperty() {} 36.89 + 36.90 + private class Inner { 36.91 + private BooleanProperty testMethodProperty() {} 36.92 + 36.93 + /** 36.94 + * Defines the direction/speed at which the {@code Timeline} is expected to 36.95 + * be played. 36.96 + * @defaultValue 11 36.97 + */ 36.98 + private DoubleProperty rate; 36.99 + 36.100 + public final void setRate(double value) {} 36.101 + 36.102 + public final double getRate() {} 36.103 + 36.104 + public final DoubleProperty rateProperty() {} 36.105 + } 36.106 +}
37.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 37.2 +++ b/test/com/sun/javadoc/testJavaFX/D.java Sun Feb 24 11:36:58 2013 -0800 37.3 @@ -0,0 +1,28 @@ 37.4 +/* 37.5 + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 37.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 37.7 + * 37.8 + * This code is free software; you can redistribute it and/or modify it 37.9 + * under the terms of the GNU General Public License version 2 only, as 37.10 + * published by the Free Software Foundation. 37.11 + * 37.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 37.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 37.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 37.15 + * version 2 for more details (a copy is included in the LICENSE file that 37.16 + * accompanied this code). 37.17 + * 37.18 + * You should have received a copy of the GNU General Public License version 37.19 + * 2 along with this work; if not, write to the Free Software Foundation, 37.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 37.21 + * 37.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 37.23 + * or visit www.oracle.com if you need additional information or have any 37.24 + * questions. 37.25 + */ 37.26 + 37.27 +/** 37.28 + * @expert Expert tag text 37.29 + */ 37.30 + 37.31 +public class D extends C {}
38.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 38.2 +++ b/test/com/sun/javadoc/testJavaFX/TestJavaFX.java Sun Feb 24 11:36:58 2013 -0800 38.3 @@ -0,0 +1,109 @@ 38.4 +/* 38.5 + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 38.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 38.7 + * 38.8 + * This code is free software; you can redistribute it and/or modify it 38.9 + * under the terms of the GNU General Public License version 2 only, as 38.10 + * published by the Free Software Foundation. 38.11 + * 38.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 38.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 38.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 38.15 + * version 2 for more details (a copy is included in the LICENSE file that 38.16 + * accompanied this code). 38.17 + * 38.18 + * You should have received a copy of the GNU General Public License version 38.19 + * 2 along with this work; if not, write to the Free Software Foundation, 38.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 38.21 + * 38.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 38.23 + * or visit www.oracle.com if you need additional information or have any 38.24 + * questions. 38.25 + */ 38.26 + 38.27 +/* 38.28 + * @test 38.29 + * @bug 7112427 38.30 + * @summary Test of the JavaFX doclet features. 38.31 + * @author jvalenta 38.32 + * @library ../lib/ 38.33 + * @build JavadocTester TestJavaFX 38.34 + * @run main TestJavaFX 38.35 + */ 38.36 + 38.37 +public class TestJavaFX extends JavadocTester { 38.38 + 38.39 + private static final String BUG_ID = "7112427"; 38.40 + 38.41 + private static final String[][] TEST = 38.42 + new String[][] { 38.43 + {"./" + BUG_ID + "/C.html", 38.44 + "<dt><span class=\"strong\">See Also:</span></dt><dd><a href=\"C.html#getRate()\"><code>getRate()</code></a>, " + NL + 38.45 + "<a href=\"C.html#setRate(double)\"><code>setRate(double)</code></a></dd>"}, 38.46 + {"./" + BUG_ID + "/C.html", 38.47 + "<pre>public final void setRate(double value)</pre>" + NL + 38.48 + "<div class=\"block\">Sets the value of the property rate.</div>" + NL + 38.49 + "<dl><dt><span class=\"strong\">Property description:</span></dt>" }, 38.50 + {"./" + BUG_ID + "/C.html", 38.51 + "<pre>public final double getRate()</pre>" + NL + 38.52 + "<div class=\"block\">Gets the value of the property rate.</div>" + NL + 38.53 + "<dl><dt><span class=\"strong\">Property description:</span></dt>" }, 38.54 + {"./" + BUG_ID + "/C.html", 38.55 + "<td class=\"colLast\"><code><strong><a href=\"C.html#rateProperty\">rate</a></strong></code>" + NL + 38.56 + "<div class=\"block\">Defines the direction/speed at which the <code>Timeline</code> is expected to"}, 38.57 + {"./" + BUG_ID + "/C.html", 38.58 + "<sub id=\"expert\">Expert tag text</sub>"}, 38.59 + {"./" + BUG_ID + "/C.html", 38.60 + "<span class=\"strong\">Default value:</span>"}, 38.61 + {"./" + BUG_ID + "/C.html", 38.62 + "<P>Sets the value of the property <CODE>Property</CODE>"}, 38.63 + {"./" + BUG_ID + "/C.html", 38.64 + "<P>Gets the value of the property <CODE>Property</CODE>"}, 38.65 + {"./" + BUG_ID + "/C.html", 38.66 + "<span class=\"strong\">Property description:</span>"}, 38.67 + {"./" + BUG_ID + "/C.html", 38.68 + "<td class=\"colLast\"><code><strong><a href=\"C.html#setTestMethodProperty()\">setTestMethodProperty</a></strong>()</code> </td>" }, 38.69 + {"./" + BUG_ID + "/C.html", 38.70 + "<h4>isPaused</h4>" + NL + 38.71 + "<pre>public final double isPaused()</pre>" + NL + 38.72 + "<div class=\"block\">Gets the value of the property paused.</div>" }, 38.73 + {"./" + BUG_ID + "/D.html", 38.74 + "<h3>Properties inherited from class <a href=\"C.html\" title=\"class in <Unnamed>\">C</a></h3>" + NL + 38.75 + "<code><a href=\"C.html#pausedProperty\">paused</a>, <a href=\"C.html#rateProperty\">rate</a></code></li>" }, 38.76 + }; 38.77 + private static final String[][] NO_TEST = 38.78 + new String[][] { 38.79 + {"./" + BUG_ID + "/C.html", 38.80 + "A()"}, 38.81 + }; 38.82 + 38.83 + 38.84 + private static final String[] ARGS = new String[] { 38.85 + "-d", BUG_ID, "-sourcepath", SRC_DIR, "-private", "-javafx", 38.86 + SRC_DIR + FS + "C.java", SRC_DIR + FS + "D.java" 38.87 + }; 38.88 + 38.89 + /** 38.90 + * The entry point of the test. 38.91 + * @param args the array of command line arguments. 38.92 + */ 38.93 + public static void main(String[] args) { 38.94 + TestJavaFX tester = new TestJavaFX(); 38.95 + run(tester, ARGS, TEST, NO_TEST); 38.96 + tester.printSummary(); 38.97 + } 38.98 + 38.99 + /** 38.100 + * {@inheritDoc} 38.101 + */ 38.102 + public String getBugId() { 38.103 + return BUG_ID; 38.104 + } 38.105 + 38.106 + /** 38.107 + * {@inheritDoc} 38.108 + */ 38.109 + public String getBugName() { 38.110 + return getClass().getName(); 38.111 + } 38.112 +}
39.1 --- a/test/com/sun/javadoc/testLambdaFeature/TestLambdaFeature.java Fri Feb 22 18:19:51 2013 +0000 39.2 +++ b/test/com/sun/javadoc/testLambdaFeature/TestLambdaFeature.java Sun Feb 24 11:36:58 2013 -0800 39.3 @@ -63,7 +63,7 @@ 39.4 "<dl>" + NL + "<dt>Functional Interface:</dt>" + NL + 39.5 "<dd>This is a functional interface and can therefore be used as " + 39.6 "the assignment target for a lambda expression or method " + 39.7 - "reference. </dd>" + NL + "</dl>"} 39.8 + "reference.</dd>" + NL + "</dl>"} 39.9 }; 39.10 private static final String[][] NEGATED_TEST = { 39.11 {BUG_ID + FS + "pkg" + FS + "A.html",