axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r561863 - /webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/JavaPrettyPrinterExtension.java
Date Wed, 01 Aug 2007 16:31:44 GMT
Author: dims
Date: Wed Aug  1 09:31:42 2007
New Revision: 561863

URL: http://svn.apache.org/viewvc?view=rev&rev=561863
Log:
fix broken support for prettifying the wsdl2java generated java code. svn revision 557218
totally broke this support as it assumed that the base classes's prettify was called only
for xml files

Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/JavaPrettyPrinterExtension.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/JavaPrettyPrinterExtension.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/JavaPrettyPrinterExtension.java?view=diff&rev=561863&r1=561862&r2=561863
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/JavaPrettyPrinterExtension.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/extension/JavaPrettyPrinterExtension.java
Wed Aug  1 09:31:42 2007
@@ -19,6 +19,7 @@
 package org.apache.axis2.wsdl.codegen.extension;
 
 import org.apache.axis2.util.PrettyPrinter;
+import org.apache.axis2.wsdl.codegen.CodeGenConfiguration;
 
 import java.io.File;
 
@@ -31,6 +32,24 @@
         * well !!!
         */
         fileExtension = ".java";
+    }
+
+    /**
+     * Recursive procedure to prettify the files
+     *
+     * @param file
+     */
+    protected void prettify(File file, CodeGenConfiguration configuration) {
+        if (file.isFile() &&
+                file.exists() &&
+                file.getName().toLowerCase().endsWith(fileExtension)) {
+            prettifyFile(file);
+        } else if (file.isDirectory()) {
+            File[] childFiles = file.listFiles();
+            for (int i = 0; i < childFiles.length; i++) {
+                prettify(childFiles[i], configuration);
+            }
+        }
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message