summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2008-12-10 21:37:09 +0000
committeraclement <aclement>2008-12-10 21:37:09 +0000
commit21f257f764afb74bdf2a1113b082a589c30e5ec9 (patch)
treeed54b13d17f993a3ab90d0412552780cf5a8cd82
parent1c5d4bc331f4273083b547923b122571b8387bfe (diff)
downloadaspectj-21f257f764afb74bdf2a1113b082a589c30e5ec9.tar.gz
aspectj-21f257f764afb74bdf2a1113b082a589c30e5ec9.zip
258325: fix
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/CompilationResultDestinationManager.java59
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java3
2 files changed, 35 insertions, 27 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/CompilationResultDestinationManager.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/CompilationResultDestinationManager.java
index 648114a6a..a49e03f14 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/CompilationResultDestinationManager.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/CompilationResultDestinationManager.java
@@ -16,51 +16,56 @@ import java.util.List;
/**
* acts as a bridge from ajde's OutputLocationManager interface to the compiler internals
+ *
* @author adrian
- *
+ *
*/
public interface CompilationResultDestinationManager {
/**
- * Return the directory root under which the results of compiling the given
- * source file. For example, if the source file contains the type a.b.C, and
- * this method returns "target/classes" the resulting class file will be written
- * to "target/classes/a/b/C.class"
+ * Return the directory root under which the results of compiling the given source file. For example, if the source file
+ * contains the type a.b.C, and this method returns "target/classes" the resulting class file will be written to
+ * "target/classes/a/b/C.class"
*
- * @param compilationUnit the compilation unit that has been
- * compiled
- * @return a File object representing the root directory under which compilation results for this
- * unit should be written
+ * @param compilationUnit the compilation unit that has been compiled
+ * @return a File object representing the root directory under which compilation results for this unit should be written
*/
File getOutputLocationForClass(File compilationUnit);
-
+
/**
- * Return the source folder where this source file came from, relative to the project root.
- * For example 'src' or 'src/main/java' or 'src/test/java'
- * @param sourceFile the file for which the source folder should be determined
- * @return the source folder
- */
- String getSourceFolderForFile(File sourceFile);
-
+ * Return the source folder where this source file came from, relative to the project root. For example 'src' or 'src/main/java'
+ * or 'src/test/java'
+ *
+ * @param sourceFile the file for which the source folder should be determined
+ * @return the source folder
+ */
+ String getSourceFolderForFile(File sourceFile);
+
/**
- * When copying resources from source folders to output location, return the
- * root directory under which the resource should be copied.
+ * When copying resources from source folders to output location, return the root directory under which the resource should be
+ * copied.
*
* @param resource the resource to be copied
- * @return a File object representing the root directory under which this resource
- * should be copied
+ * @return a File object representing the root directory under which this resource should be copied
*/
File getOutputLocationForResource(File resource);
-
+
/**
* Return a list of all output locations handled by this OutputLocationManager
*/
- List /*File*/ getAllOutputLocations();
-
+ List /* File */getAllOutputLocations();
+
/**
- * Return the default output location (for example, <my_project>/bin). This is
- * where classes which are on the inpath will be placed.
+ * Return the default output location (for example, <my_project>/bin). This is where classes which are on the inpath will be
+ * placed.
*/
File getDefaultOutputLocation();
-
+
+ /**
+ * Report that a class file is being written to the specified location.
+ *
+ * @param outputfile the output file (including .class suffix)
+ */
+ void reportClassFileWrite(String outputfile);
+
}
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
index 771528dc6..494880666 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java
@@ -1077,6 +1077,9 @@ public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySour
} else {
outFile = new File(destinationPath, filename).getPath();
}
+ if (buildConfig.getCompilationResultDestinationManager() != null) {
+ buildConfig.getCompilationResultDestinationManager().reportClassFileWrite(outFile);
+ }
BufferedOutputStream os = FileUtil.makeOutputStream(new File(outFile));
os.write(classFile.getBytes());
os.close();