myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1197294 [2/2] - in /myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder: ./ qdox/
Date Thu, 03 Nov 2011 20:02:31 GMT
Modified: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/qdox/QdoxHelper.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/qdox/QdoxHelper.java?rev=1197294&r1=1197293&r2=1197294&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/qdox/QdoxHelper.java
(original)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/qdox/QdoxHelper.java
Thu Nov  3 20:02:30 2011
@@ -332,13 +332,14 @@ public class QdoxHelper
         return value;
     }
     
+    @Deprecated
     public static void addFileToJavaDocBuilder(JavaDocBuilder builder,
             FileSelector selector, File path)
     {
         addFileToJavaDocBuilder(builder,selector, path, path.getPath());
     }
     
-    
+    @Deprecated
     public static void addFileToJavaDocBuilder(JavaDocBuilder builder,
             FileSelector selector, File path, String basePath)
     {
@@ -556,6 +557,15 @@ public class QdoxHelper
         }        
     }
     
+    /**
+     * 
+     * @deprecated use IOUtils.visitSources(ModelParams, JavaSourceVisitor)
+     * @param sourceDirs
+     * @param includes
+     * @param excludes
+     * @return
+     */
+    @Deprecated
     public static JavaClass[] getSourceClasses(List sourceDirs, String includes, String excludes)
     {
         if (StringUtils.isNotEmpty(includes) || 
@@ -569,6 +579,7 @@ public class QdoxHelper
         }
     }
     
+    @Deprecated
     private static JavaClass[] getInnerSourceClasses(List sourceDirs, String includes, String
excludes)
     {
         JavaDocBuilder builder = new JavaDocBuilder();
@@ -601,6 +612,7 @@ public class QdoxHelper
         return builder.getClasses();
     }
 
+    @Deprecated
     private static JavaClass[] getInnerSourceClasses(List sourceDirs)
     {
         JavaDocBuilder builder = new JavaDocBuilder();

Modified: myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/qdox/QdoxModelBuilder.java
URL: http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/qdox/QdoxModelBuilder.java?rev=1197294&r1=1197293&r2=1197294&view=diff
==============================================================================
--- myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/qdox/QdoxModelBuilder.java
(original)
+++ myfaces/myfaces-build-tools/trunk/maven2-plugins/myfaces-builder-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/builder/qdox/QdoxModelBuilder.java
Thu Nov  3 20:02:30 2011
@@ -18,6 +18,8 @@
  */
 package org.apache.myfaces.buildtools.maven2.plugin.builder.qdox;
 
+import java.io.File;
+import java.io.IOException;
 import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -52,6 +54,7 @@ import org.apache.myfaces.buildtools.mav
 import org.apache.myfaces.buildtools.maven2.plugin.builder.qdox.parse.WebConfigParamParsingStrategy;
 import org.apache.myfaces.buildtools.maven2.plugin.builder.trinidad.TrinidadMavenFacesPluginModelBuilder;
 
+import com.thoughtworks.qdox.JavaDocBuilder;
 import com.thoughtworks.qdox.model.JavaClass;
 
 /**
@@ -79,8 +82,18 @@ public class QdoxModelBuilder implements
         {
             throw new MojoExecutionException("Model must have id set");
         }
-        JavaClass[] classes = QdoxHelper.getSourceClasses(parameters.getSourceDirs(), 
-                parameters.getIncludes(), parameters.getExcludes());
+        
+        final JavaDocBuilder builder = new JavaDocBuilder();
+        IOUtils.visitSources(parameters, new IOUtils.SourceVisitor()
+        {
+            public void processSource(File file) throws IOException
+            {
+                builder.addSource(file);
+            }
+            
+        });
+        JavaClass[] classes = builder.getClasses();
+
         buildModel(model, parameters.getSourceDirs(), classes);
         CompositeComponentModelBuilder qccmb = new CompositeComponentModelBuilder();
         qccmb.buildModel(model, parameters);



Mime
View raw message