diff options
author | aclement <aclement> | 2008-09-16 23:24:22 +0000 |
---|---|---|
committer | aclement <aclement> | 2008-09-16 23:24:22 +0000 |
commit | 48d455142d22b73b8f5bf7c3e994736cc762a30f (patch) | |
tree | 7521a136ed404440f797f526939e707fbd3f990f /ajde.core | |
parent | a8b8557f3902c3965f0946e7c1b56fd3dc605f14 (diff) | |
download | aspectj-48d455142d22b73b8f5bf7c3e994736cc762a30f.tar.gz aspectj-48d455142d22b73b8f5bf7c3e994736cc762a30f.zip |
supporting multiple source folders in the model - to ensure handles compatible with JDT
Diffstat (limited to 'ajde.core')
-rw-r--r-- | ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java | 11 | ||||
-rw-r--r-- | ajde.core/src/org/aspectj/ajde/core/internal/OutputLocationAdapter.java | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java b/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java index 7025f44b0..ab76f28fd 100644 --- a/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java +++ b/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java @@ -31,6 +31,16 @@ public interface IOutputLocationManager { * unit should be written */ File getOutputLocationForClass(File compilationUnit); + + /** + * For environments where multiple source folders are supported, they need to be included + * in the model. This method allows AspectJ to determine which source folder a source file + * came from. Example return values would be "src" or "main/java" + * + * @param sourceFile the File object for the source file + * @return the source folder where this file came from, or null if in project root or source folders not supported. + */ + String getSourceFolderForFile(File sourceFile); /** * When copying resources from source folders to output location, return the @@ -52,5 +62,6 @@ public interface IOutputLocationManager { * where classes which are on the inpath will be placed. */ File getDefaultOutputLocation(); + } diff --git a/ajde.core/src/org/aspectj/ajde/core/internal/OutputLocationAdapter.java b/ajde.core/src/org/aspectj/ajde/core/internal/OutputLocationAdapter.java index 95c12daee..decf080d9 100644 --- a/ajde.core/src/org/aspectj/ajde/core/internal/OutputLocationAdapter.java +++ b/ajde.core/src/org/aspectj/ajde/core/internal/OutputLocationAdapter.java @@ -33,6 +33,10 @@ public class OutputLocationAdapter implements CompilationResultDestinationManage public File getOutputLocationForClass(File compilationUnit) { return this.locationManager.getOutputLocationForClass(compilationUnit); } + + public String getSourceFolderForFile(File sourceFile) { + return this.locationManager.getSourceFolderForFile(sourceFile); + } public File getOutputLocationForResource(File resource) { return this.locationManager.getOutputLocationForResource(resource); |