Special factory method for local analysis

- No need to pass the same flags all the time
- No need to check for local mode when in LAZY mode
This commit is contained in:
Andrey Breslav
2014-04-02 14:33:45 +04:00
parent b02195e9ae
commit 3184b9ddba
6 changed files with 18 additions and 13 deletions
@@ -103,12 +103,10 @@ public class ReplInterpreter {
Project project = jetCoreEnvironment.getProject();
trace = new BindingTraceContext();
module = AnalyzerFacadeForJVM.createJavaModule("<repl>");
TopDownAnalysisParameters topDownAnalysisParameters = TopDownAnalysisParameters.create(
TopDownAnalysisParameters topDownAnalysisParameters = TopDownAnalysisParameters.createForLocalDeclarations(
new LockBasedStorageManager(),
new ExceptionTracker(), // dummy
Predicates.<PsiFile>alwaysTrue(),
false,
true
Predicates.<PsiFile>alwaysTrue()
);
injector = new InjectorForTopDownAnalyzerForJvm(project, topDownAnalysisParameters, trace, module, MemberFilter.ALWAYS_TRUE);
topDownAnalysisContext = new TopDownAnalysisContext(topDownAnalysisParameters);