From 1c6db5d4f24f6ddaee4c48661503a8b7ea516744 Mon Sep 17 00:00:00 2001 From: acolyer Date: Tue, 11 Nov 2003 13:09:14 +0000 Subject: [PATCH] Andy Clement's patch for enh 46347: "-inpath" --- .../tools/ajbrowser/BrowserProperties.java | 4 + .../ajde/ProjectPropertiesAdapter.java | 8 + .../ajde/internal/AspectJBuildManager.java | 1 + .../ajde/internal/CompilerAdapter.java | 5 +- ajde/testdata/InpathTest/.cvsignore | 3 + ajde/testdata/InpathTest/build.lst | 1 + ajde/testdata/InpathTest/build2.lst | 1 + .../InpathTest/indir1/META-INF/MANIFEST.MF | 3 + .../InpathTest/indir1/META-INF/test.xml | 4 + .../indir1/test/TestProperties.class | Bin 0 -> 943 bytes .../InpathTest/indir1/test/test.props | 1 + .../indir2/example/HelloWorld.class | Bin 0 -> 496 bytes .../InpathTest/indir2/example/HelloWorld.java | 12 + ajde/testdata/InpathTest/injar.jar | Bin 0 -> 282 bytes ajde/testdata/InpathTest/src1/Main.java | 22 + ajde/testdata/InpathTest/src2/Aspect.java | 7 + ajde/testsrc/org/aspectj/ajde/AjdeTests.java | 1 + .../org/aspectj/ajde/InpathTestcase.java | 461 ++++++++++++++++++ .../org/aspectj/ajde/NullIdeProperties.java | 7 + .../org/aspectj/ajdt/ajc/BuildArgParser.java | 28 ++ .../org/aspectj/ajdt/ajc/messages.properties | 2 + .../internal/core/builder/AjBuildConfig.java | 19 +- .../internal/core/builder/AjBuildManager.java | 7 +- .../core/builder/AjCompilerOptions.java | 1 + .../aspectj/tools/ant/taskdefs/AjcTask.java | 29 +- .../aspectj/testing/ajde/CompileCommand.java | 3 + .../harness/bridge/AjcMessageHandler.java | 9 +- util/src/org/aspectj/util/FileUtil.java | 2 +- .../org/aspectj/weaver/bcel/BcelWeaver.java | 114 ++++- .../aspectj/weaver/bcel/ZipFileWeaver.java | 2 +- .../org/aspectj/weaver/bcel/ZipTestCase.java | 4 +- 31 files changed, 722 insertions(+), 39 deletions(-) create mode 100644 ajde/testdata/InpathTest/.cvsignore create mode 100644 ajde/testdata/InpathTest/build.lst create mode 100644 ajde/testdata/InpathTest/build2.lst create mode 100644 ajde/testdata/InpathTest/indir1/META-INF/MANIFEST.MF create mode 100644 ajde/testdata/InpathTest/indir1/META-INF/test.xml create mode 100644 ajde/testdata/InpathTest/indir1/test/TestProperties.class create mode 100644 ajde/testdata/InpathTest/indir1/test/test.props create mode 100644 ajde/testdata/InpathTest/indir2/example/HelloWorld.class create mode 100644 ajde/testdata/InpathTest/indir2/example/HelloWorld.java create mode 100644 ajde/testdata/InpathTest/injar.jar create mode 100644 ajde/testdata/InpathTest/src1/Main.java create mode 100644 ajde/testdata/InpathTest/src2/Aspect.java create mode 100644 ajde/testsrc/org/aspectj/ajde/InpathTestcase.java diff --git a/ajbrowser/src/org/aspectj/tools/ajbrowser/BrowserProperties.java b/ajbrowser/src/org/aspectj/tools/ajbrowser/BrowserProperties.java index 8d0d2cf8e..821c259e1 100644 --- a/ajbrowser/src/org/aspectj/tools/ajbrowser/BrowserProperties.java +++ b/ajbrowser/src/org/aspectj/tools/ajbrowser/BrowserProperties.java @@ -150,6 +150,10 @@ public class BrowserProperties implements ProjectPropertiesAdapter { return null; } + public Set getInpath() { + return null; + } + public String getOutJar( ) { // XXX unimplemented return null; } diff --git a/ajde/src/org/aspectj/ajde/ProjectPropertiesAdapter.java b/ajde/src/org/aspectj/ajde/ProjectPropertiesAdapter.java index 2934932ee..6ba8134bb 100644 --- a/ajde/src/org/aspectj/ajde/ProjectPropertiesAdapter.java +++ b/ajde/src/org/aspectj/ajde/ProjectPropertiesAdapter.java @@ -68,6 +68,14 @@ public interface ProjectPropertiesAdapter { */ public Set getInJars(); + /** + * Get the set of input path elements for this compilation. + * Set members should be of the type java.io.File. + * An empty set or null is acceptable for this option. + * From -injars + */ + public Set getInpath(); + /** * Get the set of non-Java resources for this compilation. * Set members should be of type java.io.File. diff --git a/ajde/src/org/aspectj/ajde/internal/AspectJBuildManager.java b/ajde/src/org/aspectj/ajde/internal/AspectJBuildManager.java index 84e0bb8ec..8006af593 100644 --- a/ajde/src/org/aspectj/ajde/internal/AspectJBuildManager.java +++ b/ajde/src/org/aspectj/ajde/internal/AspectJBuildManager.java @@ -188,6 +188,7 @@ public class AspectJBuildManager implements BuildManager { + "\n-> classpath: " + properties.getClasspath() + "\n-> bootclasspath: " + properties.getBootClasspath() + "\n-> -injars " + formatSet(properties.getInJars()) + + "\n-> -inpath " + formatSet(properties.getInpath()) + "\n-> -outjar " + formatOptionalString(properties.getOutJar()) + "\n-> -sourceroots " + formatSet(properties.getSourceRoots()) + "\n-> -aspectpath " + formatSet(properties.getAspectPath()) diff --git a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java index 9ee5f111e..d7db8e849 100644 --- a/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java +++ b/ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java @@ -451,8 +451,8 @@ public class CompilerAdapter { /** * Add new options from the ProjectPropertiesAdapter to the configuration. *