diff options
author | wisberg <wisberg> | 2004-03-08 19:13:03 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2004-03-08 19:13:03 +0000 |
commit | 92d0049be5785ab552e40ffc6a07fa5568fc18b4 (patch) | |
tree | d3d0cf6be5b28e0e81af07a098f7860a4900842d /testing | |
parent | 70cc1bb27f1e13d8f7bcbb98a691ee37633791e6 (diff) | |
download | aspectj-92d0049be5785ab552e40ffc6a07fa5568fc18b4.tar.gz aspectj-92d0049be5785ab552e40ffc6a07fa5568fc18b4.zip |
-xlintfile option support
Diffstat (limited to 'testing')
-rw-r--r-- | testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java b/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java index 084c17c7a..9241d103e 100644 --- a/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java +++ b/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java @@ -229,13 +229,17 @@ public class CompilerRun implements IAjcRun { FileUtil.getBaseDirFiles(testBaseSrcDir, spec.extdirs); final File[] classFiles = FileUtil.getBaseDirFiles(testBaseSrcDir, spec.classpath); + final File[] xlintFiles = (null == spec.xlintfile ? new File[0] + : FileUtil.getBaseDirFiles(testBaseSrcDir, new String[] {spec.xlintfile})); + // hmm - duplicates validation above, verifying getBaseDirFiles? if (!spec.badInput) { if (!validator.canRead(argFiles, "argFiles") || !validator.canRead(injarFiles, "injarFiles") || !validator.canRead(inpathFiles, "inpathFiles") || !validator.canRead(aspectFiles, "aspectFiles") - || !validator.canRead(classFiles, "classFiles")) { + || !validator.canRead(classFiles, "classFiles") + || !validator.canRead(xlintFiles, "xlintFiles")) { return false; } } @@ -277,12 +281,12 @@ public class CompilerRun implements IAjcRun { spec.sourceroots, sandbox.stagingDir); // delete incremental files in sourceroot after copying // XXX inefficient + // an incremental file has an extra "." in name + // most .java files don't, because they are named after + // the principle type they contain, and simple type names + // have no dots. FileFilter pickIncFiles = new FileFilter() { - // an incremental file has an extra "." in name - // most .java files don't, because they are named after - // the principle type they contain, and simple type names - // have no dots. - public boolean accept(File file) { + public boolean accept(File file) { if (file.isDirectory()) { // continue recursion return true; @@ -327,6 +331,11 @@ public class CompilerRun implements IAjcRun { } arguments.clear(); + if (!LangUtil.isEmpty(xlintFiles)) { + arguments.add("-Xlintfile"); + String sr = FileUtil.flatten(xlintFiles, null); + arguments.add(sr); + } if (!LangUtil.isEmpty(extdirFiles)) { arguments.add("-extdirs"); String sr = FileUtil.flatten(extdirFiles, null); @@ -718,6 +727,7 @@ public class CompilerRun implements IAjcRun { /** src path = {suiteParentDir}/{testBaseDirOffset}/{testSrcDirOffset}/{path} */ protected String testSrcDirOffset; + protected String xlintfile; public Spec() { super(XMLNAME); @@ -816,6 +826,9 @@ public class CompilerRun implements IAjcRun { sourceroots = XMLWriter.unflattenList(dirs); } } + public void setXlintfile(String path) { + xlintfile = path; + } /** * Set extension dirs, deleting any old ones |