Renames "possibly nothing" to "probably nothing"

This commit is contained in:
Valentin Kipyatkov
2014-11-19 18:50:59 +03:00
parent e5579bcf32
commit 3b77d337e8
15 changed files with 53 additions and 54 deletions
@@ -30,10 +30,10 @@ 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.ElementResolver;
import org.jetbrains.jet.lang.resolve.lazy.PossiblyNothingCallableNamesService;
import org.jetbrains.jet.lang.resolve.lazy.ProbablyNothingCallableNamesService;
import org.jetbrains.jet.lang.resolve.lazy.ResolveSession;
import org.jetbrains.jet.plugin.stubindex.JetPossiblyNothingFunctionShortNameIndex;
import org.jetbrains.jet.plugin.stubindex.JetPossiblyNothingPropertyShortNameIndex;
import org.jetbrains.jet.plugin.stubindex.JetProbablyNothingFunctionShortNameIndex;
import org.jetbrains.jet.plugin.stubindex.JetProbablyNothingPropertyShortNameIndex;
import org.jetbrains.jet.storage.LazyResolveStorageManager;
import org.jetbrains.jet.storage.MemoizedFunctionToNotNull;
@@ -87,14 +87,14 @@ public class ResolveElementCache extends ElementResolver {
@NotNull
@Override
protected PossiblyNothingCallableNamesService possiblyNothingCallableNamesService() {
return new PossiblyNothingCallableNamesService() {
protected ProbablyNothingCallableNamesService probablyNothingCallableNamesService() {
return new ProbablyNothingCallableNamesService() {
@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();
Collection<String> indexedNames = JetPossiblyNothingFunctionShortNameIndex.getInstance().getAllKeys(project);
Collection<String> indexedNames = JetProbablyNothingFunctionShortNameIndex.getInstance().getAllKeys(project);
Set<String> set = new HashSet<String>(hardcodedNames.size() + indexedNames.size());
set.addAll(hardcodedNames);
set.addAll(indexedNames);
@@ -105,7 +105,7 @@ public class ResolveElementCache extends ElementResolver {
@NotNull
@Override
public Set<String> propertyNames() {
return new HashSet<String>(JetPossiblyNothingPropertyShortNameIndex.getInstance().getAllKeys(project));
return new HashSet<String>(JetProbablyNothingPropertyShortNameIndex.getInstance().getAllKeys(project));
}
};
}
@@ -25,16 +25,16 @@ import org.jetbrains.jet.lang.psi.JetNamedFunction;
import java.util.Collection;
public class JetPossiblyNothingFunctionShortNameIndex extends StringStubIndexExtension<JetNamedFunction> {
private static final StubIndexKey<String, JetNamedFunction> KEY = KotlinIndexUtil.createIndexKey(JetPossiblyNothingFunctionShortNameIndex.class);
public class JetProbablyNothingFunctionShortNameIndex extends StringStubIndexExtension<JetNamedFunction> {
private static final StubIndexKey<String, JetNamedFunction> KEY = KotlinIndexUtil.createIndexKey(JetProbablyNothingFunctionShortNameIndex.class);
private static final JetPossiblyNothingFunctionShortNameIndex ourInstance = new JetPossiblyNothingFunctionShortNameIndex();
private static final JetProbablyNothingFunctionShortNameIndex ourInstance = new JetProbablyNothingFunctionShortNameIndex();
public static JetPossiblyNothingFunctionShortNameIndex getInstance() {
public static JetProbablyNothingFunctionShortNameIndex getInstance() {
return ourInstance;
}
private JetPossiblyNothingFunctionShortNameIndex() {}
private JetProbablyNothingFunctionShortNameIndex() {}
@NotNull
@Override
@@ -25,16 +25,16 @@ import org.jetbrains.jet.lang.psi.JetProperty;
import java.util.Collection;
public class JetPossiblyNothingPropertyShortNameIndex extends StringStubIndexExtension<JetProperty> {
private static final StubIndexKey<String, JetProperty> KEY = KotlinIndexUtil.createIndexKey(JetPossiblyNothingPropertyShortNameIndex.class);
public class JetProbablyNothingPropertyShortNameIndex extends StringStubIndexExtension<JetProperty> {
private static final StubIndexKey<String, JetProperty> KEY = KotlinIndexUtil.createIndexKey(JetProbablyNothingPropertyShortNameIndex.class);
private static final JetPossiblyNothingPropertyShortNameIndex ourInstance = new JetPossiblyNothingPropertyShortNameIndex();
private static final JetProbablyNothingPropertyShortNameIndex ourInstance = new JetProbablyNothingPropertyShortNameIndex();
public static JetPossiblyNothingPropertyShortNameIndex getInstance() {
public static JetProbablyNothingPropertyShortNameIndex getInstance() {
return ourInstance;
}
private JetPossiblyNothingPropertyShortNameIndex() {}
private JetProbablyNothingPropertyShortNameIndex() {}
@NotNull
@Override
@@ -114,8 +114,8 @@ public class StubIndexServiceImpl implements StubIndexService {
}
sink.occurrence(JetFunctionShortNameIndex.getInstance().getKey(), name);
if (stub.isPossiblyNothingType()) {
sink.occurrence(JetPossiblyNothingFunctionShortNameIndex.getInstance().getKey(), name);
if (stub.isProbablyNothingType()) {
sink.occurrence(JetProbablyNothingFunctionShortNameIndex.getInstance().getKey(), name);
}
}
// can have special fq name in case of syntactically incorrect function with no name
@@ -141,8 +141,8 @@ public class StubIndexServiceImpl implements StubIndexService {
sink.occurrence(JetPropertyShortNameIndex.getInstance().getKey(), name);
if (stub.isPossiblyNothingType()) {
sink.occurrence(JetPossiblyNothingPropertyShortNameIndex.getInstance().getKey(), name);
if (stub.isProbablyNothingType()) {
sink.occurrence(JetProbablyNothingPropertyShortNameIndex.getInstance().getKey(), name);
}
}
// can have special fq name in case of syntactically incorrect function with no name