Do not pass TopDownAnalysisParameters to injectors

This commit is contained in:
Andrey Breslav
2014-02-23 12:58:15 +04:00
parent c4dbfbf1a9
commit 50a160afb1
5 changed files with 26 additions and 26 deletions
@@ -17,7 +17,7 @@
package org.jetbrains.jet.di;
import com.intellij.openapi.project.Project;
import org.jetbrains.jet.lang.resolve.TopDownAnalysisParameters;
import org.jetbrains.jet.context.GlobalContext;
import org.jetbrains.jet.storage.StorageManager;
import org.jetbrains.jet.lang.resolve.BindingTrace;
import org.jetbrains.jet.lang.descriptors.ModuleDescriptorImpl;
@@ -71,7 +71,7 @@ import javax.annotation.PreDestroy;
public class InjectorForTopDownAnalyzerForJvm implements InjectorForTopDownAnalyzer {
private final Project project;
private final TopDownAnalysisParameters topDownAnalysisParameters;
private final GlobalContext globalContext;
private final StorageManager storageManager;
private final BindingTrace bindingTrace;
private final ModuleDescriptorImpl moduleDescriptor;
@@ -120,13 +120,13 @@ public class InjectorForTopDownAnalyzerForJvm implements InjectorForTopDownAnaly
public InjectorForTopDownAnalyzerForJvm(
@NotNull Project project,
@NotNull TopDownAnalysisParameters topDownAnalysisParameters,
@NotNull GlobalContext globalContext,
@NotNull BindingTrace bindingTrace,
@NotNull ModuleDescriptorImpl moduleDescriptor
) {
this.project = project;
this.topDownAnalysisParameters = topDownAnalysisParameters;
this.storageManager = topDownAnalysisParameters.getStorageManager();
this.globalContext = globalContext;
this.storageManager = globalContext.getStorageManager();
this.bindingTrace = bindingTrace;
this.moduleDescriptor = moduleDescriptor;
this.platformToKotlinClassMap = moduleDescriptor.getPlatformToKotlinClassMap();
@@ -227,7 +227,7 @@ public class InjectorForTopDownAnalyzerForJvm implements InjectorForTopDownAnaly
expressionTypingComponents.setExpressionTypingServices(expressionTypingServices);
expressionTypingComponents.setExpressionTypingUtils(expressionTypingUtils);
expressionTypingComponents.setForLoopConventionsChecker(forLoopConventionsChecker);
expressionTypingComponents.setGlobalContext(topDownAnalysisParameters);
expressionTypingComponents.setGlobalContext(globalContext);
expressionTypingComponents.setPlatformToKotlinClassMap(platformToKotlinClassMap);
forLoopConventionsChecker.setExpressionTypingServices(expressionTypingServices);