AnalyzerFacadeForJS implements interface AnalyzerFacade.

Delete analyzer*WithCache methods from AnalyzerFacadeForJVM.
Introduce JsModuleDetector.
Move AnalyzerFacadeWithCache to idea module. Make it static, make it acquire facade through AnalyzerFacadeProvider.
This commit is contained in:
Pavel V. Talanov
2012-04-06 17:39:24 +04:00
parent 3c9c7e6ede
commit 2150789502
17 changed files with 119 additions and 93 deletions
@@ -20,11 +20,9 @@ import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiFile;
import com.intellij.util.Function;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.analyzer.AnalyzeExhaust;
import org.jetbrains.jet.analyzer.AnalyzerFacade;
import org.jetbrains.jet.analyzer.AnalyzerFacadeWithCache;
import org.jetbrains.jet.di.InjectorForTopDownAnalyzerForJvm;
import org.jetbrains.jet.lang.cfg.pseudocode.JetControlFlowDataTraceFactory;
import org.jetbrains.jet.lang.descriptors.ModuleDescriptor;
@@ -103,15 +101,4 @@ public enum AnalyzerFacadeForJVM implements AnalyzerFacade {
return analyzeFilesWithJavaIntegration(project, files, Predicates.<PsiFile>alwaysFalse(),
JetControlFlowDataTraceFactory.EMPTY, CompilerSpecialMode.REGULAR);
}
@NotNull
public static AnalyzeExhaust analyzeFileWithCache(@NotNull final JetFile file,
@NotNull final Function<JetFile, Collection<JetFile>> declarationProvider) {
return AnalyzerFacadeWithCache.getInstance(INSTANCE).analyzeFileWithCache(file, declarationProvider);
}
@NotNull
public static AnalyzeExhaust analyzeProjectWithCache(@NotNull final Project project, @NotNull final Collection<JetFile> files) {
return AnalyzerFacadeWithCache.getInstance(INSTANCE).analyzeProjectWithCache(project, files);
}
}