]> source.dussan.org Git - aspectj.git/commitdiff
124460: aop.xml used for compilation: AJDT interface support
authoraclement <aclement>
Thu, 12 Feb 2009 16:39:27 +0000 (16:39 +0000)
committeraclement <aclement>
Thu, 12 Feb 2009 16:39:27 +0000 (16:39 +0000)
ajde.core/src/org/aspectj/ajde/core/ICompilerConfiguration.java
ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java

index 9438d5cffab1175cbc247c65793989433d49b295..9696d3c0c3c6d432884cc7bf54a4dc0669ac461c 100644 (file)
@@ -45,6 +45,11 @@ public interface ICompilerConfiguration extends CompilerConfigurationChangeFlags
         */
        public List /* String */getProjectSourceFiles();
 
+       /**
+        * @return a list of those files that should be used to configure a build
+        */
+       public List /* String */getProjectXmlConfigFiles();
+
        /**
         * Return a subset of those files we'd get on getProjectSourceFiles() - the subset that have changed since the last build. If
         * someone else has already worked out what needs rebuilding, we don't need to do it again by checking all of the
index 3da5e1e7776ce1173c6f80df9c11d0e84bfc3d3e..774dd7b331b2c939bdb9b392e7a2610bab6ac45e 100644 (file)
@@ -77,7 +77,8 @@ public class AjdeCoreBuildManager {
                // If an incremental build is requested, check that we can
                if (!fullBuild) {
                        AjState existingState = IncrementalStateManager.retrieveStateFor(compiler.getId());
-                       if (existingState == null || existingState.getBuildConfig()==null || ajBuildManager.getState().getBuildConfig() == null) {
+                       if (existingState == null || existingState.getBuildConfig() == null
+                                       || ajBuildManager.getState().getBuildConfig() == null) {
                                // No existing state so we must do a full build
                                fullBuild = true;
                        } else {
@@ -220,7 +221,20 @@ public class AjdeCoreBuildManager {
                        if (l == null) {
                                return null;
                        }
-                       args = (String[]) l.toArray(new String[l.size()]);
+                       List xmlfiles = compilerConfig.getProjectXmlConfigFiles();
+                       if (xmlfiles != null && !xmlfiles.isEmpty()) {
+                               args = new String[l.size() + xmlfiles.size()];
+                               // TODO speedup
+                               int p = 0;
+                               for (int i = 0; i < l.size(); i++) {
+                                       args[p++] = (String) l.get(i);
+                               }
+                               for (int i = 0; i < xmlfiles.size(); i++) {
+                                       args[p++] = (String) xmlfiles.get(i);
+                               }
+                       } else {
+                               args = (String[]) l.toArray(new String[l.size()]);
+                       }
                }
 
                BuildArgParser parser = new BuildArgParser(handler);