diff --git a/idea/src/org/jetbrains/jet/plugin/caches/resolve/KotlinCacheManager.java b/idea/src/org/jetbrains/jet/plugin/caches/resolve/KotlinCacheManager.java index 8df4b1b92c7..f15ac2c30f6 100644 --- a/idea/src/org/jetbrains/jet/plugin/caches/resolve/KotlinCacheManager.java +++ b/idea/src/org/jetbrains/jet/plugin/caches/resolve/KotlinCacheManager.java @@ -77,7 +77,7 @@ public class KotlinCacheManager { Predicates.alwaysFalse() ); return Result.create( - new AnalyzeExhaustAsKotlinDeclarationsCache(analyzeExhaust), + new KotlinDeclarationsCacheImpl(analyzeExhaust), PsiModificationTracker.OUT_OF_CODE_BLOCK_MODIFICATION_COUNT ); } diff --git a/idea/src/org/jetbrains/jet/plugin/caches/resolve/KotlinDeclarationsCache.java b/idea/src/org/jetbrains/jet/plugin/caches/resolve/KotlinDeclarationsCache.java index f67207c3208..23c3d2b388b 100644 --- a/idea/src/org/jetbrains/jet/plugin/caches/resolve/KotlinDeclarationsCache.java +++ b/idea/src/org/jetbrains/jet/plugin/caches/resolve/KotlinDeclarationsCache.java @@ -17,18 +17,9 @@ package org.jetbrains.jet.plugin.caches.resolve; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import org.jetbrains.jet.lang.ModuleConfiguration; import org.jetbrains.jet.lang.resolve.BindingContext; -import org.jetbrains.jet.lang.resolve.BodiesResolveContext; public interface KotlinDeclarationsCache { @NotNull BindingContext getBindingContext(); - - @Nullable - BodiesResolveContext getBodiesResolveContext(); - - @NotNull @Deprecated // ModuleConfiguration must be obtained from the module - ModuleConfiguration getModuleConfiguration(); } diff --git a/idea/src/org/jetbrains/jet/plugin/caches/resolve/AnalyzeExhaustAsKotlinDeclarationsCache.java b/idea/src/org/jetbrains/jet/plugin/caches/resolve/KotlinDeclarationsCacheImpl.java similarity index 63% rename from idea/src/org/jetbrains/jet/plugin/caches/resolve/AnalyzeExhaustAsKotlinDeclarationsCache.java rename to idea/src/org/jetbrains/jet/plugin/caches/resolve/KotlinDeclarationsCacheImpl.java index 7546d0e2fff..933d0cbe8a7 100644 --- a/idea/src/org/jetbrains/jet/plugin/caches/resolve/AnalyzeExhaustAsKotlinDeclarationsCache.java +++ b/idea/src/org/jetbrains/jet/plugin/caches/resolve/KotlinDeclarationsCacheImpl.java @@ -18,43 +18,28 @@ package org.jetbrains.jet.plugin.caches.resolve; import com.intellij.openapi.diagnostic.Logger; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.analyzer.AnalyzeExhaust; -import org.jetbrains.jet.lang.ModuleConfiguration; import org.jetbrains.jet.lang.resolve.BindingContext; -import org.jetbrains.jet.lang.resolve.BodiesResolveContext; -public class AnalyzeExhaustAsKotlinDeclarationsCache implements KotlinDeclarationsCache { +public class KotlinDeclarationsCacheImpl implements KotlinDeclarationsCache { - private static final Logger LOG = Logger.getInstance(AnalyzeExhaustAsKotlinDeclarationsCache.class); + private static final Logger LOG = Logger.getInstance(KotlinDeclarationsCacheImpl.class); private final AnalyzeExhaust exhaust; - public AnalyzeExhaustAsKotlinDeclarationsCache(@NotNull AnalyzeExhaust exhaust) { + public KotlinDeclarationsCacheImpl(@NotNull AnalyzeExhaust exhaust) { this.exhaust = exhaust; if (exhaust.isError()) { LOG.error(exhaust.getError()); } } - @Nullable - @Override - public BodiesResolveContext getBodiesResolveContext() { - return exhaust.getBodiesResolveContext(); - } - @Override @NotNull public BindingContext getBindingContext() { return exhaust.getBindingContext(); } - @Override - @NotNull - public ModuleConfiguration getModuleConfiguration() { - return exhaust.getModuleConfiguration(); - } - @NotNull public AnalyzeExhaust getAnalyzeExhaust() { return exhaust; diff --git a/idea/src/org/jetbrains/jet/plugin/project/AnalyzerFacadeWithCache.java b/idea/src/org/jetbrains/jet/plugin/project/AnalyzerFacadeWithCache.java index 6373c093ce8..5f8bbf328cc 100644 --- a/idea/src/org/jetbrains/jet/plugin/project/AnalyzerFacadeWithCache.java +++ b/idea/src/org/jetbrains/jet/plugin/project/AnalyzerFacadeWithCache.java @@ -40,7 +40,7 @@ import org.jetbrains.jet.lang.psi.JetFile; import org.jetbrains.jet.lang.resolve.*; import org.jetbrains.jet.lang.resolve.java.JetFilesProvider; import org.jetbrains.jet.lang.resolve.lazy.ResolveSession; -import org.jetbrains.jet.plugin.caches.resolve.AnalyzeExhaustAsKotlinDeclarationsCache; +import org.jetbrains.jet.plugin.caches.resolve.KotlinDeclarationsCacheImpl; import org.jetbrains.jet.plugin.caches.resolve.KotlinCacheManager; import org.jetbrains.jet.plugin.caches.resolve.KotlinDeclarationsCache; import org.jetbrains.jet.plugin.util.ApplicationUtils; @@ -120,7 +120,7 @@ public final class AnalyzerFacadeWithCache { private static AnalyzeExhaust analyzeHeadersWithCacheOnFile(@NotNull JetFile fileToCache) { KotlinDeclarationsCache cache = KotlinCacheManager.getInstance(fileToCache.getProject()).getDeclarationsFromProject(); - return ((AnalyzeExhaustAsKotlinDeclarationsCache) cache).getAnalyzeExhaust(); + return ((KotlinDeclarationsCacheImpl) cache).getAnalyzeExhaust(); } private static AnalyzeExhaust analyzeBodies(AnalyzeExhaust analyzeExhaustHeaders, JetFile file) {