diff --git a/idea/src/org/jetbrains/jet/plugin/project/AnalyzerFacadeWithCache.java b/idea/src/org/jetbrains/jet/plugin/project/AnalyzerFacadeWithCache.java index 4d9a2d1e0fb..b380d81f7db 100644 --- a/idea/src/org/jetbrains/jet/plugin/project/AnalyzerFacadeWithCache.java +++ b/idea/src/org/jetbrains/jet/plugin/project/AnalyzerFacadeWithCache.java @@ -84,8 +84,7 @@ public final class AnalyzerFacadeWithCache { // System.out.println("===============ReCache - In-Block=============="); // Collect context for headers first - Collection allFilesToAnalyze = declarationProvider.fun(file); - AnalyzeExhaust analyzeExhaustHeaders = analyzeHeadersWithCacheOnFile(file, allFilesToAnalyze); + AnalyzeExhaust analyzeExhaustHeaders = analyzeHeadersWithCacheOnFile(file, declarationProvider); BodiesResolveContext context = analyzeExhaustHeaders.getBodiesResolveContext(); assert context != null : "Headers resolver should prepare and stored information for bodies resolve"; @@ -125,8 +124,10 @@ public final class AnalyzerFacadeWithCache { } } - private static AnalyzeExhaust analyzeHeadersWithCacheOnFile(@NotNull final JetFile fileToCache, - @NotNull final Collection headerFiles) { + private static AnalyzeExhaust analyzeHeadersWithCacheOnFile( + @NotNull final JetFile fileToCache, + @NotNull final Function> declarationProvider + ) { CachedValue bindingContextCachedValue = fileToCache.getUserData(ANALYZE_EXHAUST_HEADERS); if (bindingContextCachedValue == null) { bindingContextCachedValue = @@ -136,7 +137,7 @@ public final class AnalyzerFacadeWithCache { // System.out.println("===============ReCache - OUT-OF-BLOCK=============="); AnalyzeExhaust exhaust = AnalyzerFacadeProvider.getAnalyzerFacadeForFile(fileToCache) .analyzeFiles(fileToCache.getProject(), - headerFiles, + declarationProvider.fun(fileToCache), Collections.emptyList(), Predicates.alwaysFalse());