You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2008/07/04 00:22:00 UTC

svn commit: r673854 [2/2] - in /myfaces/myfaces-build-tools/trunk: maven2-archetypes/myfaces-archetype-trinidad/src/main/resources/archetype-resources/src/main/java/org/apache/myfaces/trinidad/blank/ maven2-plugins/myfaces-faces-plugin/src/main/java/or...

Modified: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-faces-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/faces/generator/taglib/TrinidadConverterTagGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-faces-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/faces/generator/taglib/TrinidadConverterTagGenerator.java?rev=673854&r1=673853&r2=673854&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-faces-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/faces/generator/taglib/TrinidadConverterTagGenerator.java (original)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-faces-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/faces/generator/taglib/TrinidadConverterTagGenerator.java Thu Jul  3 15:21:59 2008
@@ -1,167 +1,167 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  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
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.myfaces.buildtools.maven2.plugin.faces.generator.taglib;
-
-import org.apache.maven.plugin.logging.Log;
-import org.apache.myfaces.buildtools.maven2.plugin.faces.io.PrettyWriter;
-import org.apache.myfaces.buildtools.maven2.plugin.faces.parse.ConverterBean;
-import org.apache.myfaces.buildtools.maven2.plugin.faces.parse.PropertyBean;
-import org.apache.myfaces.buildtools.maven2.plugin.faces.util.Util;
-
-import java.util.Set;
-import java.util.TreeSet;
-
-public class TrinidadConverterTagGenerator extends AbstractConverterTagGenerator {
-
-  public TrinidadConverterTagGenerator(boolean is12, String licenseHeader, Log log) {
-    super(is12, licenseHeader, log);
-  }
-
-  protected Set createImports(ConverterBean converter) {
-    Set imports = new TreeSet();
-
-    if (is12())
-    {
-      imports.add("javax.faces.webapp.ConverterELTag");
-      imports.add("javax.faces.context.FacesContext");
-      imports.add("javax.faces.application.Application");
-    }
-    else
-    {
-      imports.add("javax.faces.webapp.ConverterTag");
-    }
-
-    imports.add("javax.servlet.jsp.JspException");
-    imports.add(converter.getConverterClass());
-
-    imports.add("javax.faces.convert.Converter");
-    if (is12())
-    {
-      imports.add("javax.el.ValueExpression");
-    }
-    else
-    {
-      imports.add("javax.faces.el.ValueBinding");
-    }
-    imports.add("org.apache.myfaces.trinidadinternal.taglib.util.TagUtils");
-
-
-    addImportsFromPropertes(converter, imports);
-    return imports;
-  }
-
-
-
-
-  protected void writeSetProperty(
-    PrettyWriter out,
-    PropertyBean property)
-  {
-    String propName = property.getPropertyName();
-    String propFullClass = property.getPropertyClass();
-    String propClass = Util.getClassFromFullClass(propFullClass);
-    String propVar = "_" + Util.getVariableFromName(propName);
-
-    out.println("if (" + propVar + " != null)");
-    out.println("{");
-    out.indent();
-
-    if (is12())
-    {
-      out.println("if (!" + propVar + ".isLiteralText())");
-      out.println("{");
-      out.indent();
-      out.println("converter.setValueExpression(\"" + propName + "\", " +
-                  propVar + ");");
-      out.unindent();
-      out.println("}");
-      String propType = resolveType(propFullClass);
-      if (propType != null)
-      {
-        out.println("else");
-        out.println("{");
-        out.indent();
-        if ("StringArray".equals(propType))
-        {
-          out.println("try");
-          out.println("{");
-        }
-
-        out.println(propClass + " value = TagUtils.get" + propType + "(" + propVar + ".getValue(null));");
-        String setMethod = Util.getPrefixedPropertyName("set", propName);
-        out.println("converter." + setMethod + "(value);");
-        if ("StringArray".equals(propType))
-        {
-          out.println("}");
-          out.println("catch (ParseException pe)");
-          out.println("{");
-          out.indent();
-          out.println("throw new JspException(");
-          out.println("  pe.getMessage() + \": \" + \"Position \" + pe.getErrorOffset());");
-          out.unindent();
-          out.println("}");
-        }
-        out.unindent();
-        out.println("}");
-      }
-    }
-    else
-    {
-      out.println("if (TagUtils.isValueReference(" + propVar + "))");
-      out.println("{");
-      out.indent();
-      out.println("ValueBinding vb = TagUtils.getValueBinding(" + propVar + ");");
-      out.println("converter.setValueBinding(\"" + propName + "\", vb);");
-      out.unindent();
-      out.println("}");
-      String propType = resolveType(propFullClass);
-      if (propType != null)
-      {
-        out.println("else");
-        out.println("{");
-        out.indent();
-        if ("StringArray".equals(propType))
-        {
-          out.println("try");
-          out.println("{");
-        }
-        out.println(propClass + " value = TagUtils.get" + propType + "(" + propVar + ");");
-        String setMethod = Util.getPrefixedPropertyName("set", propName);
-        out.println("converter." + setMethod + "(value);");
-        if ("StringArray".equals(propType))
-        {
-          out.println("}");
-          out.println("catch (ParseException pe)");
-          out.println("{");
-          out.indent();
-          out.println("throw new JspException(");
-          out.println("  pe.getMessage() + \": \" + \"Position \" + pe.getErrorOffset());");
-          out.unindent();
-          out.println("}");
-        }
-        out.unindent();
-        out.println("}");
-      }
-    }
-
-    out.unindent();
-    out.println("}");
-  }
-
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.myfaces.buildtools.maven2.plugin.faces.generator.taglib;
+
+import org.apache.maven.plugin.logging.Log;
+import org.apache.myfaces.buildtools.maven2.plugin.faces.io.PrettyWriter;
+import org.apache.myfaces.buildtools.maven2.plugin.faces.parse.ConverterBean;
+import org.apache.myfaces.buildtools.maven2.plugin.faces.parse.PropertyBean;
+import org.apache.myfaces.buildtools.maven2.plugin.faces.util.Util;
+
+import java.util.Set;
+import java.util.TreeSet;
+
+public class TrinidadConverterTagGenerator extends AbstractConverterTagGenerator {
+
+  public TrinidadConverterTagGenerator(boolean is12, String licenseHeader, Log log) {
+    super(is12, licenseHeader, log);
+  }
+
+  protected Set createImports(ConverterBean converter) {
+    Set imports = new TreeSet();
+
+    if (is12())
+    {
+      imports.add("javax.faces.webapp.ConverterELTag");
+      imports.add("javax.faces.context.FacesContext");
+      imports.add("javax.faces.application.Application");
+    }
+    else
+    {
+      imports.add("javax.faces.webapp.ConverterTag");
+    }
+
+    imports.add("javax.servlet.jsp.JspException");
+    imports.add(converter.getConverterClass());
+
+    imports.add("javax.faces.convert.Converter");
+    if (is12())
+    {
+      imports.add("javax.el.ValueExpression");
+    }
+    else
+    {
+      imports.add("javax.faces.el.ValueBinding");
+    }
+    imports.add("org.apache.myfaces.trinidadinternal.taglib.util.TagUtils");
+
+
+    addImportsFromPropertes(converter, imports);
+    return imports;
+  }
+
+
+
+
+  protected void writeSetProperty(
+    PrettyWriter out,
+    PropertyBean property)
+  {
+    String propName = property.getPropertyName();
+    String propFullClass = property.getPropertyClass();
+    String propClass = Util.getClassFromFullClass(propFullClass);
+    String propVar = "_" + Util.getVariableFromName(propName);
+
+    out.println("if (" + propVar + " != null)");
+    out.println("{");
+    out.indent();
+
+    if (is12())
+    {
+      out.println("if (!" + propVar + ".isLiteralText())");
+      out.println("{");
+      out.indent();
+      out.println("converter.setValueExpression(\"" + propName + "\", " +
+                  propVar + ");");
+      out.unindent();
+      out.println("}");
+      String propType = resolveType(propFullClass);
+      if (propType != null)
+      {
+        out.println("else");
+        out.println("{");
+        out.indent();
+        if ("StringArray".equals(propType))
+        {
+          out.println("try");
+          out.println("{");
+        }
+
+        out.println(propClass + " value = TagUtils.get" + propType + "(" + propVar + ".getValue(null));");
+        String setMethod = Util.getPrefixedPropertyName("set", propName);
+        out.println("converter." + setMethod + "(value);");
+        if ("StringArray".equals(propType))
+        {
+          out.println("}");
+          out.println("catch (ParseException pe)");
+          out.println("{");
+          out.indent();
+          out.println("throw new JspException(");
+          out.println("  pe.getMessage() + \": \" + \"Position \" + pe.getErrorOffset());");
+          out.unindent();
+          out.println("}");
+        }
+        out.unindent();
+        out.println("}");
+      }
+    }
+    else
+    {
+      out.println("if (TagUtils.isValueReference(" + propVar + "))");
+      out.println("{");
+      out.indent();
+      out.println("ValueBinding vb = TagUtils.getValueBinding(" + propVar + ");");
+      out.println("converter.setValueBinding(\"" + propName + "\", vb);");
+      out.unindent();
+      out.println("}");
+      String propType = resolveType(propFullClass);
+      if (propType != null)
+      {
+        out.println("else");
+        out.println("{");
+        out.indent();
+        if ("StringArray".equals(propType))
+        {
+          out.println("try");
+          out.println("{");
+        }
+        out.println(propClass + " value = TagUtils.get" + propType + "(" + propVar + ");");
+        String setMethod = Util.getPrefixedPropertyName("set", propName);
+        out.println("converter." + setMethod + "(value);");
+        if ("StringArray".equals(propType))
+        {
+          out.println("}");
+          out.println("catch (ParseException pe)");
+          out.println("{");
+          out.indent();
+          out.println("throw new JspException(");
+          out.println("  pe.getMessage() + \": \" + \"Position \" + pe.getErrorOffset());");
+          out.unindent();
+          out.println("}");
+        }
+        out.unindent();
+        out.println("}");
+      }
+    }
+
+    out.unindent();
+    out.println("}");
+  }
+
+}

Propchange: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-faces-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/faces/generator/taglib/TrinidadConverterTagGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-faces-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/faces/generator/taglib/TrinidadValidatorTagGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-faces-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/faces/generator/taglib/TrinidadValidatorTagGenerator.java?rev=673854&r1=673853&r2=673854&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-faces-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/faces/generator/taglib/TrinidadValidatorTagGenerator.java (original)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-faces-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/faces/generator/taglib/TrinidadValidatorTagGenerator.java Thu Jul  3 15:21:59 2008
@@ -1,177 +1,177 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  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
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.myfaces.buildtools.maven2.plugin.faces.generator.taglib;
-
-import org.apache.maven.plugin.logging.Log;
-import org.apache.myfaces.buildtools.maven2.plugin.faces.io.PrettyWriter;
-import org.apache.myfaces.buildtools.maven2.plugin.faces.parse.PropertyBean;
-import org.apache.myfaces.buildtools.maven2.plugin.faces.parse.ValidatorBean;
-import org.apache.myfaces.buildtools.maven2.plugin.faces.util.Util;
-
-import java.util.Set;
-import java.util.TreeSet;
-
-public class TrinidadValidatorTagGenerator extends AbstractValidatorTagGenerator {
-
-  public TrinidadValidatorTagGenerator(boolean _is12, String _licenseHeader, Log _log) {
-    super(_is12, _licenseHeader, _log);
-  }
-
-  protected Set createImports(ValidatorBean validator) {
-    Set imports = new TreeSet();
-
-    if (is12())
-    {
-      imports.add("javax.faces.webapp.ValidatorELTag");
-      imports.add("javax.faces.context.FacesContext");
-      imports.add("javax.faces.application.Application");
-    }
-    else
-    {
-      imports.add("javax.faces.webapp.ValidatorTag");
-    }
-    imports.add("javax.servlet.jsp.JspException");
-    imports.add(validator.getValidatorClass());
-
-    imports.add("javax.faces.validator.Validator");
-
-    if (is12())
-    {
-      imports.add("javax.el.ValueExpression");
-    }
-    else
-    {
-      imports.add("javax.faces.el.ValueBinding");
-    }
-    imports.add("org.apache.myfaces.trinidadinternal.taglib.util.TagUtils");
-
-
-    addImportsFromPropertes(validator, imports);
-    return imports;
-  }
-
-  protected void writeSetProperty(
-    PrettyWriter out,
-    PropertyBean property)
-  {
-    String propName = property.getPropertyName();
-    String propFullClass = property.getPropertyClass();
-    String propClass = Util.getClassFromFullClass(propFullClass);
-    String propVar = "_" + Util.getVariableFromName(propName);
-    out.println("if (" + propVar + " != null)");
-    out.println("{");
-    out.indent();
-    if (is12())
-    {
-      out.println("if (!" + propVar + ".isLiteralText())");
-      out.println("{");
-      out.indent();
-      out.println("validator.setValueExpression(\"" + propName + "\", " +
-                  propVar + ");");
-      out.unindent();
-      out.println("}");
-      String propType = null;
-      if ("Date".equals (propClass)) 
-      {
-        propType = resolveDateType(propFullClass, property.getUseMaxTime());                        
-      }
-      else 
-      {
-        propType = resolveType(propFullClass);            
-      }
-      if (propType != null)
-      {
-        out.println("else");
-        out.println("{");
-        out.indent();
-        if ("StringArray".equals(propType))
-        {
-          out.println("try");
-          out.println("{");
-        }
-
-        out.println(propClass + " value = TagUtils.get" + propType + "(" + propVar + ".getValue(null));");
-        String setMethod = Util.getPrefixedPropertyName("set", propName);
-        out.println("validator." + setMethod + "(value);");
-        if ("StringArray".equals(propType))
-        {
-          out.println("}");
-          out.println("catch (ParseException pe)");
-          out.println("{");
-          out.indent();
-          out.println("throw new JspException(");
-          out.println("  pe.getMessage() + \": \" + \"Position \" + pe.getErrorOffset());");
-          out.unindent();
-          out.println("}");
-        }
-        out.unindent();
-        out.println("}");
-      }
-    }
-    else
-    {
-      out.println("if (TagUtils.isValueReference(" + propVar + "))");
-      out.println("{");
-      out.indent();
-      out.println("ValueBinding vb = TagUtils.getValueBinding(" + propVar + ");");
-      out.println("validator.setValueBinding(\"" + propName + "\", vb);");
-      out.unindent();
-      out.println("}");
-      String propType = null;
-      if ("Date".equals (propClass)) 
-      {
-        propType = resolveDateType(propFullClass, property.getUseMaxTime());                        
-      }
-      else 
-      {
-        propType = resolveType(propFullClass);            
-      }
-      if (propType != null)
-      {
-        out.println("else");
-        out.println("{");
-        out.indent();
-        if ("StringArray".equals(propType))
-        {
-          out.println("try");
-          out.println("{");
-        }
-        out.println(propClass + " value = TagUtils.get" + propType + "(" + propVar + ");");
-        String setMethod = Util.getPrefixedPropertyName("set", propName);
-        out.println("validator." + setMethod + "(value);");
-        if ("StringArray".equals(propType))
-        {
-          out.println("}");
-          out.println("catch (ParseException pe)");
-          out.println("{");
-          out.indent();
-          out.println("throw new JspException(");
-          out.println("  pe.getMessage() + \": \" + \"Position \" + pe.getErrorOffset());");
-          out.unindent();
-          out.println("}");
-        }
-        out.unindent();
-        out.println("}");
-      }
-    }
-
-    out.unindent();
-    out.println("}");
-  }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.myfaces.buildtools.maven2.plugin.faces.generator.taglib;
+
+import org.apache.maven.plugin.logging.Log;
+import org.apache.myfaces.buildtools.maven2.plugin.faces.io.PrettyWriter;
+import org.apache.myfaces.buildtools.maven2.plugin.faces.parse.PropertyBean;
+import org.apache.myfaces.buildtools.maven2.plugin.faces.parse.ValidatorBean;
+import org.apache.myfaces.buildtools.maven2.plugin.faces.util.Util;
+
+import java.util.Set;
+import java.util.TreeSet;
+
+public class TrinidadValidatorTagGenerator extends AbstractValidatorTagGenerator {
+
+  public TrinidadValidatorTagGenerator(boolean _is12, String _licenseHeader, Log _log) {
+    super(_is12, _licenseHeader, _log);
+  }
+
+  protected Set createImports(ValidatorBean validator) {
+    Set imports = new TreeSet();
+
+    if (is12())
+    {
+      imports.add("javax.faces.webapp.ValidatorELTag");
+      imports.add("javax.faces.context.FacesContext");
+      imports.add("javax.faces.application.Application");
+    }
+    else
+    {
+      imports.add("javax.faces.webapp.ValidatorTag");
+    }
+    imports.add("javax.servlet.jsp.JspException");
+    imports.add(validator.getValidatorClass());
+
+    imports.add("javax.faces.validator.Validator");
+
+    if (is12())
+    {
+      imports.add("javax.el.ValueExpression");
+    }
+    else
+    {
+      imports.add("javax.faces.el.ValueBinding");
+    }
+    imports.add("org.apache.myfaces.trinidadinternal.taglib.util.TagUtils");
+
+
+    addImportsFromPropertes(validator, imports);
+    return imports;
+  }
+
+  protected void writeSetProperty(
+    PrettyWriter out,
+    PropertyBean property)
+  {
+    String propName = property.getPropertyName();
+    String propFullClass = property.getPropertyClass();
+    String propClass = Util.getClassFromFullClass(propFullClass);
+    String propVar = "_" + Util.getVariableFromName(propName);
+    out.println("if (" + propVar + " != null)");
+    out.println("{");
+    out.indent();
+    if (is12())
+    {
+      out.println("if (!" + propVar + ".isLiteralText())");
+      out.println("{");
+      out.indent();
+      out.println("validator.setValueExpression(\"" + propName + "\", " +
+                  propVar + ");");
+      out.unindent();
+      out.println("}");
+      String propType = null;
+      if ("Date".equals (propClass)) 
+      {
+        propType = resolveDateType(propFullClass, property.getUseMaxTime());                        
+      }
+      else 
+      {
+        propType = resolveType(propFullClass);            
+      }
+      if (propType != null)
+      {
+        out.println("else");
+        out.println("{");
+        out.indent();
+        if ("StringArray".equals(propType))
+        {
+          out.println("try");
+          out.println("{");
+        }
+
+        out.println(propClass + " value = TagUtils.get" + propType + "(" + propVar + ".getValue(null));");
+        String setMethod = Util.getPrefixedPropertyName("set", propName);
+        out.println("validator." + setMethod + "(value);");
+        if ("StringArray".equals(propType))
+        {
+          out.println("}");
+          out.println("catch (ParseException pe)");
+          out.println("{");
+          out.indent();
+          out.println("throw new JspException(");
+          out.println("  pe.getMessage() + \": \" + \"Position \" + pe.getErrorOffset());");
+          out.unindent();
+          out.println("}");
+        }
+        out.unindent();
+        out.println("}");
+      }
+    }
+    else
+    {
+      out.println("if (TagUtils.isValueReference(" + propVar + "))");
+      out.println("{");
+      out.indent();
+      out.println("ValueBinding vb = TagUtils.getValueBinding(" + propVar + ");");
+      out.println("validator.setValueBinding(\"" + propName + "\", vb);");
+      out.unindent();
+      out.println("}");
+      String propType = null;
+      if ("Date".equals (propClass)) 
+      {
+        propType = resolveDateType(propFullClass, property.getUseMaxTime());                        
+      }
+      else 
+      {
+        propType = resolveType(propFullClass);            
+      }
+      if (propType != null)
+      {
+        out.println("else");
+        out.println("{");
+        out.indent();
+        if ("StringArray".equals(propType))
+        {
+          out.println("try");
+          out.println("{");
+        }
+        out.println(propClass + " value = TagUtils.get" + propType + "(" + propVar + ");");
+        String setMethod = Util.getPrefixedPropertyName("set", propName);
+        out.println("validator." + setMethod + "(value);");
+        if ("StringArray".equals(propType))
+        {
+          out.println("}");
+          out.println("catch (ParseException pe)");
+          out.println("{");
+          out.indent();
+          out.println("throw new JspException(");
+          out.println("  pe.getMessage() + \": \" + \"Position \" + pe.getErrorOffset());");
+          out.unindent();
+          out.println("}");
+        }
+        out.unindent();
+        out.println("}");
+      }
+    }
+
+    out.unindent();
+    out.println("}");
+  }
+}

Propchange: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-faces-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/faces/generator/taglib/TrinidadValidatorTagGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-faces-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/faces/parse/AbstractTagBean.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-faces-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/faces/parse/AbstractTagBean.java?rev=673854&r1=673853&r2=673854&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-faces-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/faces/parse/AbstractTagBean.java (original)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-faces-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/faces/parse/AbstractTagBean.java Thu Jul  3 15:21:59 2008
@@ -1,229 +1,229 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  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
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.myfaces.buildtools.maven2.plugin.faces.parse;
-
-import javax.xml.namespace.QName;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.LinkedHashMap;
-import java.lang.reflect.Modifier;
-
-public class AbstractTagBean extends ObjectBean {
-  private String  _description;
-  private String  _longDescription;
-  private QName   _tagName;
-  private String  _tagClass;
-  protected Map _properties;
-  private int     _tagClassModifiers;
-
-  public AbstractTagBean() {
-    _properties = new LinkedHashMap();
-  }
-
-  /**
-   * Sets the description of this property.
-   *
-   * @param description  the property description
-   */
-  public void setDescription(
-    String description)
-  {
-    _description = description;
-  }
-
-  /**
-   * Returns the description of this property.
-   *
-   * @return  the property description
-   */
-  public String getDescription()
-  {
-    return _description;
-  }
-
-  /**
-   * Sets the long description of this property.
-   *
-   * @param longDescription  the long property description
-   */
-  public void setLongDescription(
-    String longDescription)
-  {
-    _longDescription = longDescription;
-  }
-
-  /**
-   * Returns the long description of this property.
-   *
-   * @return  the long property description
-   */
-  public String getLongDescription()
-  {
-    return _longDescription;
-  }
-
-  /**
-   * Sets the JSP tag handler class for this component.
-   *
-   * @param tagClass  the JSP tag handler class
-   */
-  public void setTagClass(
-    String tagClass)
-  {
-    _tagClass = tagClass;
-  }
-
-  /**
-   * Returns the JSP tag handler class for this component.
-   *
-   * @return  the JSP tag handler class
-   */
-  public String getTagClass()
-  {
-    return _tagClass;
-  }
-
-  /**
-   * Sets the JSP tag name for this component.
-   *
-   * @param tagName  the JSP tag name
-   */
-  public void setTagName(
-      QName tagName)
-  {
-    _tagName = tagName;
-  }
-
-
-  /**
-   * Returns the JSP tag name for this component.
-   *
-   * @return  the JSP tag name
-   */
-  public QName getTagName()
-  {
-    return _tagName;
-  }
-
-  /**
-   * Adds a property to this component.
-   *
-   * @param property  the property to add
-   */
-  public void addProperty(
-    PropertyBean property)
-  {
-    _properties.put(property.getPropertyName(), property);
-  }
-
-  /**
-   * Returns the property for this property name.
-   *
-   * @param propertyName  the property name to find
-   */
-  public PropertyBean findProperty(
-    String propertyName)
-  {
-    return (PropertyBean)_properties.get(propertyName);
-  }
-
-  /**
-   * Returns true if this component has any properties.
-   *
-   * @return  true   if this component has any properties,
-   *          false  otherwise
-   */
-  public boolean hasProperties()
-  {
-    return !_properties.isEmpty();
-  }
-
-  /**
-   * Returns an iterator for all properties on this component only.
-   *
-   * @return  the property iterator
-   */
-  public Iterator properties()
-  {
-    return _properties.values().iterator();
-  }
-
-  public void parseTagClassModifier(
-    String modifier)
-  {
-    addTagClassModifier(_parseModifier(modifier));
-  }
-
-  protected int _parseModifier(
-    String text)
-  {
-    if ("public".equals(text))
-      return Modifier.PUBLIC;
-    else if ("protected".equals(text))
-      return Modifier.PROTECTED;
-    else if ("private".equals(text))
-      return Modifier.PRIVATE;
-    else if ("abstract".equals(text))
-      return Modifier.ABSTRACT;
-    else if ("final".equals(text))
-      return Modifier.FINAL;
-
-    throw new IllegalArgumentException("Unrecognized modifier: " + text);
-  }
-
-  /**
-   * Adds a Java Language class modifier to the tag class.
-   *
-   * @param modifier  the modifier to be added
-   */
-  public void addTagClassModifier(
-    int modifier)
-  {
-    _tagClassModifiers |= modifier;
-  }
-
-  /**
-   * Returns the Java Language class modifiers for the tag class.
-   * By default, these modifiers include Modifier.PUBLIC.
-   *
-   * @return  the Java Language class modifiers for the tag class
-   */
-  public int getTagClassModifiers()
-  {
-    int modifiers = _tagClassModifiers;
-
-    if (!Modifier.isPrivate(modifiers) &&
-        !Modifier.isProtected(modifiers) &&
-        !Modifier.isPublic(modifiers))
-    {
-      modifiers |= Modifier.PUBLIC;
-    }
-
-    return modifiers;
-  }
-
- /**
-  * Number of properties for this component
-  * @return num of properties
-  */
-  public int propertiesSize()
-  {
-    return _properties.size();
-  }
-}
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.myfaces.buildtools.maven2.plugin.faces.parse;
+
+import javax.xml.namespace.QName;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.LinkedHashMap;
+import java.lang.reflect.Modifier;
+
+public class AbstractTagBean extends ObjectBean {
+  private String  _description;
+  private String  _longDescription;
+  private QName   _tagName;
+  private String  _tagClass;
+  protected Map _properties;
+  private int     _tagClassModifiers;
+
+  public AbstractTagBean() {
+    _properties = new LinkedHashMap();
+  }
+
+  /**
+   * Sets the description of this property.
+   *
+   * @param description  the property description
+   */
+  public void setDescription(
+    String description)
+  {
+    _description = description;
+  }
+
+  /**
+   * Returns the description of this property.
+   *
+   * @return  the property description
+   */
+  public String getDescription()
+  {
+    return _description;
+  }
+
+  /**
+   * Sets the long description of this property.
+   *
+   * @param longDescription  the long property description
+   */
+  public void setLongDescription(
+    String longDescription)
+  {
+    _longDescription = longDescription;
+  }
+
+  /**
+   * Returns the long description of this property.
+   *
+   * @return  the long property description
+   */
+  public String getLongDescription()
+  {
+    return _longDescription;
+  }
+
+  /**
+   * Sets the JSP tag handler class for this component.
+   *
+   * @param tagClass  the JSP tag handler class
+   */
+  public void setTagClass(
+    String tagClass)
+  {
+    _tagClass = tagClass;
+  }
+
+  /**
+   * Returns the JSP tag handler class for this component.
+   *
+   * @return  the JSP tag handler class
+   */
+  public String getTagClass()
+  {
+    return _tagClass;
+  }
+
+  /**
+   * Sets the JSP tag name for this component.
+   *
+   * @param tagName  the JSP tag name
+   */
+  public void setTagName(
+      QName tagName)
+  {
+    _tagName = tagName;
+  }
+
+
+  /**
+   * Returns the JSP tag name for this component.
+   *
+   * @return  the JSP tag name
+   */
+  public QName getTagName()
+  {
+    return _tagName;
+  }
+
+  /**
+   * Adds a property to this component.
+   *
+   * @param property  the property to add
+   */
+  public void addProperty(
+    PropertyBean property)
+  {
+    _properties.put(property.getPropertyName(), property);
+  }
+
+  /**
+   * Returns the property for this property name.
+   *
+   * @param propertyName  the property name to find
+   */
+  public PropertyBean findProperty(
+    String propertyName)
+  {
+    return (PropertyBean)_properties.get(propertyName);
+  }
+
+  /**
+   * Returns true if this component has any properties.
+   *
+   * @return  true   if this component has any properties,
+   *          false  otherwise
+   */
+  public boolean hasProperties()
+  {
+    return !_properties.isEmpty();
+  }
+
+  /**
+   * Returns an iterator for all properties on this component only.
+   *
+   * @return  the property iterator
+   */
+  public Iterator properties()
+  {
+    return _properties.values().iterator();
+  }
+
+  public void parseTagClassModifier(
+    String modifier)
+  {
+    addTagClassModifier(_parseModifier(modifier));
+  }
+
+  protected int _parseModifier(
+    String text)
+  {
+    if ("public".equals(text))
+      return Modifier.PUBLIC;
+    else if ("protected".equals(text))
+      return Modifier.PROTECTED;
+    else if ("private".equals(text))
+      return Modifier.PRIVATE;
+    else if ("abstract".equals(text))
+      return Modifier.ABSTRACT;
+    else if ("final".equals(text))
+      return Modifier.FINAL;
+
+    throw new IllegalArgumentException("Unrecognized modifier: " + text);
+  }
+
+  /**
+   * Adds a Java Language class modifier to the tag class.
+   *
+   * @param modifier  the modifier to be added
+   */
+  public void addTagClassModifier(
+    int modifier)
+  {
+    _tagClassModifiers |= modifier;
+  }
+
+  /**
+   * Returns the Java Language class modifiers for the tag class.
+   * By default, these modifiers include Modifier.PUBLIC.
+   *
+   * @return  the Java Language class modifiers for the tag class
+   */
+  public int getTagClassModifiers()
+  {
+    int modifiers = _tagClassModifiers;
+
+    if (!Modifier.isPrivate(modifiers) &&
+        !Modifier.isProtected(modifiers) &&
+        !Modifier.isPublic(modifiers))
+    {
+      modifiers |= Modifier.PUBLIC;
+    }
+
+    return modifiers;
+  }
+
+ /**
+  * Number of properties for this component
+  * @return num of properties
+  */
+  public int propertiesSize()
+  {
+    return _properties.size();
+  }
+}

Propchange: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-faces-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/faces/parse/AbstractTagBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jdev-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/jdeveloper/TldContentHandler.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jdev-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/jdeveloper/TldContentHandler.java?rev=673854&r1=673853&r2=673854&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jdev-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/jdeveloper/TldContentHandler.java (original)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jdev-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/jdeveloper/TldContentHandler.java Thu Jul  3 15:21:59 2008
@@ -1,187 +1,187 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  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
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.myfaces.buildtools.maven2.plugin.jdeveloper;
-
-import java.io.File;
-import java.io.IOException;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.w3c.dom.Document;
-
-import org.w3c.dom.Node;
-
-import org.w3c.dom.NodeList;
-
-import org.xml.sax.SAXException;
-
-public class TldContentHandler
-{
-  /**
-    * Content Handler.
-    */
-  public TldContentHandler()
-  {
-  }
-  
-  /**
-    * Parse the .tld file to get the information 
-    * needed for the .jpr
-    */
-  public void parseTld(File file)
-  throws SAXException,
-         IOException,
-         ParserConfigurationException
-  {
-    // Create a builder factory
-    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-    factory.setValidating(false);
-    
-    // Create the Builder and parse the file
-    Document document = factory.newDocumentBuilder().parse(file);
-    
-    _processTldNodes(document);
-  }
-
-  /*=========================================================================
-   * Gettors and settors
-   * ======================================================================*/
-
-  public void setVersion(String version)
-  {
-    _version = version;
-  }
-
-  public void setName(String name)
-  {
-    _name = name;
-  }
-
-  public void setPrefix(String prefix)
-  {
-    _prefix = prefix;
-  }
-
-  public void setURI(String uri)
-  {
-    _uri = uri;
-  }
-
-  public void setJspVersion(String jspVersion)
-  {
-    _jspVersion = jspVersion;
-  }
-
-  public String getVersion()
-  {
-    return _version == null? "" : _version;
-  }
-
-  public String getName()
-  {
-    return _name == null? "" : _name;
-  }
-
-  public String getPrefix()
-  {
-    return _prefix == null? "" : _prefix;
-  }
-
-  public String getURI()
-  {
-    return _uri == null? "" : _uri;
-  }
-
-  public String getJspVersion()
-  {
-    return _jspVersion == null? "" : _jspVersion;
-  }
-
-
-  /**
-    * Find all the TLD nodes we want, get each node's value
-    * and set the value on the proper class property.
-    * 
-    * @param document  - DOM Document from the TLD file
-    */  
-  private void _processTldNodes(Document document)
-  {
-    Node node = null;
-    
-    // Get the Nodes first node.  We can be specific here
-    // because we know we want the first node.
-    NodeList nodeList = document.getElementsByTagName(_TLIB_VERSION);
-    if (nodeList != null && nodeList.getLength() != 0)
-    {
-      node = nodeList.item(0);
-      setVersion(node.getFirstChild().getNodeValue());
-    }
-
-    nodeList = document.getElementsByTagName(_JSP_VERSION);
-    if (nodeList != null && nodeList.getLength() != 0)
-    {
-      node = nodeList.item(0);
-      setJspVersion(node.getFirstChild().getNodeValue());
-    }
-
-    // Must go before _DISPLAY_NAME
-    nodeList = document.getElementsByTagName(_SHORT_NAME);
-    if (nodeList != null && nodeList.getLength() != 0)
-    {
-      node = nodeList.item(0);
-      setPrefix(node.getFirstChild().getNodeValue());
-    }
-
-    // Must go after _SHORT_NAME
-    nodeList = document.getElementsByTagName(_DISPLAY_NAME);
-    if (nodeList != null && nodeList.getLength() != 0)
-    {
-      node = nodeList.item(0);
-      setName(node.getFirstChild().getNodeValue());
-    }
-    else
-    {
-      setName(getPrefix());
-    }
-
-    nodeList = document.getElementsByTagName(_URI);
-    if (nodeList != null && nodeList.getLength() != 0)
-    {
-      node = nodeList.item(0);
-      setURI(node.getFirstChild().getNodeValue());
-    }
-  }
-  
-  //========================================================================
-  // Private variables
-  //========================================================================
-  
-  private String _version    = null; // tlib-version
-  private String _name       = null; // display-name
-  private String _prefix     = null; // short-name
-  private String _jspVersion = null; // jsp-version
-  private String _uri        = null; // uri
- 
-  private final static String _TLIB_VERSION = "tlib-version"; //version NOTRANS
-  private final static String _DISPLAY_NAME = "display-name"; //name NOTRANS
-  private final static String _SHORT_NAME   = "short-name";   //prefix NOTRANS
-  private final static String _JSP_VERSION  = "jsp-version";   //NOTRANS
-  private final static String _URI          = "uri";
-} // endclass TldContentHandler
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  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
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package org.apache.myfaces.buildtools.maven2.plugin.jdeveloper;
+
+import java.io.File;
+import java.io.IOException;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Document;
+
+import org.w3c.dom.Node;
+
+import org.w3c.dom.NodeList;
+
+import org.xml.sax.SAXException;
+
+public class TldContentHandler
+{
+  /**
+    * Content Handler.
+    */
+  public TldContentHandler()
+  {
+  }
+  
+  /**
+    * Parse the .tld file to get the information 
+    * needed for the .jpr
+    */
+  public void parseTld(File file)
+  throws SAXException,
+         IOException,
+         ParserConfigurationException
+  {
+    // Create a builder factory
+    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+    factory.setValidating(false);
+    
+    // Create the Builder and parse the file
+    Document document = factory.newDocumentBuilder().parse(file);
+    
+    _processTldNodes(document);
+  }
+
+  /*=========================================================================
+   * Gettors and settors
+   * ======================================================================*/
+
+  public void setVersion(String version)
+  {
+    _version = version;
+  }
+
+  public void setName(String name)
+  {
+    _name = name;
+  }
+
+  public void setPrefix(String prefix)
+  {
+    _prefix = prefix;
+  }
+
+  public void setURI(String uri)
+  {
+    _uri = uri;
+  }
+
+  public void setJspVersion(String jspVersion)
+  {
+    _jspVersion = jspVersion;
+  }
+
+  public String getVersion()
+  {
+    return _version == null? "" : _version;
+  }
+
+  public String getName()
+  {
+    return _name == null? "" : _name;
+  }
+
+  public String getPrefix()
+  {
+    return _prefix == null? "" : _prefix;
+  }
+
+  public String getURI()
+  {
+    return _uri == null? "" : _uri;
+  }
+
+  public String getJspVersion()
+  {
+    return _jspVersion == null? "" : _jspVersion;
+  }
+
+
+  /**
+    * Find all the TLD nodes we want, get each node's value
+    * and set the value on the proper class property.
+    * 
+    * @param document  - DOM Document from the TLD file
+    */  
+  private void _processTldNodes(Document document)
+  {
+    Node node = null;
+    
+    // Get the Nodes first node.  We can be specific here
+    // because we know we want the first node.
+    NodeList nodeList = document.getElementsByTagName(_TLIB_VERSION);
+    if (nodeList != null && nodeList.getLength() != 0)
+    {
+      node = nodeList.item(0);
+      setVersion(node.getFirstChild().getNodeValue());
+    }
+
+    nodeList = document.getElementsByTagName(_JSP_VERSION);
+    if (nodeList != null && nodeList.getLength() != 0)
+    {
+      node = nodeList.item(0);
+      setJspVersion(node.getFirstChild().getNodeValue());
+    }
+
+    // Must go before _DISPLAY_NAME
+    nodeList = document.getElementsByTagName(_SHORT_NAME);
+    if (nodeList != null && nodeList.getLength() != 0)
+    {
+      node = nodeList.item(0);
+      setPrefix(node.getFirstChild().getNodeValue());
+    }
+
+    // Must go after _SHORT_NAME
+    nodeList = document.getElementsByTagName(_DISPLAY_NAME);
+    if (nodeList != null && nodeList.getLength() != 0)
+    {
+      node = nodeList.item(0);
+      setName(node.getFirstChild().getNodeValue());
+    }
+    else
+    {
+      setName(getPrefix());
+    }
+
+    nodeList = document.getElementsByTagName(_URI);
+    if (nodeList != null && nodeList.getLength() != 0)
+    {
+      node = nodeList.item(0);
+      setURI(node.getFirstChild().getNodeValue());
+    }
+  }
+  
+  //========================================================================
+  // Private variables
+  //========================================================================
+  
+  private String _version    = null; // tlib-version
+  private String _name       = null; // display-name
+  private String _prefix     = null; // short-name
+  private String _jspVersion = null; // jsp-version
+  private String _uri        = null; // uri
+ 
+  private final static String _TLIB_VERSION = "tlib-version"; //version NOTRANS
+  private final static String _DISPLAY_NAME = "display-name"; //name NOTRANS
+  private final static String _SHORT_NAME   = "short-name";   //prefix NOTRANS
+  private final static String _JSP_VERSION  = "jsp-version";   //NOTRANS
+  private final static String _URI          = "uri";
+} // endclass TldContentHandler

Propchange: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-jdev-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/jdeveloper/TldContentHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native