From: aclement Date: Tue, 26 Oct 2010 19:25:25 +0000 (+0000) Subject: 328649: addDependencies for Compilation Participants X-Git-Tag: V1_6_11M1~52 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ac595a6c0ecaae84fe38cdf7eb1e7104c45fe79d;p=aspectj.git 328649: addDependencies for Compilation Participants --- 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) {