Refactor: TopDownAnalysisParameters doesn't implement GlobalContext

This commit is contained in:
Pavel V. Talanov
2015-05-15 13:42:29 +03:00
parent f18b9caa8d
commit f9b6c25498
12 changed files with 42 additions and 104 deletions
@@ -113,8 +113,6 @@ public class ReplInterpreter {
GlobalContextImpl context = ContextPackage.GlobalContext();
TopDownAnalysisParameters topDownAnalysisParameters = TopDownAnalysisParameters.create(
context.getStorageManager(),
context.getExceptionTracker(),
false,
true
);
@@ -131,7 +129,7 @@ public class ReplInterpreter {
InjectorForReplWithJava injector = new InjectorForReplWithJava(
project,
topDownAnalysisParameters,
context,
trace,
module,
scriptDeclarationFactory,
@@ -355,7 +353,7 @@ public class ReplInterpreter {
@Nullable
private ScriptDescriptor doAnalyze(@NotNull JetFile psiFile, @NotNull MessageCollector messageCollector) {
scriptDeclarationFactory.setDelegateFactory(
new FileBasedDeclarationProviderFactory(topDownAnalysisContext.getStorageManager(), Collections.singletonList(psiFile)));
new FileBasedDeclarationProviderFactory(resolveSession.getStorageManager(), Collections.singletonList(psiFile)));
TopDownAnalysisContext context = topDownAnalyzer.analyzeDeclarations(
topDownAnalysisContext.getTopDownAnalysisParameters(),