From e1ceb70b99f1d6eb91ebdb177e24b4ba57ce8570 Mon Sep 17 00:00:00 2001 From: wisberg Date: Fri, 9 May 2003 23:03:36 +0000 Subject: [PATCH] includeClassesDir --- .../testing/harness/bridge/CompilerRun.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java b/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java index 853a853dc..f659bfb82 100644 --- a/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java +++ b/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java @@ -262,9 +262,13 @@ public class CompilerRun implements IAjcRun { // save classpath and aspectpath in sandbox for this and other clients final boolean checkReadable = true; // hmm - third validation? - File[] cp = new File[2 + classFiles.length]; + int size = spec.includeClassesDir ? 3 : 2; + File[] cp = new File[size + classFiles.length]; System.arraycopy(classFiles, 0, cp, 0, classFiles.length); int index = classFiles.length; + if (spec.includeClassesDir) { + cp[index++] = sandbox.classesDir; + } cp[index++] = Globals.F_aspectjrt_jar; cp[index++] = Globals.F_testingclient_jar; sandbox.setClasspath(cp, checkReadable, this); @@ -495,6 +499,7 @@ public class CompilerRun implements IAjcRun { // use same command - see also IncCompiler.Spec.fresh protected boolean reuseCompiler; + protected boolean includeClassesDir; protected TestSetup testSetup; @@ -512,6 +517,9 @@ public class CompilerRun implements IAjcRun { compiler = DEFAULT_COMPILER; } + public void setIncludeClassesDir(boolean include) { + this.includeClassesDir = include; + } public void setReuseCompiler(boolean reuse) { this.reuseCompiler = reuse; } @@ -989,9 +997,12 @@ public class CompilerRun implements IAjcRun { if (!DEFAULT_COMPILER.equals(compiler)) { out.printAttribute("compiler", compiler); } - if (!reuseCompiler) { + if (reuseCompiler) { out.printAttribute("reuseCompiler", "true"); } + if (includeClassesDir) { + out.printAttribute("includeClassesDir", "true"); + } if (!LangUtil.isEmpty(argfiles)) { out.printAttribute("argfiles", XMLWriter.flattenFiles(argfiles)); } -- 2.39.5