]> source.dussan.org Git - aspectj.git/commitdiff
124460 and refactoring
authoraclement <aclement>
Tue, 15 Sep 2009 19:41:51 +0000 (19:41 +0000)
committeraclement <aclement>
Tue, 15 Sep 2009 19:41:51 +0000 (19:41 +0000)
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java

index e22fc9a851047702e286370b6a1eaa61d9b88ed4..13c9dec93e872a36070f2de7c25dac95a23daaae 100644 (file)
@@ -320,6 +320,7 @@ public class AjcTask extends MatchingTask {
        private Path extdirs;
        private Path aspectpath;
        private Path argfiles;
+       private Path inxmlfiles;
        private List ignored;
        private Path sourceRoots;
        private File xweaveDir;
@@ -390,6 +391,7 @@ public class AjcTask extends MatchingTask {
                adapterArguments = null;
                adapterFiles = new ArrayList();
                argfiles = null;
+               inxmlfiles= null;
                executing = false;
                aspectpath = null;
                bootclasspath = null;
@@ -994,6 +996,21 @@ public class AjcTask extends MatchingTask {
                return argfiles.createPath();
        }
 
+       public void setInxmlref(Reference ref) {
+               createArgfiles().setRefid(ref);
+       }
+
+       public void setInxml(Path path) { // ajc-only eajc-also docDone
+               inxmlfiles = incPath(inxmlfiles, path);
+       }
+
+       public Path createInxml() {
+               if (inxmlfiles == null) {
+                       inxmlfiles = new Path(project);
+               }
+               return inxmlfiles.createPath();
+       }
+
        // ------------------------------ run
 
        /**
@@ -1437,6 +1454,16 @@ public class AjcTask extends MatchingTask {
                                }
                        }
                }
+               if (inxmlfiles != null) {
+                       String[] files = inxmlfiles.list();
+                       for (int i = 0; i < files.length; i++) {
+                               File inxmlfile = project.resolveFile(files[i]);
+                               if (check(inxmlfile, files[i], false, location)) {
+                                       list.add("-xmlConfigured");
+                                       list.add(inxmlfile.getAbsolutePath());
+                               }
+                       }
+               }
                if (srcdir != null) {
                        // todo: ignore any srcdir if any argfiles and no explicit includes
                        String[] dirs = srcdir.list();