summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java11
-rw-r--r--ajde.core/src/org/aspectj/ajde/core/internal/OutputLocationAdapter.java4
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);