Renames - dropped word "Service"

This commit is contained in:
Valentin Kipyatkov
2014-11-21 11:52:22 +03:00
parent 2f19713cc2
commit 0dd77a8ed3
4 changed files with 13 additions and 13 deletions
@@ -70,8 +70,8 @@ public abstract class ElementResolver {
}
@NotNull
protected ProbablyNothingCallableNamesService probablyNothingCallableNamesService() {
return DefaultNothingCallableNamesService.INSTANCE$;
protected ProbablyNothingCallableNames probablyNothingCallableNames() {
return DefaultNothingCallableNames.INSTANCE$;
}
@NotNull
@@ -101,7 +101,7 @@ public abstract class ElementResolver {
boolean inBody = body != null && PsiTreeUtil.isAncestor(body, jetElement, false);
Function1<JetElement, Boolean> filter;
if (inBody) {
filter = new PartialBodyResolveFilter(jetElement, body, probablyNothingCallableNamesService());
filter = new PartialBodyResolveFilter(jetElement, body, probablyNothingCallableNames());
}
else { // do as less as possible body-resolve
filter = new Function1<JetElement, Boolean>() {
@@ -34,13 +34,13 @@ import org.jetbrains.jet.utils.addToStdlib.firstOrNullIsInstance
class PartialBodyResolveFilter(
elementToResolve: JetElement,
private val body: JetExpression,
probablyNothingCallableNamesService: ProbablyNothingCallableNamesService
probablyNothingCallableNames: ProbablyNothingCallableNames
) : (JetElement) -> Boolean {
private val statementTree = StatementTree()
private val nothingFunctionNames = HashSet(probablyNothingCallableNamesService.functionNames())
private val nothingPropertyNames = probablyNothingCallableNamesService.propertyNames()
private val nothingFunctionNames = HashSet(probablyNothingCallableNames.functionNames())
private val nothingPropertyNames = probablyNothingCallableNames.propertyNames()
;{
assert(body.isAncestor(elementToResolve, strict = false))
@@ -16,12 +16,12 @@
package org.jetbrains.jet.lang.resolve.lazy
public trait ProbablyNothingCallableNamesService {
public trait ProbablyNothingCallableNames {
public fun functionNames(): Set<String>
public fun propertyNames(): Set<String>
}
public object DefaultNothingCallableNamesService : ProbablyNothingCallableNamesService {
public object DefaultNothingCallableNames : ProbablyNothingCallableNames {
private val hardcodedNames = setOf("error")
override fun functionNames() = hardcodedNames
@@ -28,9 +28,9 @@ import org.jetbrains.jet.lang.psi.JetElement;
import org.jetbrains.jet.lang.psi.JetFile;
import org.jetbrains.jet.lang.resolve.AdditionalCheckerProvider;
import org.jetbrains.jet.lang.resolve.BindingContext;
import org.jetbrains.jet.lang.resolve.lazy.DefaultNothingCallableNamesService;
import org.jetbrains.jet.lang.resolve.lazy.DefaultNothingCallableNames;
import org.jetbrains.jet.lang.resolve.lazy.ElementResolver;
import org.jetbrains.jet.lang.resolve.lazy.ProbablyNothingCallableNamesService;
import org.jetbrains.jet.lang.resolve.lazy.ProbablyNothingCallableNames;
import org.jetbrains.jet.lang.resolve.lazy.ResolveSession;
import org.jetbrains.jet.plugin.stubindex.JetProbablyNothingFunctionShortNameIndex;
import org.jetbrains.jet.plugin.stubindex.JetProbablyNothingPropertyShortNameIndex;
@@ -87,13 +87,13 @@ public class ResolveElementCache extends ElementResolver {
@NotNull
@Override
protected ProbablyNothingCallableNamesService probablyNothingCallableNamesService() {
return new ProbablyNothingCallableNamesService() {
protected ProbablyNothingCallableNames probablyNothingCallableNames() {
return new ProbablyNothingCallableNames() {
@NotNull
@Override
public Set<String> functionNames() {
// we have to add hardcoded-names until we have Kotlin compiled classes in caches
Set<String> hardcodedNames = DefaultNothingCallableNamesService.INSTANCE$.functionNames();
Set<String> hardcodedNames = DefaultNothingCallableNames.INSTANCE$.functionNames();
Collection<String> indexedNames = JetProbablyNothingFunctionShortNameIndex.getInstance().getAllKeys(project);
Set<String> set = new HashSet<String>(hardcodedNames.size() + indexedNames.size());
set.addAll(hardcodedNames);