myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r803590 - /myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java
Date Wed, 12 Aug 2009 16:38:59 GMT
Author: lofwyr
Date: Wed Aug 12 16:38:59 2009
New Revision: 803590

URL: http://svn.apache.org/viewvc?rev=803590&view=rev
Log:
TOBAGO-783: Documentation should contain the default values and (internal) types of the tag
attributes

Modified:
    myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java

Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java?rev=803590&r1=803589&r2=803590&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java
(original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java
Wed Aug 12 16:38:59 2009
@@ -52,6 +52,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.io.Writer;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.Locale;
@@ -316,6 +317,16 @@
     if (componentTag != null) {
       description.append(createDescription(componentTag));
     }
+    UIComponentTagAttribute attributeTag = decl.getAnnotation(UIComponentTagAttribute.class);
+    if (attributeTag != null) {
+        if (null != attributeTag.type() && attributeTag.type().length > 0) {
+            description.append("<br />Type: <code>" + (attributeTag.type().length
== 1
+                ? attributeTag.type()[0] : Arrays.toString(attributeTag.type())) + "</code>");
+        }
+        if (StringUtils.isNotEmpty(attributeTag.defaultValue())) {
+            description.append("<br />Default: <code>" + attributeTag.defaultValue()
+ "</code>");
+        }
+    }
     ExtensionTag extensionTag = decl.getAnnotation(ExtensionTag.class);
     if (extensionTag != null) {
       String baseName = extensionTag.baseClassName();



Mime
View raw message