diff --git a/idea/idea-analysis/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelExtensionFunctionShortNameIndex.java b/idea/idea-analysis/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelExtensionFunctionShortNameIndex.java deleted file mode 100644 index facef86180a..00000000000 --- a/idea/idea-analysis/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelExtensionFunctionShortNameIndex.java +++ /dev/null @@ -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 { - private static final StubIndexKey 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 getKey() { - return KEY; - } -} diff --git a/idea/idea-analysis/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelExtensionPropertyShortNameIndex.java b/idea/idea-analysis/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelExtensionPropertyShortNameIndex.java deleted file mode 100644 index 65db798d5c4..00000000000 --- a/idea/idea-analysis/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelExtensionPropertyShortNameIndex.java +++ /dev/null @@ -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 { - private static final StubIndexKey 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 getKey() { - return KEY; - } - - @NotNull - @Override - public Collection get(String s, Project project, @NotNull GlobalSearchScope scope) { - return super.get(s, project, JetSourceFilterScope.kotlinSourcesAndLibraries(scope, project)); - } -} diff --git a/idea/idea-analysis/src/org/jetbrains/jet/plugin/stubindex/StubIndexServiceImpl.java b/idea/idea-analysis/src/org/jetbrains/jet/plugin/stubindex/StubIndexServiceImpl.java index 7de46328d0b..3b2ba380953 100644 --- a/idea/idea-analysis/src/org/jetbrains/jet/plugin/stubindex/StubIndexServiceImpl.java +++ b/idea/idea-analysis/src/org/jetbrains/jet/plugin/stubindex/StubIndexServiceImpl.java @@ -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); diff --git a/idea/src/META-INF/plugin.xml b/idea/src/META-INF/plugin.xml index f4203d4228a..8c055e43372 100644 --- a/idea/src/META-INF/plugin.xml +++ b/idea/src/META-INF/plugin.xml @@ -402,8 +402,6 @@ - -