diff --git a/idea/src/org/jetbrains/jet/plugin/stubindex/JetAllPackagesIndex.java b/idea/src/org/jetbrains/jet/plugin/stubindex/JetAllPackagesIndex.java index 7573fe110bb..c66619712df 100644 --- a/idea/src/org/jetbrains/jet/plugin/stubindex/JetAllPackagesIndex.java +++ b/idea/src/org/jetbrains/jet/plugin/stubindex/JetAllPackagesIndex.java @@ -50,6 +50,6 @@ public class JetAllPackagesIndex extends StringStubIndexExtension { @Override public Collection get(final String fqName, final Project project, @NotNull final GlobalSearchScope scope) { - return super.get(fqName, project, new JetSourceFilterScope(scope)); + return super.get(fqName, project, JetSourceFilterScope.kotlinSourcesAndLibraries(scope)); } } diff --git a/idea/src/org/jetbrains/jet/plugin/stubindex/JetAllShortFunctionNameIndex.java b/idea/src/org/jetbrains/jet/plugin/stubindex/JetAllShortFunctionNameIndex.java index c2f6b067c87..441b59bdc08 100644 --- a/idea/src/org/jetbrains/jet/plugin/stubindex/JetAllShortFunctionNameIndex.java +++ b/idea/src/org/jetbrains/jet/plugin/stubindex/JetAllShortFunctionNameIndex.java @@ -44,6 +44,6 @@ public class JetAllShortFunctionNameIndex extends StringStubIndexExtension get(final String s, final Project project, @NotNull final GlobalSearchScope scope) { - return super.get(s, project, new JetSourceFilterScope(scope)); + return super.get(s, project, JetSourceFilterScope.kotlinSourcesAndLibraries(scope)); } } diff --git a/idea/src/org/jetbrains/jet/plugin/stubindex/JetAnnotationsIndex.java b/idea/src/org/jetbrains/jet/plugin/stubindex/JetAnnotationsIndex.java index 802f806473d..6566e2ad5f1 100644 --- a/idea/src/org/jetbrains/jet/plugin/stubindex/JetAnnotationsIndex.java +++ b/idea/src/org/jetbrains/jet/plugin/stubindex/JetAnnotationsIndex.java @@ -44,6 +44,6 @@ public class JetAnnotationsIndex extends StringStubIndexExtension get(final String s, final Project project, @NotNull final GlobalSearchScope scope) { - return super.get(s, project, new JetSourceFilterScope(scope)); + return super.get(s, project, JetSourceFilterScope.kotlinSourcesAndLibraries(scope)); } } diff --git a/idea/src/org/jetbrains/jet/plugin/stubindex/JetClassByPackageIndex.java b/idea/src/org/jetbrains/jet/plugin/stubindex/JetClassByPackageIndex.java index bec685258e5..0c666a84191 100644 --- a/idea/src/org/jetbrains/jet/plugin/stubindex/JetClassByPackageIndex.java +++ b/idea/src/org/jetbrains/jet/plugin/stubindex/JetClassByPackageIndex.java @@ -44,6 +44,6 @@ public class JetClassByPackageIndex extends StringStubIndexExtension get(final String fqName, final Project project, @NotNull final GlobalSearchScope scope) { - return super.get(fqName, project, new JetSourceFilterScope(scope)); + return super.get(fqName, project, JetSourceFilterScope.kotlinSourcesAndLibraries(scope)); } } diff --git a/idea/src/org/jetbrains/jet/plugin/stubindex/JetFullClassNameIndex.java b/idea/src/org/jetbrains/jet/plugin/stubindex/JetFullClassNameIndex.java index 565eac88260..1f6124ee614 100644 --- a/idea/src/org/jetbrains/jet/plugin/stubindex/JetFullClassNameIndex.java +++ b/idea/src/org/jetbrains/jet/plugin/stubindex/JetFullClassNameIndex.java @@ -44,6 +44,6 @@ public class JetFullClassNameIndex extends StringStubIndexExtension get(final String fqName, final Project project, @NotNull final GlobalSearchScope scope) { - return super.get(fqName, project, new JetSourceFilterScope(scope)); + return super.get(fqName, project, JetSourceFilterScope.kotlinSourcesAndLibraries(scope)); } } diff --git a/idea/src/org/jetbrains/jet/plugin/stubindex/JetPackageDeclarationIndex.java b/idea/src/org/jetbrains/jet/plugin/stubindex/JetPackageDeclarationIndex.java index 62c6ff4ac2c..43b1c3d6abb 100644 --- a/idea/src/org/jetbrains/jet/plugin/stubindex/JetPackageDeclarationIndex.java +++ b/idea/src/org/jetbrains/jet/plugin/stubindex/JetPackageDeclarationIndex.java @@ -50,6 +50,6 @@ public class JetPackageDeclarationIndex extends StringStubIndexExtension get(final String fqName, final Project project, @NotNull final GlobalSearchScope scope) { - return super.get(fqName, project, new JetSourceFilterScope(scope)); + return super.get(fqName, project, JetSourceFilterScope.kotlinSourcesAndLibraries(scope)); } } diff --git a/idea/src/org/jetbrains/jet/plugin/stubindex/JetShortClassNameIndex.java b/idea/src/org/jetbrains/jet/plugin/stubindex/JetShortClassNameIndex.java index 77decd42a0b..768805c77a1 100644 --- a/idea/src/org/jetbrains/jet/plugin/stubindex/JetShortClassNameIndex.java +++ b/idea/src/org/jetbrains/jet/plugin/stubindex/JetShortClassNameIndex.java @@ -44,6 +44,6 @@ public class JetShortClassNameIndex extends StringStubIndexExtension get(final String s, final Project project, @NotNull final GlobalSearchScope scope) { - return super.get(s, project, new JetSourceFilterScope(scope)); + return super.get(s, project, JetSourceFilterScope.kotlinSourcesAndLibraries(scope)); } } diff --git a/idea/src/org/jetbrains/jet/plugin/stubindex/JetShortFunctionNameIndex.java b/idea/src/org/jetbrains/jet/plugin/stubindex/JetShortFunctionNameIndex.java index 73279f80b75..756447b24b9 100644 --- a/idea/src/org/jetbrains/jet/plugin/stubindex/JetShortFunctionNameIndex.java +++ b/idea/src/org/jetbrains/jet/plugin/stubindex/JetShortFunctionNameIndex.java @@ -44,6 +44,6 @@ public class JetShortFunctionNameIndex extends StringStubIndexExtension get(final String s, final Project project, @NotNull final GlobalSearchScope scope) { - return super.get(s, project, new JetSourceFilterScope(scope)); + return super.get(s, project, JetSourceFilterScope.kotlinSourcesAndLibraries(scope)); } } diff --git a/idea/src/org/jetbrains/jet/plugin/stubindex/JetShortPropertiesNameIndex.java b/idea/src/org/jetbrains/jet/plugin/stubindex/JetShortPropertiesNameIndex.java index 844e01c3ba6..df793746e73 100644 --- a/idea/src/org/jetbrains/jet/plugin/stubindex/JetShortPropertiesNameIndex.java +++ b/idea/src/org/jetbrains/jet/plugin/stubindex/JetShortPropertiesNameIndex.java @@ -44,6 +44,6 @@ public class JetShortPropertiesNameIndex extends StringStubIndexExtension get(final String s, final Project project, @NotNull final GlobalSearchScope scope) { - return super.get(s, project, new JetSourceFilterScope(scope)); + return super.get(s, project, JetSourceFilterScope.kotlinSourcesAndLibraries(scope)); } } \ No newline at end of file diff --git a/idea/src/org/jetbrains/jet/plugin/stubindex/JetSourceFilterScope.java b/idea/src/org/jetbrains/jet/plugin/stubindex/JetSourceFilterScope.java index 1dce660678f..cb231740526 100644 --- a/idea/src/org/jetbrains/jet/plugin/stubindex/JetSourceFilterScope.java +++ b/idea/src/org/jetbrains/jet/plugin/stubindex/JetSourceFilterScope.java @@ -26,9 +26,13 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.plugin.JetFileType; public class JetSourceFilterScope extends DelegatingGlobalSearchScope { + public static JetSourceFilterScope kotlinSourcesAndLibraries(@NotNull GlobalSearchScope delegate) { + return new JetSourceFilterScope(delegate); + } + private final ProjectFileIndex myIndex; - public JetSourceFilterScope(@NotNull final GlobalSearchScope delegate) { + private JetSourceFilterScope(@NotNull final GlobalSearchScope delegate) { super(delegate); myIndex = ProjectRootManager.getInstance(getProject()).getFileIndex(); } diff --git a/idea/src/org/jetbrains/jet/plugin/stubindex/JetSuperClassIndex.java b/idea/src/org/jetbrains/jet/plugin/stubindex/JetSuperClassIndex.java index bea7f934e85..7c0deb17fe7 100644 --- a/idea/src/org/jetbrains/jet/plugin/stubindex/JetSuperClassIndex.java +++ b/idea/src/org/jetbrains/jet/plugin/stubindex/JetSuperClassIndex.java @@ -44,6 +44,6 @@ public class JetSuperClassIndex extends StringStubIndexExtension get(final String s, final Project project, @NotNull final GlobalSearchScope scope) { - return super.get(s, project, new JetSourceFilterScope(scope)); + return super.get(s, project, JetSourceFilterScope.kotlinSourcesAndLibraries(scope)); } } diff --git a/idea/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelFunctionsFqnNameIndex.java b/idea/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelFunctionsFqnNameIndex.java index 7b484fe3935..031a40f089b 100644 --- a/idea/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelFunctionsFqnNameIndex.java +++ b/idea/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelFunctionsFqnNameIndex.java @@ -47,6 +47,6 @@ public class JetTopLevelFunctionsFqnNameIndex extends StringStubIndexExtension get(final String s, final Project project, @NotNull final GlobalSearchScope scope) { - return super.get(s, project, new JetSourceFilterScope(scope)); + return super.get(s, project, JetSourceFilterScope.kotlinSourcesAndLibraries(scope)); } } diff --git a/idea/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelPropertiesFqnNameIndex.java b/idea/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelPropertiesFqnNameIndex.java index 3af84bd91bd..377bc3b025a 100644 --- a/idea/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelPropertiesFqnNameIndex.java +++ b/idea/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelPropertiesFqnNameIndex.java @@ -44,6 +44,6 @@ public class JetTopLevelPropertiesFqnNameIndex extends StringStubIndexExtension< @Override public Collection get(final String s, final Project project, @NotNull final GlobalSearchScope scope) { - return super.get(s, project, new JetSourceFilterScope(scope)); + return super.get(s, project, JetSourceFilterScope.kotlinSourcesAndLibraries(scope)); } } diff --git a/idea/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelShortObjectNameIndex.java b/idea/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelShortObjectNameIndex.java index 5d9e1d4775e..b8217872eca 100644 --- a/idea/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelShortObjectNameIndex.java +++ b/idea/src/org/jetbrains/jet/plugin/stubindex/JetTopLevelShortObjectNameIndex.java @@ -44,6 +44,6 @@ public class JetTopLevelShortObjectNameIndex extends StringStubIndexExtension get(final String s, final Project project, @NotNull final GlobalSearchScope scope) { - return super.get(s, project, new JetSourceFilterScope(scope)); + return super.get(s, project, JetSourceFilterScope.kotlinSourcesAndLibraries(scope)); } }