From 5456d4c5c0d17dc007751df618156c9a414273f0 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 12 Feb 2009 16:39:27 +0000 Subject: [PATCH] 124460: aop.xml used for compilation: AJDT interface support --- .../ajde/core/ICompilerConfiguration.java | 5 +++++ .../core/internal/AjdeCoreBuildManager.java | 18 ++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/ajde.core/src/org/aspectj/ajde/core/ICompilerConfiguration.java b/ajde.core/src/org/aspectj/ajde/core/ICompilerConfiguration.java index 9438d5cff..9696d3c0c 100644 --- a/ajde.core/src/org/aspectj/ajde/core/ICompilerConfiguration.java +++ b/ajde.core/src/org/aspectj/ajde/core/ICompilerConfiguration.java @@ -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 diff --git a/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java b/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java index 3da5e1e77..774dd7b33 100644 --- a/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java +++ b/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java @@ -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); -- 2.39.5