myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r921745 - /myfaces/tobago/branches/tobago-1.0.x/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java
Date Thu, 11 Mar 2010 09:11:43 GMT
Author: lofwyr
Date: Thu Mar 11 09:11:43 2010
New Revision: 921745

URL: http://svn.apache.org/viewvc?rev=921745&view=rev
Log:
Add to docu gereration: allowed values in tld doc

Modified:
    myfaces/tobago/branches/tobago-1.0.x/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java

Modified: myfaces/tobago/branches/tobago-1.0.x/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java?rev=921745&r1=921744&r2=921745&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java
(original)
+++ myfaces/tobago/branches/tobago-1.0.x/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/TaglibAnnotationVisitor.java
Thu Mar 11 09:11:43 2010
@@ -286,13 +286,21 @@ public class TaglibAnnotationVisitor ext
     }
     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>");
-        }
+      if (null != attributeTag.type() && attributeTag.type().length > 0) {
+        description.append("<br />Type: <code>")
+            .append(attributeTag.type().length == 1 ? attributeTag.type()[0] : Arrays.toString(attributeTag.type()))
+            .append("</code>");
+      }
+      if (StringUtils.isNotEmpty(attributeTag.defaultValue())) {
+        description.append("<br />Default: <code>")
+            .append(attributeTag.defaultValue())
+            .append("</code>");
+      }
+      if (attributeTag.allowedValues().length > 0) {
+        description.append("<br />Allowed values: <code>")
+            .append(Arrays.toString(attributeTag.allowedValues()))
+            .append("</code>");
+      }
     }
     ExtensionTag extensionTag = decl.getAnnotation(ExtensionTag.class);
     if (extensionTag != null) {



Mime
View raw message