aboutsummaryrefslogtreecommitdiffstats
path: root/ajde.core
diff options
context:
space:
mode:
authoraclement <aclement>2009-03-23 02:28:47 +0000
committeraclement <aclement>2009-03-23 02:28:47 +0000
commit838a7aa6a6551528230b8e6d5d07e9f3bf4c8a94 (patch)
tree40eb6af296aabfe62bdc27fac752c7ac114356bb /ajde.core
parent5c49c0b67a0e88722bf9ea7a8c9e80dce518f067 (diff)
downloadaspectj-838a7aa6a6551528230b8e6d5d07e9f3bf4c8a94.tar.gz
aspectj-838a7aa6a6551528230b8e6d5d07e9f3bf4c8a94.zip
generalize report API to cover resources and outjar
Diffstat (limited to 'ajde.core')
-rw-r--r--ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java23
-rw-r--r--ajde.core/src/org/aspectj/ajde/core/internal/OutputLocationAdapter.java9
2 files changed, 26 insertions, 6 deletions
diff --git a/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java b/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java
index c1b4cad0e..dc8f24b1f 100644
--- a/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java
+++ b/ajde.core/src/org/aspectj/ajde/core/IOutputLocationManager.java
@@ -59,8 +59,27 @@ public interface IOutputLocationManager {
*/
File getDefaultOutputLocation();
- void reportClassFileWrite(String outputfile);
+ /**
+ * Callback from the compiler to indicate that a file has been written to disk, the type of the file (if known) is also
+ * supplied.
+ *
+ * @param outputfile the file that has been written
+ * @param fileType the kind of file from the FILETYPE_XXX constants defined in this type
+ */
+ void reportFileWrite(String outputfile, int fileType);
- void reportClassFileRemove(String outputfile);
+ /**
+ * Callback from the compiler to indicate that a file has been removed from disk, the type of the file (if known) is also
+ * supplied.
+ *
+ * @param file the file that has been written
+ * @param fileType the kind of file from the FILETYPE_XXX constants defined in this type
+ */
+ void reportFileRemove(String file, int fileType);
+ // match numbers in CompilationResultDestinationManager - ought to factor into super interface
+ int FILETYPE_UNKNOWN = 0;
+ int FILETYPE_CLASS = 1;
+ int FILETYPE_OUTJAR = 2;
+ int FILETYPE_RESOURCE = 3;
}
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 3fdb7e16c..65a8aaafd 100644
--- a/ajde.core/src/org/aspectj/ajde/core/internal/OutputLocationAdapter.java
+++ b/ajde.core/src/org/aspectj/ajde/core/internal/OutputLocationAdapter.java
@@ -49,11 +49,12 @@ public class OutputLocationAdapter implements CompilationResultDestinationManage
return this.locationManager.getDefaultOutputLocation();
}
- public void reportClassFileWrite(String outputfile) {
- this.locationManager.reportClassFileWrite(outputfile);
+ public void reportFileWrite(String outputfile, int filetype) {
+ this.locationManager.reportFileWrite(outputfile, filetype);
}
- public void reportClassFileRemove(String outputfile) {
- this.locationManager.reportClassFileRemove(outputfile);
+ public void reportFileRemove(String outputfile, int filetype) {
+ this.locationManager.reportFileRemove(outputfile, filetype);
}
+
}