aboutsummaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authoraclement <aclement>2010-10-26 19:25:25 +0000
committeraclement <aclement>2010-10-26 19:25:25 +0000
commitac595a6c0ecaae84fe38cdf7eb1e7104c45fe79d (patch)
tree59ddd504a9136bad06e638a781b5fc6ddfc3f005 /org.aspectj.ajdt.core
parent9ab4df758611740cb2f20467a80a6a66e7e5228a (diff)
downloadaspectj-ac595a6c0ecaae84fe38cdf7eb1e7104c45fe79d.tar.gz
aspectj-ac595a6c0ecaae84fe38cdf7eb1e7104c45fe79d.zip
328649: addDependencies for Compilation Participants
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java23
1 files changed, 16 insertions, 7 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
index 6bad99f3b..dc9b4f4af 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java
@@ -1920,14 +1920,23 @@ public class AjState implements CompilerConfigurationChangeFlags, TypeDelegateRe
* need to recompile the file named in the CompilationResult. This method patches that information into the existing data
* structures.
*/
- public void recordDependencies(CompilationResult result, String[] typeNameDependencies) {
- File sourceFile = new File(new String(result.fileName));
- ReferenceCollection existingCollection = references.get(sourceFile);
- if (existingCollection != null) {
- existingCollection.addDependencies(typeNameDependencies);
- } else {
- references.put(sourceFile, new ReferenceCollection(result.qualifiedReferences, result.simpleNameReferences));
+ public boolean recordDependencies(File file, String[] typeNameDependencies) {
+ try {
+ File sourceFile = new File(new String(file.getCanonicalPath()));
+ ReferenceCollection existingCollection = references.get(sourceFile);
+ if (existingCollection != null) {
+ existingCollection.addDependencies(typeNameDependencies);
+ return true;
+ } else {
+ ReferenceCollection rc = new ReferenceCollection(null, null);
+ rc.addDependencies(typeNameDependencies);
+ references.put(sourceFile, rc);
+ return true;
+ }
+ } catch (IOException ioe) {
+ ioe.printStackTrace();
}
+ return false;
}
protected void addDependentsOf(File sourceFile) {