incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r516595 - /incubator/adffaces/trunk/plugins/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
Date Fri, 09 Mar 2007 22:49:23 GMT
Author: awiner
Date: Fri Mar  9 14:49:22 2007
New Revision: 516595

URL: http://svn.apache.org/viewvc?view=rev&rev=516595
Log:
ADFFACES-406: Tagdoc should list appropriate values if enumerated.  Patch from Bud Osterberg.

Modified:
    incubator/adffaces/trunk/plugins/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java

Modified: incubator/adffaces/trunk/plugins/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/plugins/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java?view=diff&rev=516595&r1=516594&r2=516595
==============================================================================
--- incubator/adffaces/trunk/plugins/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
(original)
+++ incubator/adffaces/trunk/plugins/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
Fri Mar  9 14:49:22 2007
@@ -321,7 +321,6 @@
     {
       return null;
     }
-
     String pageName = _toPageName(component.getTagName());
 
     File targetDir = new File(outputDirectory.getParentFile(), 
@@ -779,12 +778,35 @@
 
       if (attr.getDescription()  != null)
       {
+        String[] values = attr.getPropertyValues();
+        String valStr = null;
+
+        if ((values != null) && (values.length > 0))
+        {
+          // Don't know how long this will be, but 100 should be plenty.
+          StringBuffer sb = new StringBuffer(100);
+          sb.append("\n<p><b>Valid Values: </b>");
+
+          for (int arrInd = 0; arrInd < values.length; arrInd++)
+          {
+            if (arrInd != 0)
+            {
+              sb.append(", ");
+            }
+            sb.append(values[arrInd]);
+          }
+          sb.append("</p>\n");
+          valStr = sb.toString();
+        }
+
         if (_attrDocSpansColumns)
         {
           out.write("</tr>\n");
           out.write("<tr>\n");
           out.write("<td colspan=\"3\">\n");
           //        out.write(EscapeUtils.escapeElementValue(doc.doc));
+          if (valStr != null)
+            out.write(valStr);
           out.write(attr.getDescription());
           //out.write(EscapeUtils.escapeAmpersands(doc.doc));
           out.write("</td>\n");
@@ -792,6 +814,8 @@
         else
         {
           out.write("<td>\n");
+          if (valStr != null)
+            out.write(valStr);
           out.write(attr.getDescription());
           //out.write(EscapeUtils.escapeAmpersands(doc.doc));
           out.write("</td>\n");
@@ -987,7 +1011,7 @@
       List urls = new ArrayList();
       while (e.hasMoreElements())
       {
-		URL url = (URL)e.nextElement();
+        URL url = (URL)e.nextElement();
         urls.add(url);
       }
       return Collections.unmodifiableList(urls);



Mime
View raw message