You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2010/11/05 00:15:27 UTC

svn commit: r1031341 - in /myfaces/trinidad-maven/branches/1.2.12.1-branch: ./ maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/

Author: arobinson74
Date: Thu Nov  4 23:15:26 2010
New Revision: 1031341

URL: http://svn.apache.org/viewvc?rev=1031341&view=rev
Log:
TRINIDAD-1946 Merge revision 1026463

Modified:
    myfaces/trinidad-maven/branches/1.2.12.1-branch/   (props changed)
    myfaces/trinidad-maven/branches/1.2.12.1-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java
    myfaces/trinidad-maven/branches/1.2.12.1-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java

Propchange: myfaces/trinidad-maven/branches/1.2.12.1-branch/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov  4 23:15:26 2010
@@ -1 +1 @@
-/myfaces/trinidad-maven/branches/2.0.x-branch:1026414
+/myfaces/trinidad-maven/branches/2.0.x-branch:1026414,1026463

Modified: myfaces/trinidad-maven/branches/1.2.12.1-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/1.2.12.1-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java?rev=1031341&r1=1031340&r2=1031341&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/1.2.12.1-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java (original)
+++ myfaces/trinidad-maven/branches/1.2.12.1-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java Thu Nov  4 23:15:26 2010
@@ -324,6 +324,7 @@ public class FacesConfigParser
                            "parsePropertyValues", 1);
     digester.addCallParam("faces-config/component/property/property-extension/property-metadata/property-values", 0);
     digester.addBeanPropertySetter("faces-config/component/property/property-extension/property-metadata/deprecated");
+    digester.addBeanPropertySetter("faces-config/component/property/property-extension/property-metadata/hidden");
 
     digester.setRuleNamespaceURI(oldNamespace);
   }

Modified: myfaces/trinidad-maven/branches/1.2.12.1-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/1.2.12.1-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java?rev=1031341&r1=1031340&r2=1031341&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/1.2.12.1-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java (original)
+++ myfaces/trinidad-maven/branches/1.2.12.1-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java Thu Nov  4 23:15:26 2010
@@ -128,13 +128,13 @@ public class TagdocReport extends Abstra
     compIter = new FilteredIterator(compIter, new SkipFilter());
     compIter = new FilteredIterator(compIter, new ComponentTagFilter());
     compIter = new FilteredIterator(compIter, new ComponentNamespaceFilter());
-    
+
     // compTypeMap holds a map of compononent types to tag names that implement that component type
-    // The map is built using getComponentType method on the component bean to determine the 
+    // The map is built using getComponentType method on the component bean to determine the
     // component type of a given tag name
     Map<String, List<QName>>  compTypeMap = new HashMap<String, List<QName>> ();
     // contractMap holds a map of contract name to tag names that satisify that contract.
-    // The map is built using the getSatisfiedContracts method API on the component bean to determine 
+    // The map is built using the getSatisfiedContracts method API on the component bean to determine
     // which contracts are satisfied for a given tagname
     Map<String, List<QName>> contractMap = new HashMap<String, List<QName>>();
     while (compIter.hasNext())
@@ -143,21 +143,21 @@ public class TagdocReport extends Abstra
       List<QName> tagNames;
       String compType = compBean.getComponentType();
       if (compType != null &&
-          compTypeMap.containsKey (compType) && 
-          compBean.getTagName() != null) 
+          compTypeMap.containsKey (compType) &&
+          compBean.getTagName() != null)
       {
         // the component type map already contains an entry for this component type
         tagNames = compTypeMap.get(compType);
-      } 
-      else 
+      }
+      else
       {
         // the component type map does not contain an entry for this component type
-        // so create a new ArrayList that will be used to store the tag names of 
+        // so create a new ArrayList that will be used to store the tag names of
         // component that have this component type
         tagNames = new ArrayList<QName>();
       }
       tagNames.add(compBean.getTagName());
-      compTypeMap.put (compType, tagNames);      
+      compTypeMap.put (compType, tagNames);
 
       if (compBean.hasSatisfiedContracts())
       {
@@ -167,12 +167,12 @@ public class TagdocReport extends Abstra
           String satContract = satContractsIter.next();
           if (contractMap.containsKey (satContract))
           {
-            // the contract map already contains an entry for this contract 
+            // the contract map already contains an entry for this contract
             tagNames = contractMap.get(satContract);
           }
           else
           {
-            // the contract map does not contain an entry for this contract, so 
+            // the contract map does not contain an entry for this contract, so
             // create a new ArrayList which will be used to store the tag names of
             // components that satisfy this contract
             tagNames = new ArrayList<QName>();
@@ -314,7 +314,7 @@ public class TagdocReport extends Abstra
     String header)
   {
     String formatted = null;
-    
+
     // Don't know how long this will be, but 300 should be plenty.
     StringBuffer sb = new StringBuffer(300);
     sb.append("\n");
@@ -322,7 +322,7 @@ public class TagdocReport extends Abstra
     sb.append(header);
     sb.append(":</b> ");
 
-    boolean gotOne = false;    
+    boolean gotOne = false;
     while (strIter.hasNext())
     {
       List<QName> tagNameList = pMap.get(strIter.next());
@@ -425,13 +425,13 @@ public class TagdocReport extends Abstra
     sink.text("Tag Name");
     sink.tableHeaderCell_();
     sink.tableRow_();
-    
+
     Iterator iter = pages.iterator();
     while (iter.hasNext())
     {
       sink.tableRow();
       sink.tableCell();
-      
+
       String name = (String) iter.next();
       String tagName = "<" + name.replace('_', ':') + ">";
       
@@ -676,7 +676,7 @@ public class TagdocReport extends Abstra
 
     if (bean.hasRequiredAncestorContracts())
     {
-      String formattedAncestors = _formatTagList ( bean.requiredAncestorContracts(), 
+      String formattedAncestors = _formatTagList ( bean.requiredAncestorContracts(),
                                                    contractMap, 
                                                    "Required Ancestor Tag");
       out.write (formattedAncestors);
@@ -722,7 +722,7 @@ public class TagdocReport extends Abstra
     out.write("   <b>Tag name:</b> &lt;" +
               _getQualifiedName(bean.getTagName()) + "&gt;\n");
     out.write("   <br/>\n");
-    
+
     out.write("   <br/>\n");
     out.write("   <b> type:</b> " + bean.getValidatorId() +  "\n");
     out.write("   <br/>\n");
@@ -813,8 +813,10 @@ public class TagdocReport extends Abstra
   private void _writeComponentAttributes(Writer out, ComponentBean bean) throws IOException
   {
     // Sort the names
-    TreeSet attributes = new TreeSet();
+    TreeSet<String> attributes = new TreeSet<String>();
     Iterator attrs = bean.properties(true);
+    attrs = new FilteredIterator(attrs, new NonHiddenFilter());
+
     while (attrs.hasNext())
     {
       PropertyBean property = (PropertyBean) attrs.next();
@@ -823,7 +825,7 @@ public class TagdocReport extends Abstra
     }
 
     // Now get a list of PropertyBeans
-    List list = new ArrayList();
+    List<PropertyBean> list = new ArrayList<PropertyBean>();
     Iterator iter = attributes.iterator();
     while (iter.hasNext())
     {
@@ -832,7 +834,7 @@ public class TagdocReport extends Abstra
     }
     
 
-    TreeSet groups = new TreeSet(new GroupComparator());
+    TreeSet<String> groups = new TreeSet<String>(new GroupComparator());
     /* No current support for grouping
     // Make sure "null" is the representative for unknown groups
     Iterator iter = attributes.iterator();
@@ -857,10 +859,8 @@ public class TagdocReport extends Abstra
                                 bean.getComponentClass(),
                                 (String) groupIter.next());
     }
-
   }
 
-
   private void _writeConverterAttributes(Writer out, ConverterBean bean) throws IOException
   {
     // Sort the names
@@ -929,11 +929,6 @@ public class TagdocReport extends Abstra
     while (attributes.hasNext())
     {
       PropertyBean attr = (PropertyBean) attributes.next();
-      
-      if (attr.isHidden())
-      {
-        continue;
-      }
 
       /*
       if ((group == null) || "Ungrouped".equals(group))
@@ -1040,15 +1035,15 @@ public class TagdocReport extends Abstra
         {
           out.write(valStr);
         }
-        
+
         if (defaultValueStr != null)
         {
           out.write(defaultValueStr);
         }
-        
-        // if we print out a list of possible values and/or a default value for the attribute, 
+
+        // if we print out a list of possible values and/or a default value for the attribute,
         // then enter a line break before printing out other information about the attribute.
-        if (valStr != null || defaultValueStr != null) 
+        if (valStr != null || defaultValueStr != null)
         {
           out.write("<br/>");
         }
@@ -1319,7 +1314,7 @@ public class TagdocReport extends Abstra
   // guidelines
   private void _writeAccessibilityGuidelines(Writer out, ComponentBean bean) throws IOException
   {
-    // accAttributes and accFacets are sorted lists of attributes and facets, respectively, 
+    // accAttributes and accFacets are sorted lists of attributes and facets, respectively,
     // that have an associated accessibility guideline
     TreeSet<PropertyBean> accAttributes = new TreeSet<PropertyBean>();
     TreeSet<String> accFacets = new TreeSet<String>();
@@ -1336,7 +1331,7 @@ public class TagdocReport extends Abstra
     }
 
     // see if any of the component's facets has an associated accessibility guideline
-    if (bean.hasFacets()) 
+    if (bean.hasFacets())
     {
       Iterator<FacetBean> facets = bean.facets(true);
       while (facets.hasNext())
@@ -1427,11 +1422,11 @@ public class TagdocReport extends Abstra
     out.write("    <div class=\'accGuideline\'>\n");
     out.write("<li>");
 
-    if (!"".equals(referenceName)) 
+    if (!"".equals(referenceName))
     {
       out.write("<b>");
       out.write(referenceName);
-      out.write("</b>: ");    
+      out.write("</b>: ");
     }
 
     if (desc != null)
@@ -1440,7 +1435,7 @@ public class TagdocReport extends Abstra
       {
         out.write(desc + "\n");
       }
-    } 
+    }
 
     out.write("</li>");
     out.write("    </div>\n");
@@ -1654,8 +1649,6 @@ public class TagdocReport extends Abstra
     }
   }
 
-
-
   private class ComponentNamespaceFilter extends ComponentFilter
   {
     public ComponentNamespaceFilter()
@@ -1704,8 +1697,6 @@ public class TagdocReport extends Abstra
     }
   }
 
-
-
   static final protected class TagAttributeFilter extends PropertyFilter
   {
     protected boolean accept(
@@ -1742,11 +1733,17 @@ public class TagdocReport extends Abstra
     }
   }
 
+  final protected static class NonHiddenFilter extends PropertyFilter
+  {
+    protected boolean accept(
+        PropertyBean property)
+    {
+      return (!property.isHidden());
+    }
+  }
 
   private FacesConfigBean _facesConfig;
 
-
-
   // todo: make this configurable?
   private boolean _attrDocSpansColumns = false;