8015720: since tag isn't copied while generating JavaFX documentation
authorjanvalenta
Thu, 27 Jun 2013 17:47:18 +0200
changeset 18659 5fe5650da7f9
parent 18658 55e4c45e091c
child 18660 d8332e6f4fab
8015720: since tag isn't copied while generating JavaFX documentation Reviewed-by: jjg
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java
langtools/test/com/sun/javadoc/testJavaFX/C.java
langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java	Thu Jun 27 16:06:56 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java	Thu Jun 27 17:47:18 2013 +0200
@@ -385,15 +385,21 @@
         }
         commentTextBuilder.append(propertyDoc.commentText());
 
-        Tag[] tags = propertyDoc.tags("@defaultValue");
-        if (tags != null) {
-            for (Tag tag: tags) {
-                commentTextBuilder.append("\n")
-                                  .append(tag.name())
-                                  .append(" ")
-                                  .append(tag.text());
+        // copy certain tags
+        List<Tag> allTags = new LinkedList<Tag>();
+        String[] tagNames = {"@defaultValue", "@since"};
+        for (String tagName: tagNames) {
+            Tag[] tags = propertyDoc.tags(tagName);
+            if (tags != null) {
+                allTags.addAll(Arrays.asList(tags));
             }
         }
+        for (Tag tag: allTags) {
+            commentTextBuilder.append("\n")
+                                .append(tag.name())
+                                .append(" ")
+                                .append(tag.text());
+        }
 
         //add @see tags
         if (!isGetter && !isSetter) {
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java	Thu Jun 27 16:06:56 2013 +0100
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java	Thu Jun 27 17:47:18 2013 +0200
@@ -631,6 +631,10 @@
      * Initialize standard Javadoc tags for ordering purposes.
      */
     private void initStandardTaglets() {
+        if (javafx) {
+            initJavaFXTaglets();
+        }
+
         Taglet temp;
         addStandardTaglet(new ParamTaglet());
         addStandardTaglet(new ReturnTaglet());
@@ -664,10 +668,6 @@
         standardTags.add("serial");
         standardTags.add("serialField");
         standardTags.add("Text");
-
-        if (javafx) {
-            initJavaFXTaglets();
-        }
     }
 
     /**
--- a/langtools/test/com/sun/javadoc/testJavaFX/C.java	Thu Jun 27 16:06:56 2013 +0100
+++ b/langtools/test/com/sun/javadoc/testJavaFX/C.java	Thu Jun 27 17:47:18 2013 +0200
@@ -57,6 +57,7 @@
      * Defines the direction/speed at which the {@code Timeline} is expected to
      * be played.
      * @defaultValue 11
+     * @since JavaFX 8.0
      */
     private DoubleProperty rate;
 
--- a/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java	Thu Jun 27 16:06:56 2013 +0100
+++ b/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java	Thu Jun 27 17:47:18 2013 +0200
@@ -55,6 +55,8 @@
             {"./" + BUG_ID + "/C.html",
                 "<span class=\"strong\">Default value:</span>"},
             {"./" + BUG_ID + "/C.html",
+                "<span class=\"strong\">Since:</span></dt>" + NL + "<dd>JavaFX 8.0</dd>" },
+            {"./" + BUG_ID + "/C.html",
                 "<p>Sets the value of the property <code>Property</code>"},
             {"./" + BUG_ID + "/C.html",
                 "<p>Gets the value of the property <code>Property</code>"},
@@ -78,7 +80,7 @@
 
 
     private static final String[] ARGS = new String[] {
-        "-d", BUG_ID, "-sourcepath", SRC_DIR, "-private", "-javafx",
+        "-d", BUG_ID, "-sourcepath", SRC_DIR, "-javafx",
         SRC_DIR + FS + "C.java", SRC_DIR + FS + "D.java"
     };