diff options
author | Andy Clement <aclement@gopivotal.com> | 2014-08-20 08:00:10 -0700 |
---|---|---|
committer | Andy Clement <aclement@gopivotal.com> | 2014-08-20 08:00:10 -0700 |
commit | 1e2744d37cd2ac3438f8f1e6b8aae7c4a6c6b8d6 (patch) | |
tree | 5516c617e821bc56fb2e77a64553fcfc69e3794c /ajde.core | |
parent | 1da68158a802f47b42194dcb040be47526703ed6 (diff) | |
download | aspectj-1e2744d37cd2ac3438f8f1e6b8aae7c4a6c6b8d6.tar.gz aspectj-1e2744d37cd2ac3438f8f1e6b8aae7c4a6c6b8d6.zip |
enabling AJDT to use annotation processors
Diffstat (limited to 'ajde.core')
3 files changed, 31 insertions, 0 deletions
diff --git a/ajde.core/src/org/aspectj/ajde/core/ICompilerConfiguration.java b/ajde.core/src/org/aspectj/ajde/core/ICompilerConfiguration.java index aa389f052..b9684aa09 100644 --- a/ajde.core/src/org/aspectj/ajde/core/ICompilerConfiguration.java +++ b/ajde.core/src/org/aspectj/ajde/core/ICompilerConfiguration.java @@ -135,4 +135,14 @@ public interface ICompilerConfiguration extends CompilerConfigurationChangeFlags */ public String getProjectEncoding(); + /** + * @return the list of processor classes to execute + */ + public String getProcessor(); + + /** + * @return the processor path where the specified processor(s) can be found + */ + public String getProcessorPath(); + } 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 267ac9329..531e9b01d 100644 --- a/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java +++ b/ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java @@ -226,6 +226,17 @@ public class AjdeCoreBuildManager { if (l == null) { return null; } + // If the processor options are specified build the command line options for the JDT compiler to see + String processor = compilerConfig.getProcessor(); + if (processor != null && processor.length() != 0) { + l.add("-processor"); + l.add(processor); + } + String processorPath = compilerConfig.getProcessorPath(); + if (processorPath != null && processorPath.length() != 0) { + l.add("-processorpath"); + l.add(processorPath); + } List<String> xmlfiles = compilerConfig.getProjectXmlConfigFiles(); if (xmlfiles != null && !xmlfiles.isEmpty()) { args = new String[l.size() + xmlfiles.size() + 1]; @@ -331,6 +342,8 @@ public class AjdeCoreBuildManager { config.setProceedOnError(true); config.setProjectEncoding(compilerConfig.getProjectEncoding()); + config.setProcessor(compilerConfig.getProcessor()); + config.setProcessorPath(compilerConfig.getProcessorPath()); return config; } diff --git a/ajde.core/testsrc/org/aspectj/ajde/core/TestCompilerConfiguration.java b/ajde.core/testsrc/org/aspectj/ajde/core/TestCompilerConfiguration.java index 921591c97..1070da969 100644 --- a/ajde.core/testsrc/org/aspectj/ajde/core/TestCompilerConfiguration.java +++ b/ajde.core/testsrc/org/aspectj/ajde/core/TestCompilerConfiguration.java @@ -171,4 +171,12 @@ public class TestCompilerConfiguration implements ICompilerConfiguration { return null; } + public String getProcessor() { + return null; + } + + public String getProcessorPath() { + return null; + } + } |