]> source.dussan.org Git - aspectj.git/commitdiff
328649
authoraclement <aclement>
Mon, 25 Oct 2010 20:04:54 +0000 (20:04 +0000)
committeraclement <aclement>
Mon, 25 Oct 2010 20:04:54 +0000 (20:04 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjState.java

index 83fca1b0092c6005cef350aab7e683bc55f3153d..6bad99f3b444d2e8d32c41c8230603e9d4a5b95c 100644 (file)
@@ -1915,6 +1915,21 @@ public class AjState implements CompilerConfigurationChangeFlags, TypeDelegateRe
                simpleStrings.add(typeName);
        }
 
+       /**
+        * Record some additional dependencies between types. When any of the types specified in fullyQualifiedTypeNames changes, we
+        * 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));
+               }
+       }
+
        protected void addDependentsOf(File sourceFile) {
                List<ClassFile> cfs = this.fullyQualifiedTypeNamesResultingFromCompilationUnit.get(sourceFile);
                if (cfs != null) {