You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by gb...@apache.org on 2009/05/07 02:36:06 UTC

svn commit: r772477 - in /incubator/pivot/trunk: build.xml wtk/src/pivot/wtkx/BindProcessor.java wtk/src/pivot/wtkx/Bindable.java

Author: gbrown
Date: Thu May  7 00:36:05 2009
New Revision: 772477

URL: http://svn.apache.org/viewvc?rev=772477&view=rev
Log:
Allow Ant script to perform a clean build.

Modified:
    incubator/pivot/trunk/build.xml
    incubator/pivot/trunk/wtk/src/pivot/wtkx/BindProcessor.java
    incubator/pivot/trunk/wtk/src/pivot/wtkx/Bindable.java

Modified: incubator/pivot/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/build.xml?rev=772477&r1=772476&r2=772477&view=diff
==============================================================================
--- incubator/pivot/trunk/build.xml (original)
+++ incubator/pivot/trunk/build.xml Thu May  7 00:36:05 2009
@@ -34,7 +34,7 @@
     <!-- Compiler properties -->
     <property name="compiler.optimize" value="true"/>
     <property name="compiler.deprecation" value="true"/>
-    <property name="compiler.debug" value="false"/>
+    <property name="compiler.debug" value="true"/>
     <property name="compiler.target" value="1.5"/>
     <property name="compiler.encoding" value="UTF-8"/>
 
@@ -374,7 +374,7 @@
             target="${compiler.target}"
             encoding="${compiler.encoding}"
             failonerror="true">
-            <compilerarg line="-Xlint -processor pivot.wtkx.BindProcessor"/>
+            <compilerarg line="-Xlint"/>
             <classpath>
                 <pathelement location="core/${folder.bin}"/>
                 <fileset dir="wtk/lib" includes="**/*.jar"/>

Modified: incubator/pivot/trunk/wtk/src/pivot/wtkx/BindProcessor.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/pivot/wtkx/BindProcessor.java?rev=772477&r1=772476&r2=772477&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/pivot/wtkx/BindProcessor.java (original)
+++ incubator/pivot/trunk/wtk/src/pivot/wtkx/BindProcessor.java Thu May  7 00:36:05 2009
@@ -220,15 +220,17 @@
             super.visitMethodDef(tree);
 
             Element methodElement = tree.sym;
-            Bindable.BindMethod bindMethod = methodElement.getAnnotation(Bindable.BindMethod.class);
+            if (methodElement != null) {
+                Bindable.BindMethod bindMethod = methodElement.getAnnotation(Bindable.BindMethod.class);
 
-            if (bindMethod != null) {
-                // Remove the 'final' flag so that we may extend the method
-                tree.sym.flags_field &= ~Flags.FINAL;
-                tree.mods.flags &= ~Flags.FINAL;
+                if (bindMethod != null) {
+                    // Remove the 'final' flag so that we may extend the method
+                    tree.sym.flags_field &= ~Flags.FINAL;
+                    tree.mods.flags &= ~Flags.FINAL;
 
-                // Clear the method body so that it becomes a no-op
-                tree.body.stats = List.<JCTree.JCStatement>nil();
+                    // Clear the method body so that it becomes a no-op
+                    tree.body.stats = List.<JCTree.JCStatement>nil();
+                }
             }
         }
 

Modified: incubator/pivot/trunk/wtk/src/pivot/wtkx/Bindable.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/pivot/wtkx/Bindable.java?rev=772477&r1=772476&r2=772477&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/pivot/wtkx/Bindable.java (original)
+++ incubator/pivot/trunk/wtk/src/pivot/wtkx/Bindable.java Thu May  7 00:36:05 2009
@@ -81,7 +81,7 @@
      * Applies WTKX binding annotations to this bindable object.
      */
     @BindMethod
-    protected final void bind() throws IOException, BindException {
+    protected void bind() throws IOException, BindException {
         // Walk fields and resolve annotations
         ArrayList<Class<?>> typeHierarchy = new ArrayList<Class<?>>();
         Class<?> type = getClass();