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/10/22 19:26:13 UTC

svn commit: r1026414 - in /myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces: ./ generator/component/ generator/taglib/ parse/

Author: arobinson74
Date: Fri Oct 22 17:26:12 2010
New Revision: 1026414

URL: http://svn.apache.org/viewvc?rev=1026414&view=rev
Log:
TRINIDAD-1945 - Add the ability to override properties and not have errors in the JSP tags or components due to overridding final methods

Modified:
    myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/AbstractFacesMojo.java
    myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/AbstractComponentGenerator.java
    myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/TrinidadComponentGenerator.java
    myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/AbstractComponentTagGenerator.java
    myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/TrinidadComponentTagGenerator.java
    myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ComponentBean.java
    myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigBean.java
    myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/PropertyBean.java

Modified: myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/AbstractFacesMojo.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/AbstractFacesMojo.java?rev=1026414&r1=1026413&r2=1026414&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/AbstractFacesMojo.java (original)
+++ myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/AbstractFacesMojo.java Fri Oct 22 17:26:12 2010
@@ -19,10 +19,12 @@ import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileReader;
 import java.io.IOException;
+
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.net.URLConnection;
+
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
@@ -56,10 +58,13 @@ import org.apache.myfaces.trinidadbuild.
 import org.apache.myfaces.trinidadbuild.plugin.faces.util.Util;
 import org.apache.myfaces.trinidadbuild.plugin.faces.util.ValidatorFilter;
 import org.apache.myfaces.trinidadbuild.plugin.faces.util.XIncludeFilter;
+
 import org.codehaus.plexus.util.FileUtils;
+
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
 
+
 abstract public class AbstractFacesMojo extends AbstractMojo
 {
   protected List getCompileDependencyResources(
@@ -117,7 +122,7 @@ abstract public class AbstractFacesMojo 
       } catch (MalformedURLException e) {
         getLog().error("", e);
       }
-      return urls;  
+      return urls;
     }
     else
     {
@@ -218,7 +223,7 @@ abstract public class AbstractFacesMojo 
     {
       return _DEFAULT_LICENSE_HEADER;
     }
-    
+
     if (!licenseHeaderFile.exists())
     {
       throw new MojoExecutionException("License header file not found: "
@@ -232,12 +237,12 @@ abstract public class AbstractFacesMojo 
     }
 
     StringBuffer sb = new StringBuffer();
-    
+
     try
     {
       BufferedReader reader = new BufferedReader(new FileReader(licenseHeaderFile));
       String line;
-      
+
       while ((line = reader.readLine()) != null)
       {
         sb.append(line+"\n");
@@ -247,17 +252,17 @@ abstract public class AbstractFacesMojo 
     {
       throw new MojoExecutionException("Exception reading license header file", e);
     }
-    
+
     return sb.toString();
   }
-  
+
   protected String getLicenseHeader() throws MojoExecutionException
   {
     if (_licenseHeader == null)
     {
       _licenseHeader = readLicenseHeader();
     }
-    
+
     return _licenseHeader;
   }
 
@@ -286,6 +291,9 @@ abstract public class AbstractFacesMojo 
     {
       processIndexEntry(index[i]);
     }
+
+    // Perform any post-processing
+    _facesConfig.performPostProcessing();
   }
 
   protected void processIndexEntry(
@@ -408,7 +416,7 @@ abstract public class AbstractFacesMojo 
     protected boolean accept(
       ComponentBean component)
     {
-      String componentType = component.getComponentType();        
+      String componentType = component.getComponentType();
       return (componentType.startsWith(_typePrefix));
     }
      private final String _typePrefix;
@@ -498,7 +506,7 @@ abstract public class AbstractFacesMojo 
     private final String _packageContains;
   }
 
-  
+
 
   static final protected class ComponentTagFilter extends ComponentFilter
   {
@@ -680,4 +688,4 @@ abstract public class AbstractFacesMojo 
     " * under the License.\n" +
     "*/\n";
 }
-  
+

Modified: myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/AbstractComponentGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/AbstractComponentGenerator.java?rev=1026414&r1=1026413&r2=1026414&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/AbstractComponentGenerator.java (original)
+++ myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/AbstractComponentGenerator.java Fri Oct 22 17:26:12 2010
@@ -611,6 +611,11 @@ public abstract class AbstractComponentG
   {
     Iterator<PropertyBean> properties = component.properties();
     properties = new FilteredIterator(properties, new NonVirtualFilter());
+    if (isAccessorMethodFinal())
+    {
+      // Do not generate property methods if they are final and the properties are overrides
+      properties = new FilteredIterator(properties, new NonOverriddenFilter());
+    }
     while (properties.hasNext())
     {
       PropertyBean property = properties.next();
@@ -1171,6 +1176,16 @@ public abstract class AbstractComponentG
     }
   }
 
+  protected static class NonOverriddenFilter
+    extends PropertyFilter
+  {
+    protected boolean accept(
+      PropertyBean property)
+    {
+      return (!property.isOverride());
+    }
+  }
+
   static protected String resolveType(
       String className)
   {

Modified: myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/TrinidadComponentGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/TrinidadComponentGenerator.java?rev=1026414&r1=1026413&r2=1026414&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/TrinidadComponentGenerator.java (original)
+++ myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/TrinidadComponentGenerator.java Fri Oct 22 17:26:12 2010
@@ -101,6 +101,8 @@ public class TrinidadComponentGenerator 
     //  component property keys
     Iterator<PropertyBean> properties = component.properties();
     properties = new FilteredIterator(properties, new NonVirtualFilter());
+    properties = new FilteredIterator(properties, new NonOverriddenFilter());
+
     while (properties.hasNext())
     {
       PropertyBean property = properties.next();

Modified: myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/AbstractComponentTagGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/AbstractComponentTagGenerator.java?rev=1026414&r1=1026413&r2=1026414&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/AbstractComponentTagGenerator.java (original)
+++ myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/AbstractComponentTagGenerator.java Fri Oct 22 17:26:12 2010
@@ -6,9 +6,9 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- * 
+ *
  *  http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,21 +18,25 @@
  */
 package org.apache.myfaces.trinidadbuild.plugin.faces.generator.taglib;
 
+import java.io.IOException;
+
+import java.lang.reflect.Modifier;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.TreeSet;
+
 import org.apache.myfaces.trinidadbuild.plugin.faces.generator.GeneratorHelper;
 import org.apache.myfaces.trinidadbuild.plugin.faces.io.PrettyWriter;
 import org.apache.myfaces.trinidadbuild.plugin.faces.parse.ComponentBean;
 import org.apache.myfaces.trinidadbuild.plugin.faces.parse.PropertyBean;
 import org.apache.myfaces.trinidadbuild.plugin.faces.util.FilteredIterator;
+import org.apache.myfaces.trinidadbuild.plugin.faces.util.PropertyFilter;
 import org.apache.myfaces.trinidadbuild.plugin.faces.util.SourceTemplate;
 import org.apache.myfaces.trinidadbuild.plugin.faces.util.Util;
 
-import java.io.IOException;
-import java.lang.reflect.Modifier;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
-import java.util.TreeSet;
 
 /**
  * TODO: comment this!
@@ -197,6 +201,11 @@ public abstract class AbstractComponentT
   {
     Iterator<PropertyBean> properties = component.properties();
     properties = new FilteredIterator(properties, new TagAttributeFilter());
+    if (isSetterMethodFinal())
+    {
+      // Do not generate property methods if they are final and the properties are overrides
+      properties = new FilteredIterator(properties, new NonOverriddenFilter());
+    }
 
     while (properties.hasNext())
     {
@@ -206,6 +215,15 @@ public abstract class AbstractComponentT
     }
   }
 
+  /**
+   * Whether the tag setter methods have the final modifier
+   *
+   * @return true if the setter methods are final
+   */
+  protected boolean isSetterMethodFinal()
+  {
+    return false;
+  }
 
   public void writePropertyMembers(PrettyWriter out, Collection components) throws IOException
   {
@@ -243,6 +261,8 @@ public abstract class AbstractComponentT
 
     Iterator properties = all.iterator();
     properties = new FilteredIterator(properties, new TagAttributeFilter());
+    properties = new FilteredIterator(properties, new NonOverriddenFilter());
+
     if (properties.hasNext() || special)
     {
       out.println();
@@ -292,4 +312,13 @@ public abstract class AbstractComponentT
                                                      String componentClass,
                                                      Iterator properties) throws IOException;
 
+  protected static class NonOverriddenFilter
+    extends PropertyFilter
+  {
+    protected boolean accept(
+      PropertyBean property)
+    {
+      return (!property.isOverride());
+    }
+  }
 }

Modified: myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/TrinidadComponentTagGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/TrinidadComponentTagGenerator.java?rev=1026414&r1=1026413&r2=1026414&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/TrinidadComponentTagGenerator.java (original)
+++ myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/taglib/TrinidadComponentTagGenerator.java Fri Oct 22 17:26:12 2010
@@ -6,9 +6,9 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- * 
+ *
  *  http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,6 +18,13 @@
  */
 package org.apache.myfaces.trinidadbuild.plugin.faces.generator.taglib;
 
+import java.io.IOException;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
 import org.apache.myfaces.trinidadbuild.plugin.faces.generator.GeneratorHelper;
 import org.apache.myfaces.trinidadbuild.plugin.faces.io.PrettyWriter;
 import org.apache.myfaces.trinidadbuild.plugin.faces.parse.ComponentBean;
@@ -26,11 +33,6 @@ import org.apache.myfaces.trinidadbuild.
 import org.apache.myfaces.trinidadbuild.plugin.faces.util.FilteredIterator;
 import org.apache.myfaces.trinidadbuild.plugin.faces.util.Util;
 
-import java.io.IOException;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
 
 /**
  * TODO: comment this!
@@ -135,11 +137,11 @@ public class TrinidadComponentTagGenerat
       {
         imports.add(propertyClass);
       }
-      
+
       if (property.isNoOp())
       {
         imports.add("org.apache.myfaces.trinidad.logging.TrinidadLogger");
-      }  
+      }
     }
   }
 
@@ -179,10 +181,10 @@ public class TrinidadComponentTagGenerat
     out.indent();
     if (property.isNoOp())
     {
-      out.println("TrinidadLogger log = TrinidadLogger.createTrinidadLogger(this.getClass());");  
+      out.println("TrinidadLogger log = TrinidadLogger.createTrinidadLogger(this.getClass());");
       out.print("log.warning(\"property \\\"" + propName + "\\\" setter is ");
       out.print("using a no-op implementation. Used in extreme cases when the property value, beyond the default value, results in unwanted behavior.");
-      out.println("\");");  
+      out.println("\");");
     }
     else
     {
@@ -218,6 +220,7 @@ public class TrinidadComponentTagGenerat
 
     Iterator properties = all.iterator();
     properties = new FilteredIterator(properties, new TagAttributeFilter());
+    properties = new FilteredIterator(properties, new NonOverriddenFilter());
 
     if (properties.hasNext())
     {
@@ -250,6 +253,12 @@ public class TrinidadComponentTagGenerat
     }
   }
 
+  @Override
+  protected boolean isSetterMethodFinal()
+  {
+    return true;
+  }
+
   private void _writeSetPropertiesCase(
       PrettyWriter out,
       String componentClass,
@@ -258,7 +267,7 @@ public class TrinidadComponentTagGenerat
     String propName = property.getPropertyName();
     String propClass = property.getPropertyClass();
     String propVar = "_" + propName;
-   
+
     if (property.isVirtual())
     {
       _writeVirtualSetMethod(out, componentClass, propName);
@@ -291,16 +300,16 @@ public class TrinidadComponentTagGenerat
     {
       _writeSetColor(out, componentClass, propName, false);
     }
-    else if (GeneratorHelper.isKnownTypeList(propClass,  
+    else if (GeneratorHelper.isKnownTypeList(propClass,
                                     property.getPropertyClassParameters()))
     {
-      _writeSetKnownTypeList (out, componentClass, propName, 
+      _writeSetKnownTypeList (out, componentClass, propName,
                      property.getPropertyClassParameters()[0]);
     }
-    else if (GeneratorHelper.isKnownTypeSet(propClass,  
+    else if (GeneratorHelper.isKnownTypeSet(propClass,
                                     property.getPropertyClassParameters()))
     {
-      _writeSetKnownTypeSet (out, componentClass, propName, 
+      _writeSetKnownTypeSet (out, componentClass, propName,
                      property.getPropertyClassParameters()[0]);
     }
     else if (GeneratorHelper.isConverter(propClass))
@@ -869,17 +878,17 @@ public class TrinidadComponentTagGenerat
   {
     String propKey = Util.getConstantNameFromProperty(propName, "_KEY");
     String propVar = "_" + propName;
-    
+
     String propClass = Util.getClassFromFullClass(propFullClass);
     String boxedClass = Util.getBoxedClass(propClass);
 
     System.out.println ("_writeSetList: propFullClass = " + propFullClass +
-                        " propClass= " + propClass + 
+                        " propClass= " + propClass +
                         " boxedClass=" + boxedClass);
     if (_is12)
     {
-      out.println("set" + boxedClass + "ListProperty" + 
-                  "(bean, " + componentClass + "." + propKey + 
+      out.println("set" + boxedClass + "ListProperty" +
+                  "(bean, " + componentClass + "." + propKey +
                   ", " + propVar + ");");
     }
     else
@@ -926,17 +935,17 @@ public class TrinidadComponentTagGenerat
   {
     String propKey = Util.getConstantNameFromProperty(propName, "_KEY");
     String propVar = "_" + propName;
-    
+
     String propClass = Util.getClassFromFullClass(propFullClass);
     String boxedClass = Util.getBoxedClass(propClass);
 
     System.out.println ("_writeSetSet: propFullClass = " + propFullClass +
-                        " propClass= " + propClass + 
+                        " propClass= " + propClass +
                         " boxedClass=" + boxedClass);
     if (_is12)
     {
-      out.println("set" + boxedClass + "SetProperty" + 
-                  "(bean, " + componentClass + "." + propKey + 
+      out.println("set" + boxedClass + "SetProperty" +
+                  "(bean, " + componentClass + "." + propKey +
                   ", " + propVar + ");");
     }
     else

Modified: myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ComponentBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ComponentBean.java?rev=1026414&r1=1026413&r2=1026414&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ComponentBean.java (original)
+++ myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ComponentBean.java Fri Oct 22 17:26:12 2010
@@ -189,7 +189,7 @@ public class ComponentBean extends Abstr
   {
     return _jsComponentClass;
   }
-  
+
   /**
    * Sets the description of this property.
    *
@@ -786,9 +786,9 @@ public class ComponentBean extends Abstr
    * Parses the string of satisfied contracts into a String array
    * using space as the separator between values.
    * In the component metadata file, the satisfied contracts are noted
-   * with satisfied-contracts markup.  As an example, af:popup 
+   * with satisfied-contracts markup.  As an example, af:popup
    * (oracle.adf.view.rich.component.rich.RichPopup) supports
-   * oracle-adf-richmenu-holder, oracle-adf-richdialog-holder, 
+   * oracle-adf-richmenu-holder, oracle-adf-richdialog-holder,
    * oracle-adf-richnotewindow-holder, and oracle-adf-richpanelwindow-holder
    * contracts.  The satisfied contracts of a given component are matched
    * with the required ancestor contracts of other components to determine
@@ -805,14 +805,14 @@ public class ComponentBean extends Abstr
   /**
    * Sets the possible values for this property.
    * In the component metadata file, the satisfied contracts are noted
-   * with satisfied-contracts markup.  As an example, af:popup 
+   * with satisfied-contracts markup.  As an example, af:popup
    * (oracle.adf.view.rich.component.rich.RichPopup) supports
-   * oracle-adf-richmenu-holder, oracle-adf-richdialog-holder, 
+   * oracle-adf-richmenu-holder, oracle-adf-richdialog-holder,
    * oracle-adf-richnotewindow-holder, and oracle-adf-richpanelwindow-holder
    * contracts.  The satisfied contracts of a given component are matched
    * with the required ancestor contracts of other components to determine
    * if a component hierarchy is legally assembled.
-   * 
+   *
    * @param satisfiedContracts  a string array of the satisfied contracts
    */
   public void setSatisfiedContracts(
@@ -824,22 +824,22 @@ public class ComponentBean extends Abstr
   /**
    * Returns an iterator of the satisfied contracts for this component.
    * In the component metadata file, the satisfied contracts are noted
-   * with satisfied-contracts markup.  As an example, af:popup 
+   * with satisfied-contracts markup.  As an example, af:popup
    * (oracle.adf.view.rich.component.rich.RichPopup) supports
-   * oracle-adf-richmenu-holder, oracle-adf-richdialog-holder, 
+   * oracle-adf-richmenu-holder, oracle-adf-richdialog-holder,
    * oracle-adf-richnotewindow-holder, and oracle-adf-richpanelwindow-holder
    * contracts.  The satisfied contracts of a given component are matched
    * with the required ancestor contracts of other components to determine
    * if a component hierarchy is legally assembled.
-   * 
-   * @return  a java.util.Iterator of Strings, where each string is the name of a 
+   *
+   * @return  a java.util.Iterator of Strings, where each string is the name of a
    *          satisfied contract
    */
   public Iterator<String> satisfiedContracts()
   {
     return _satisfiedContracts.iterator();
-  }  
-  
+  }
+
   /**
    * Returns true if this component has any satisfied contracts.
    *
@@ -850,17 +850,17 @@ public class ComponentBean extends Abstr
   {
     return (!_satisfiedContracts.isEmpty());
   }
-  
+
   /**
    * Parses the string of required ancestor contracts into a String array
    * using space as the separator between values.
    * In the component metadata file, the required ancestors are noted
    * with required-ancestor-contracts markup. This indicates that an
-   * ancestor (e.g. parent or grandparent) tag must be have satisfied-contracts 
+   * ancestor (e.g. parent or grandparent) tag must be have satisfied-contracts
    * metadata matching the required-ancestor-contracts metadata of this tag.
    * As an example, af:dialog
    * (oracle.adf.view.rich.component.rich.RichDialog) lists
-   * oracle-adf-richdialog-holder as a required ancestor contract, and 
+   * oracle-adf-richdialog-holder as a required ancestor contract, and
    * af:popup (oracle.adf.view.rich.component.rich.RichPopup) lists
    * oracle-adf-richdialog-holder as a satisified contract.
    *
@@ -876,14 +876,14 @@ public class ComponentBean extends Abstr
    * Sets the possible values for this property.
    * In the component metadata file, the required ancestors are noted
    * with required-ancestor-contracts markup. This indicates that an
-   * ancestor (e.g. parent or grandparent) tag must be have satisfied-contracts 
+   * ancestor (e.g. parent or grandparent) tag must be have satisfied-contracts
    * metadata matching the required-ancestor-contracts metadata of this tag.
    * As an example, af:dialog
    * (oracle.adf.view.rich.component.rich.RichDialog) lists
-   * oracle-adf-richdialog-holder as a required ancestor contract, and 
+   * oracle-adf-richdialog-holder as a required ancestor contract, and
    * af:popup (oracle.adf.view.rich.component.rich.RichPopup) lists
    * oracle-adf-richdialog-holder as a satisified contract.
-   * 
+   *
    * @param requiredAncestorContracts  a string array of the required ancestor contracts
    */
   public void setRequiredAncestorContracts(
@@ -896,21 +896,21 @@ public class ComponentBean extends Abstr
    * Returns the required ancestor contracts for this component.
    * In the component metadata file, the required ancestors are noted
    * with required-ancestor-contracts markup. This indicates that an
-   * ancestor (e.g. parent or grandparent) tag must be have satisfied-contracts 
+   * ancestor (e.g. parent or grandparent) tag must be have satisfied-contracts
    * metadata matching the required-ancestor-contracts metadata of this tag.
    * As an example, af:dialog
    * (oracle.adf.view.rich.component.rich.RichDialog) lists
-   * oracle-adf-richdialog-holder as a required ancestor contract, and 
+   * oracle-adf-richdialog-holder as a required ancestor contract, and
    * af:popup (oracle.adf.view.rich.component.rich.RichPopup) lists
    * oracle-adf-richdialog-holder as a satisified contract.
-   * 
+   *
    * @return  a java.util.Iterator of strings, where each string is the name
    *          of a required ancestor contract
    */
   public Iterator<String> requiredAncestorContracts()
   {
     return _requiredAncestorContracts.iterator();
-  }  
+  }
 
   /**
    * Returns true if this component has any required ancestor contracts.
@@ -922,7 +922,7 @@ public class ComponentBean extends Abstr
   {
     return (!_requiredAncestorContracts.isEmpty());
   }
-  
+
   /**
    * Adds a Java Language class modifier to the tag class.
    *

Modified: myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigBean.java?rev=1026414&r1=1026413&r2=1026414&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigBean.java (original)
+++ myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigBean.java Fri Oct 22 17:26:12 2010
@@ -6,9 +6,9 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- * 
+ *
  *  http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -19,11 +19,13 @@
 package org.apache.myfaces.trinidadbuild.plugin.faces.parse;
 
 import java.net.URL;
+
 import java.util.Iterator;
 import java.util.Map;
 import java.util.TreeMap;
 import java.util.logging.Logger;
 
+
 /**
  * FacesConfigBean is a Java representation of the faces-config XML element.
  */
@@ -296,7 +298,7 @@ public class FacesConfigBean extends Obj
   {
     return _currentResource;
   }
-  
+
   public URL setCurrentResource(URL resource)
   {
     URL _cur = _currentResource;
@@ -304,6 +306,39 @@ public class FacesConfigBean extends Obj
     return _cur;
   }
 
+  /**
+   * Performs any processing of the meta-data that must be performed after all of the
+   * meta-data has been collected. This includes processing on super-class data and other
+   * inter-related computations that cannot be done as the data is being parsed.
+   */
+  public void performPostProcessing()
+  {
+    _identifyOverriddenProperies();
+  }
+
+  private void _identifyOverriddenProperies()
+  {
+    for (ComponentBean component : _components.values())
+    {
+      ComponentBean parentComponent = component.resolveSupertype();
+      if (parentComponent == null)
+      {
+        continue;
+      }
+
+      for (Iterator<PropertyBean> iter = component.properties(); iter.hasNext();)
+      {
+        PropertyBean property = iter.next();
+        PropertyBean parentProperty = parentComponent.findProperty(property.getPropertyName(),
+                                        true);
+        if (parentProperty != null)
+        {
+          property.setOverride(true);
+        }
+      }
+    }
+  }
+
   private Map<String, ConverterBean> _converters = new TreeMap<String, ConverterBean>();
   private Map<String, ValidatorBean> _validators = new TreeMap<String, ValidatorBean>();
   private Map<String, ComponentBean> _components = new TreeMap<String, ComponentBean>();

Modified: myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/PropertyBean.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/PropertyBean.java?rev=1026414&r1=1026413&r2=1026414&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/PropertyBean.java (original)
+++ myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/PropertyBean.java Fri Oct 22 17:26:12 2010
@@ -524,6 +524,24 @@ public class PropertyBean extends Attrib
     return _valueExpression;
   }
 
+  /**
+   * Set if this property is overridding a property in an ancestor class.
+   * @param override if overridding a property
+   */
+  public void setOverride(boolean override)
+  {
+    this._override = override;
+  }
+
+  /**
+   * Get if this property is overridding a property in an ancestor class.
+   * @return If the property is an overide
+   */
+  public boolean isOverride()
+  {
+    return _override;
+  }
+
   private String  _aliasOf;
   private String  _jspPropertyName;
   private String  _fieldPropertyName;
@@ -537,6 +555,7 @@ public class PropertyBean extends Attrib
   private boolean _enum;
   private boolean _useMaxTime;
   private boolean _hidden;
+  private boolean _override;
   private String[] _propertyValues;
   private String[] _unsupportedAgents = _EMPTY_ARRAY;
   private String[] _unsupportedRenderKits = _EMPTY_ARRAY;