Drop unused AnalyzerFacadeForEverything

This commit is contained in:
Alexander Udalov
2014-05-12 18:03:02 +04:00
parent 5a0055cbeb
commit 7c44938151
5 changed files with 2 additions and 79 deletions
@@ -1,62 +0,0 @@
/*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jet.analyzer;
import com.google.common.base.Predicate;
import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiFile;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.di.InjectorForBodyResolve;
import org.jetbrains.jet.lang.descriptors.ModuleDescriptor;
import org.jetbrains.jet.lang.resolve.*;
public class AnalyzerFacadeForEverything {
private AnalyzerFacadeForEverything() {
}
public static AnalyzeExhaust analyzeBodiesInFilesWithJavaIntegration(
Project project, Predicate<PsiFile> filesToAnalyzeCompletely,
@NotNull BindingTrace traceContext,
@NotNull BodiesResolveContext bodiesResolveContext,
@NotNull ModuleDescriptor module
) {
TopDownAnalysisParameters topDownAnalysisParameters = TopDownAnalysisParameters.create(
bodiesResolveContext.getStorageManager(),
bodiesResolveContext.getExceptionTracker(),
filesToAnalyzeCompletely,
false,
false
);
bodiesResolveContext.setTopDownAnalysisParameters(topDownAnalysisParameters);
InjectorForBodyResolve injector = new InjectorForBodyResolve(
project, topDownAnalysisParameters,
new ObservableBindingTrace(traceContext),
module);
try {
injector.getBodyResolver().resolveBodies(bodiesResolveContext);
return AnalyzeExhaust.success(traceContext.getBindingContext(), module);
} finally {
injector.destroy();
}
}
}
@@ -63,7 +63,6 @@ public interface BodiesResolveContext extends GlobalContext {
@NotNull
TopDownAnalysisParameters getTopDownAnalysisParameters();
void setTopDownAnalysisParameters(TopDownAnalysisParameters parameters);
boolean completeAnalysisNeeded(@NotNull PsiElement element);
}
@@ -121,11 +121,6 @@ public class CachedBodiesResolveContext implements BodiesResolveContext {
return topDownAnalysisParameters;
}
@Override
public void setTopDownAnalysisParameters(@NotNull TopDownAnalysisParameters parameters) {
topDownAnalysisParameters = parameters;
}
@Override
public boolean completeAnalysisNeeded(@NotNull PsiElement element) {
PsiFile containingFile = element.getContainingFile();
@@ -62,9 +62,9 @@ public class TopDownAnalysisContext implements BodiesResolveContext {
private final Map<JetScript, ScriptDescriptor> scripts = Maps.newLinkedHashMap();
private StringBuilder debugOutput;
private final TopDownAnalysisParameters topDownAnalysisParameters;
private TopDownAnalysisParameters topDownAnalysisParameters;
private StringBuilder debugOutput;
public TopDownAnalysisContext(@NotNull TopDownAnalysisParameters topDownAnalysisParameters) {
this.topDownAnalysisParameters = topDownAnalysisParameters;
@@ -76,11 +76,6 @@ public class TopDownAnalysisContext implements BodiesResolveContext {
return topDownAnalysisParameters;
}
@Override
public void setTopDownAnalysisParameters(TopDownAnalysisParameters topDownAnalysisParameters) {
this.topDownAnalysisParameters = topDownAnalysisParameters;
}
public void debug(Object message) {
if (debugOutput != null) {
debugOutput.append(message).append("\n");
@@ -537,10 +537,6 @@ public class ResolveElementCache {
return topDownAnalysisParameters;
}
@Override
public void setTopDownAnalysisParameters(TopDownAnalysisParameters parameters) {
}
@Override
public boolean completeAnalysisNeeded(@NotNull PsiElement element) {
return true;