myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r929446 - in /myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt: component1.1.stg component1.2.stg component2.0.stg
Date Wed, 31 Mar 2010 09:42:14 GMT
Author: lofwyr
Date: Wed Mar 31 09:42:14 2010
New Revision: 929446

URL: http://svn.apache.org/viewvc?rev=929446&view=rev
Log:
TOBAGO-836: Error logs, when using deprecated attributes.

Modified:
    myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.1.stg
    myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.2.stg
    myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component2.0.stg

Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.1.stg
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.1.stg?rev=929446&r1=929445&r2=929446&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.1.stg
(original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.1.stg
Wed Mar 31 09:42:14 2010
@@ -42,6 +42,7 @@ package <componentInfo.packageName>;
 <componentInfo.imports:import(); separator="\n">
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.lang.StringUtils;
+import org.apache.myfaces.tobago.internal.util.Deprecation;
 import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
 import org.apache.myfaces.tobago.renderkit.SpacingValues;
 import java.util.ArrayList;
@@ -250,6 +251,13 @@ checkDeprecated(property) ::= <<
 <endif>
 >>
 
+logDeprecated(property) ::= <<
+<if(property.deprecated)>
+  Deprecation.LOG.error("The attribute '<property.propertyName>' of '<componentInfo.className>'
is deprecated. "
+      + "Please refer the documentation for further information.");
+<endif>
+>>
+
 allowedValue() ::= <<
 <it>
 >>
@@ -257,6 +265,7 @@ allowedValue() ::= <<
 IntegerProperty(property) ::= <<
 
 <createDescription(property)>
+<checkDeprecated(property)>
 public <property.type> get<property.upperCamelCaseName>() {
   if (<property.propertyName> != null) {
     return <property.propertyName>;
@@ -277,6 +286,7 @@ public <property.type> get<property.uppe
 
 <checkDeprecated(property)>
 public void set<property.upperCamelCaseName>(<property.type> <property.propertyName>)
{
+  <logDeprecated(property)>
   this.<property.propertyName> = <property.propertyName>;
 }
 >>
@@ -284,6 +294,7 @@ public void set<property.upperCamelCaseN
 ObjectProperty(property) ::= <<
 
 <createDescription(property)>
+<checkDeprecated(property)>
 public <property.type> get<property.upperCamelCaseName>() {
   if (<property.propertyName> != null) {
     return <property.propertyName>;
@@ -297,6 +308,7 @@ public <property.type> get<property.uppe
 
 <checkDeprecated(property)>
 public void set<property.upperCamelCaseName>(<property.type> <property.propertyName>)
{
+  <logDeprecated(property)>
   this.<property.propertyName> = <property.propertyName>;
 }
 >>
@@ -304,6 +316,7 @@ public void set<property.upperCamelCaseN
 StringArrayProperty(property) ::= <<
 
 <createDescription(property)>
+<checkDeprecated(property)>
 public String[] get<property.upperCamelCaseName>() {
   if (<property.propertyName> != null) {
     return <property.propertyName>;
@@ -333,6 +346,7 @@ public String[] get<property.upperCamelC
 
 <checkDeprecated(property)>
 public void set<property.upperCamelCaseName>(String[] <property.propertyName>)
{
+  <logDeprecated(property)>
   this.<property.propertyName> = <property.propertyName>;
 }
 >>
@@ -340,6 +354,7 @@ public void set<property.upperCamelCaseN
 booleanProperty(property) ::= <<
 
 <createDescription(property)>
+<checkDeprecated(property)>
 public boolean is<property.upperCamelCaseName>() {
   if (<property.propertyName> != null) {
     return <property.propertyName>;
@@ -360,6 +375,7 @@ public boolean is<property.upperCamelCas
 
 <checkDeprecated(property)>
 public void set<property.upperCamelCaseName>(boolean <property.propertyName>)
{
+  <logDeprecated(property)>
   this.<property.propertyName> = <property.propertyName>;
 }
 >>
@@ -367,6 +383,7 @@ public void set<property.upperCamelCaseN
 BooleanProperty(property) ::= <<
 
 <createDescription(property)>
+<checkDeprecated(property)>
 public Boolean get<property.upperCamelCaseName>() {
   if (<property.propertyName> != null) {
     return <property.propertyName>;
@@ -387,6 +404,7 @@ public Boolean get<property.upperCamelCa
 
 <checkDeprecated(property)>
 public void set<property.upperCamelCaseName>(Boolean <property.propertyName>)
{
+  <logDeprecated(property)>
   this.<property.propertyName> = <property.propertyName>;
 }
 >>
@@ -429,6 +447,7 @@ public void set<property.upperCamelCaseN
 NormalProperty(property) ::= <<
 
 <createDescription(property)>
+<checkDeprecated(property)>
 public <property.type> get<property.upperCamelCaseName>() {
   if (<property.propertyName> != null) {
     return <property.propertyName>;
@@ -459,7 +478,8 @@ public void set<property.upperCamelCaseN
 MeasureProperty(property) ::= <<
 
 <createDescription(property)>
-public Measure get<property.upperCamelCaseName>() {
+<checkDeprecated(property)>
+public <property.type> get<property.upperCamelCaseName>() {
   if (<property.propertyName> != null) {
     return <property.propertyName>;
   }

Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.2.stg
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.2.stg?rev=929446&r1=929445&r2=929446&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.2.stg
(original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component1.2.stg
Wed Mar 31 09:42:14 2010
@@ -44,6 +44,7 @@ import org.apache.commons.lang.ArrayUtil
 import org.apache.commons.lang.StringUtils;
 import org.apache.myfaces.tobago.component.MethodBindingToMethodExpression;
 import org.apache.myfaces.tobago.component.MethodExpressionToMethodBinding;
+import org.apache.myfaces.tobago.internal.util.Deprecation;
 import org.apache.myfaces.tobago.renderkit.SpacingValues;
 import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
 import javax.el.ELException;
@@ -144,6 +145,13 @@ checkDeprecated(property) ::= <<
 <endif>
 >>
 
+logDeprecated(property) ::= <<
+<if(property.deprecated)>
+  Deprecation.LOG.error("The attribute '<property.propertyName>' of '<componentInfo.className>'
is deprecated. "
+      + "Please refer the documentation for further information."); 
+<endif>
+>>
+
 allowedValue() ::= <<
 <it>
 >>
@@ -176,6 +184,7 @@ public <property.type> get<property.uppe
 
 <checkDeprecated(property)>
 public void set<property.upperCamelCaseName>(<property.type> <property.propertyName>)
{
+  <logDeprecated(property)>
   this.<property.propertyName> = <property.propertyName>;
 }
 >>
@@ -201,6 +210,7 @@ public <property.type> get<property.uppe
 
 <checkDeprecated(property)>
 public void set<property.upperCamelCaseName>(<property.type> <property.propertyName>)
{
+  <logDeprecated(property)>
   this.<property.propertyName> = <property.propertyName>;
 }
 >>
@@ -242,6 +252,7 @@ public String[] get<property.upperCamelC
 
 <checkDeprecated(property)>
 public void set<property.upperCamelCaseName>(String[] <property.propertyName>)
{
+  <logDeprecated(property)>
   this.<property.propertyName> = <property.propertyName>;
 }
 >>
@@ -274,6 +285,7 @@ public boolean is<property.upperCamelCas
 
 <checkDeprecated(property)>
 public void set<property.upperCamelCaseName>(boolean <property.propertyName>)
{
+  <logDeprecated(property)>
   this.<property.propertyName> = <property.propertyName>;
 }
 >>
@@ -306,6 +318,7 @@ public Boolean get<property.upperCamelCa
 
 <checkDeprecated(property)>
 public void set<property.upperCamelCaseName>(Boolean <property.propertyName>)
{
+  <logDeprecated(property)>
   this.<property.propertyName> = <property.propertyName>;
 }
 >>

Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component2.0.stg
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component2.0.stg?rev=929446&r1=929445&r2=929446&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component2.0.stg
(original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component2.0.stg
Wed Mar 31 09:42:14 2010
@@ -44,6 +44,7 @@ import org.apache.commons.lang.ArrayUtil
 import org.apache.commons.lang.StringUtils;
 import org.apache.myfaces.tobago.component.MethodBindingToMethodExpression;
 import org.apache.myfaces.tobago.component.MethodExpressionToMethodBinding;
+import org.apache.myfaces.tobago.internal.util.Deprecation;
 import org.apache.myfaces.tobago.renderkit.SpacingValues;
 import org.apache.myfaces.tobago.renderkit.LayoutComponentRenderer;
 import javax.el.ELException;
@@ -134,6 +135,13 @@ checkDeprecated(property) ::= <<
 <endif>
 >>
 
+logDeprecated(property) ::= <<
+<if(property.deprecated)>
+  Deprecation.LOG.error("The attribute '<property.propertyName>' of '<componentInfo.className>'
is deprecated. "
+      + "Please refer the documentation for further information.");
+<endif>
+>>
+
 allowedValue() ::= <<
 <it>
 >>
@@ -156,6 +164,7 @@ public <property.type> get<property.uppe
 
 <checkDeprecated(property)>
 public void set<property.upperCamelCaseName>(<property.type> <property.propertyName>)
{
+  <logDeprecated(property)>
   getStateHelper().put(PropertyKeys.<property.propertyName>, <property.propertyName>);
 }
 >>
@@ -170,6 +179,7 @@ public <property.type> get<property.uppe
 
 <checkDeprecated(property)>
 public void set<property.upperCamelCaseName>(<property.type> <property.propertyName>)
{
+  <logDeprecated(property)>
   getStateHelper().put(PropertyKeys.<property.propertyName>, <property.propertyName>);
 }
 >>
@@ -203,6 +213,7 @@ public String[] get<property.upperCamelC
 
 <checkDeprecated(property)>
 public void set<property.upperCamelCaseName>(String[] <property.propertyName>)
{
+  <logDeprecated(property)>
   getStateHelper().put(PropertyKeys.<property.propertyName>, <property.propertyName>);
 }
 >>
@@ -225,6 +236,7 @@ public boolean is<property.upperCamelCas
 
 <checkDeprecated(property)>
 public void set<property.upperCamelCaseName>(boolean <property.propertyName>)
{
+  <logDeprecated(property)>
   getStateHelper().put(PropertyKeys.<property.propertyName>, <property.propertyName>);
 }
 >>
@@ -247,6 +259,7 @@ public Boolean get<property.upperCamelCa
 
 <checkDeprecated(property)>
 public void set<property.upperCamelCaseName>(Boolean <property.propertyName>)
{
+  <logDeprecated(property)>
   getStateHelper().put(PropertyKeys.<property.propertyName>, <property.propertyName>);
 }
 >>



Mime
View raw message