script parameters
still a lot of things to do
This commit is contained in:
@@ -35,6 +35,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.lang.descriptors.*;
|
||||
import org.jetbrains.jet.lang.psi.*;
|
||||
import org.jetbrains.jet.lang.resolve.AnalyzerScriptParameter;
|
||||
import org.jetbrains.jet.lang.resolve.BindingContext;
|
||||
import org.jetbrains.jet.lang.resolve.BindingContextUtils;
|
||||
import org.jetbrains.jet.lang.resolve.name.FqName;
|
||||
@@ -73,6 +74,7 @@ public class JetSourceNavigationHelper {
|
||||
BindingContext bindingContext = AnalyzerFacadeProvider.getAnalyzerFacadeForProject(project).analyzeFiles(
|
||||
project,
|
||||
libraryFiles,
|
||||
Collections.<AnalyzerScriptParameter>emptyList(),
|
||||
Predicates.<PsiFile>alwaysTrue()).getBindingContext();
|
||||
D descriptor = bindingContext.get(slice, fqName);
|
||||
if (descriptor != null) {
|
||||
|
||||
@@ -31,6 +31,7 @@ import org.jetbrains.jet.analyzer.AnalyzeExhaust;
|
||||
import org.jetbrains.jet.lang.diagnostics.DiagnosticUtils;
|
||||
import org.jetbrains.jet.lang.diagnostics.Errors;
|
||||
import org.jetbrains.jet.lang.psi.JetFile;
|
||||
import org.jetbrains.jet.lang.resolve.AnalyzerScriptParameter;
|
||||
import org.jetbrains.jet.lang.resolve.BindingTraceContext;
|
||||
import org.jetbrains.jet.lang.resolve.BodiesResolveContext;
|
||||
import org.jetbrains.jet.lang.resolve.DelegatingBindingTrace;
|
||||
@@ -92,6 +93,7 @@ public final class AnalyzerFacadeWithCache {
|
||||
// Need to resolve bodies in given file
|
||||
AnalyzeExhaust exhaust = AnalyzerFacadeProvider.getAnalyzerFacadeForFile(file).analyzeBodiesInFiles(
|
||||
file.getProject(),
|
||||
Collections.<AnalyzerScriptParameter>emptyList(),
|
||||
Predicates.<PsiFile>equalTo(file),
|
||||
new DelegatingBindingTrace(analyzeExhaustHeaders.getBindingContext()),
|
||||
context);
|
||||
@@ -135,6 +137,7 @@ public final class AnalyzerFacadeWithCache {
|
||||
AnalyzeExhaust exhaust = AnalyzerFacadeProvider.getAnalyzerFacadeForFile(fileToCache)
|
||||
.analyzeFiles(fileToCache.getProject(),
|
||||
headerFiles,
|
||||
Collections.<AnalyzerScriptParameter>emptyList(),
|
||||
Predicates.<PsiFile>alwaysFalse());
|
||||
|
||||
return new Result<AnalyzeExhaust>(exhaust, PsiModificationTracker.OUT_OF_CODE_BLOCK_MODIFICATION_COUNT);
|
||||
|
||||
@@ -23,11 +23,13 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.analyzer.AnalyzeExhaust;
|
||||
import org.jetbrains.jet.analyzer.AnalyzerFacade;
|
||||
import org.jetbrains.jet.lang.psi.JetFile;
|
||||
import org.jetbrains.jet.lang.resolve.AnalyzerScriptParameter;
|
||||
import org.jetbrains.jet.lang.resolve.BindingTrace;
|
||||
import org.jetbrains.jet.lang.resolve.BodiesResolveContext;
|
||||
import org.jetbrains.k2js.analyze.AnalyzerFacadeForJS;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
@@ -43,6 +45,7 @@ public enum JSAnalyzerFacadeForIDEA implements AnalyzerFacade {
|
||||
@Override
|
||||
public AnalyzeExhaust analyzeFiles(@NotNull Project project,
|
||||
@NotNull Collection<JetFile> files,
|
||||
@NotNull List<AnalyzerScriptParameter> scriptParameters,
|
||||
@NotNull Predicate<PsiFile> filesToAnalyzeCompletely) {
|
||||
return AnalyzerFacadeForJS.analyzeFiles(files, filesToAnalyzeCompletely, new IDEAConfig(project), true);
|
||||
}
|
||||
@@ -50,6 +53,7 @@ public enum JSAnalyzerFacadeForIDEA implements AnalyzerFacade {
|
||||
@NotNull
|
||||
@Override
|
||||
public AnalyzeExhaust analyzeBodiesInFiles(@NotNull Project project,
|
||||
@NotNull List<AnalyzerScriptParameter> scriptParameters,
|
||||
@NotNull Predicate<PsiFile> filesForBodiesResolve,
|
||||
@NotNull BindingTrace traceContext,
|
||||
@NotNull BodiesResolveContext bodiesResolveContext) {
|
||||
|
||||
Reference in New Issue
Block a user