Unused code removed

This commit is contained in:
Andrey Breslav
2014-04-29 19:50:34 +04:00
parent 775c941f8a
commit db00500404
6 changed files with 6 additions and 104 deletions
@@ -1,25 +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.plugin.caches.resolve;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.lang.resolve.BindingContext;
public interface KotlinDeclarationsCache {
@NotNull
BindingContext getBindingContext();
}
@@ -1,56 +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.plugin.caches.resolve;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.ModificationTracker;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.analyzer.AnalyzeExhaust;
import org.jetbrains.jet.lang.resolve.BindingContext;
import org.jetbrains.jet.lang.resolve.BodiesResolveContext;
public class KotlinDeclarationsCacheImpl implements KotlinDeclarationsCache, ModificationTracker {
private static final Logger LOG = Logger.getInstance(KotlinDeclarationsCacheImpl.class);
private final AnalyzeExhaust exhaust;
public KotlinDeclarationsCacheImpl(@NotNull AnalyzeExhaust exhaust) {
this.exhaust = exhaust;
if (exhaust.isError()) {
LOG.error(exhaust.getError());
}
}
@Override
@NotNull
public BindingContext getBindingContext() {
return exhaust.getBindingContext();
}
@Override
public long getModificationCount() {
BodiesResolveContext context = exhaust.getBodiesResolveContext();
if (context == null) return 0;
return context.getExceptionTracker().getModificationCount();
}
@NotNull
public AnalyzeExhaust getAnalyzeExhaust() {
return exhaust;
}
}
@@ -232,7 +232,7 @@ private class KotlinResolveCache(
resolveSession.getModuleDescriptor(),
MemberFilter.ALWAYS_TRUE
)
val resultingContext = injector.getLazyTopDownAnalyzer()!!.analyzeDeclarations(
injector.getLazyTopDownAnalyzer()!!.analyzeDeclarations(
resolveSession,
TopDownAnalysisParameters.createForLazy(
resolveSession.getStorageManager(),
@@ -245,7 +245,6 @@ private class KotlinResolveCache(
)
return AnalyzeExhaust.success(
trace.getBindingContext(),
resultingContext,
resolveSession.getModuleDescriptor()
)
}