Dropped 2 more not needed indices

This commit is contained in:
Valentin Kipyatkov
2014-11-28 20:19:57 +03:00
parent 4408944dc3
commit 486c83a174
4 changed files with 0 additions and 101 deletions
@@ -1,41 +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.stubindex;
import com.intellij.psi.stubs.StringStubIndexExtension;
import com.intellij.psi.stubs.StubIndexKey;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.lang.psi.JetNamedFunction;
public class JetTopLevelExtensionFunctionShortNameIndex extends StringStubIndexExtension<JetNamedFunction> {
private static final StubIndexKey<String, JetNamedFunction> KEY = KotlinIndexUtil.createIndexKey(JetTopLevelExtensionFunctionShortNameIndex.class);
private static final JetTopLevelExtensionFunctionShortNameIndex instance = new JetTopLevelExtensionFunctionShortNameIndex();
@NotNull
public static JetTopLevelExtensionFunctionShortNameIndex getInstance() {
return instance;
}
private JetTopLevelExtensionFunctionShortNameIndex() {}
@NotNull
@Override
public StubIndexKey<String, JetNamedFunction> getKey() {
return KEY;
}
}
@@ -1,51 +0,0 @@
/*
* Copyright 2010-2014 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.stubindex;
import com.intellij.openapi.project.Project;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.psi.stubs.StringStubIndexExtension;
import com.intellij.psi.stubs.StubIndexKey;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.lang.psi.JetProperty;
import java.util.Collection;
public class JetTopLevelExtensionPropertyShortNameIndex extends StringStubIndexExtension<JetProperty> {
private static final StubIndexKey<String, JetProperty> KEY = KotlinIndexUtil.createIndexKey(JetTopLevelExtensionPropertyShortNameIndex.class);
private static final JetTopLevelExtensionPropertyShortNameIndex ourInstance = new JetTopLevelExtensionPropertyShortNameIndex();
@NotNull
public static JetTopLevelExtensionPropertyShortNameIndex getInstance() {
return ourInstance;
}
private JetTopLevelExtensionPropertyShortNameIndex() {}
@NotNull
@Override
public StubIndexKey<String, JetProperty> getKey() {
return KEY;
}
@NotNull
@Override
public Collection<JetProperty> get(String s, Project project, @NotNull GlobalSearchScope scope) {
return super.get(s, project, JetSourceFilterScope.kotlinSourcesAndLibraries(scope, project));
}
}
@@ -97,13 +97,9 @@ public class StubIndexServiceImpl implements StubIndexService {
String name = stub.getName();
if (name != null) {
if (stub.isTopLevel()) {
// Collection only top level functions as only they are expected in completion without explicit import
if (!stub.isExtension()) {
sink.occurrence(JetTopLevelNonExtensionFunctionShortNameIndex.getInstance().getKey(), name);
}
else {
sink.occurrence(JetTopLevelExtensionFunctionShortNameIndex.getInstance().getKey(), name);
}
}
sink.occurrence(JetFunctionShortNameIndex.getInstance().getKey(), name);
@@ -131,9 +127,6 @@ public class StubIndexServiceImpl implements StubIndexService {
if (!stub.hasReceiverTypeRef()) {
sink.occurrence(JetTopLevelNonExtensionPropertyShortNameIndex.getInstance().getKey(), name);
}
else {
sink.occurrence(JetTopLevelExtensionPropertyShortNameIndex.getInstance().getKey(), name);
}
}
sink.occurrence(JetPropertyShortNameIndex.getInstance().getKey(), name);
-2
View File
@@ -402,8 +402,6 @@
<stubIndex implementation="org.jetbrains.jet.plugin.stubindex.JetTopLevelNonExtensionFunctionShortNameIndex"/>
<stubIndex implementation="org.jetbrains.jet.plugin.stubindex.JetTopLevelNonExtensionPropertyShortNameIndex"/>
<stubIndex implementation="org.jetbrains.jet.plugin.stubindex.JetPropertyShortNameIndex"/>
<stubIndex implementation="org.jetbrains.jet.plugin.stubindex.JetTopLevelExtensionFunctionShortNameIndex"/>
<stubIndex implementation="org.jetbrains.jet.plugin.stubindex.JetTopLevelExtensionPropertyShortNameIndex"/>
<stubIndex implementation="org.jetbrains.jet.plugin.stubindex.JetFunctionShortNameIndex"/>
<stubIndex implementation="org.jetbrains.jet.plugin.stubindex.JetSuperClassIndex"/>
<stubIndex implementation="org.jetbrains.jet.plugin.stubindex.JetTopLevelFunctionFqnNameIndex"/>