Renames
This commit is contained in:
+6
-6
@@ -36,7 +36,7 @@ import org.jetbrains.kotlin.idea.decompiler.navigation.SourceNavigationHelper
|
||||
import org.jetbrains.kotlin.idea.project.ResolveElementCache
|
||||
import org.jetbrains.kotlin.idea.resolve.ResolutionFacade
|
||||
import org.jetbrains.kotlin.idea.stubindex.*
|
||||
import org.jetbrains.kotlin.idea.stubindex.KotlinSourceFilterScope.kotlinSourceAndClassFiles
|
||||
import org.jetbrains.kotlin.idea.stubindex.KotlinSourceFilterScope.sourceAndClassFiles
|
||||
import org.jetbrains.kotlin.idea.util.ProjectRootsUtil
|
||||
import org.jetbrains.kotlin.incremental.components.NoLookupLocation
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
@@ -116,11 +116,11 @@ public class IDELightClassGenerationSupport(private val project: Project) : Ligh
|
||||
}
|
||||
|
||||
override fun findClassOrObjectDeclarations(fqName: FqName, searchScope: GlobalSearchScope): Collection<KtClassOrObject> {
|
||||
return KotlinFullClassNameIndex.getInstance().get(fqName.asString(), project, kotlinSourceAndClassFiles(searchScope, project))
|
||||
return KotlinFullClassNameIndex.getInstance().get(fqName.asString(), project, sourceAndClassFiles(searchScope, project))
|
||||
}
|
||||
|
||||
override fun findFilesForPackage(fqName: FqName, searchScope: GlobalSearchScope): Collection<KtFile> {
|
||||
return PackageIndexUtil.findFilesWithExactPackage(fqName, kotlinSourceAndClassFiles(searchScope, project), project)
|
||||
return PackageIndexUtil.findFilesWithExactPackage(fqName, sourceAndClassFiles(searchScope, project), project)
|
||||
}
|
||||
|
||||
override fun findClassOrObjectDeclarationsInPackage(
|
||||
@@ -128,15 +128,15 @@ public class IDELightClassGenerationSupport(private val project: Project) : Ligh
|
||||
searchScope: GlobalSearchScope
|
||||
): Collection<KtClassOrObject> {
|
||||
return KotlinTopLevelClassByPackageIndex.getInstance().get(
|
||||
packageFqName.asString(), project, kotlinSourceAndClassFiles(searchScope, project))
|
||||
packageFqName.asString(), project, sourceAndClassFiles(searchScope, project))
|
||||
}
|
||||
|
||||
override fun packageExists(fqName: FqName, scope: GlobalSearchScope): Boolean {
|
||||
return PackageIndexUtil.packageExists(fqName, kotlinSourceAndClassFiles(scope, project), project)
|
||||
return PackageIndexUtil.packageExists(fqName, sourceAndClassFiles(scope, project), project)
|
||||
}
|
||||
|
||||
override fun getSubPackages(fqn: FqName, scope: GlobalSearchScope): Collection<FqName> {
|
||||
return PackageIndexUtil.getSubPackageFqNames(fqn, kotlinSourceAndClassFiles(scope, project), project, MemberScope.ALL_NAME_FILTER)
|
||||
return PackageIndexUtil.getSubPackageFqNames(fqn, sourceAndClassFiles(scope, project), project, MemberScope.ALL_NAME_FILTER)
|
||||
}
|
||||
|
||||
override fun getPsiClass(classOrObject: KtClassOrObject): PsiClass? {
|
||||
|
||||
@@ -92,7 +92,7 @@ public fun ResolutionFacade.resolveImportReference(
|
||||
// see com.intellij.psi.impl.file.impl.ResolveScopeManagerImpl.getInherentResolveScope
|
||||
public fun getResolveScope(file: KtFile): GlobalSearchScope {
|
||||
if (file is KtCodeFragment) {
|
||||
file.forcedResolveScope?.let { return KotlinSourceFilterScope.kotlinSourceAndClassFiles(it, file.project) }
|
||||
file.forcedResolveScope?.let { return KotlinSourceFilterScope.sourceAndClassFiles(it, file.project) }
|
||||
}
|
||||
|
||||
return when (file.getModuleInfo()) {
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ public final class DecompiledNavigationUtils {
|
||||
ClassId containerClassId = getContainerClassId(project, referencedDescriptor);
|
||||
if (containerClassId == null) return null;
|
||||
|
||||
GlobalSearchScope scopeToSearchIn = KotlinSourceFilterScope.kotlinSourceAndClassFiles(GlobalSearchScope.allScope(project), project);
|
||||
GlobalSearchScope scopeToSearchIn = KotlinSourceFilterScope.sourceAndClassFiles(GlobalSearchScope.allScope(project), project);
|
||||
|
||||
VirtualFileFinderFactory virtualFileFinderFactory;
|
||||
if (isFromKotlinJavasriptMetadata(referencedDescriptor)) {
|
||||
|
||||
+2
-2
@@ -103,8 +103,8 @@ public class SourceNavigationHelper {
|
||||
|
||||
Project project = declaration.getProject();
|
||||
return includeLibrarySources
|
||||
? KotlinSourceFilterScope.kotlinLibrarySources(GlobalSearchScope.allScope(project), project)
|
||||
: KotlinSourceFilterScope.kotlinLibraryClassFiles(GlobalSearchScope.allScope(project), project);
|
||||
? KotlinSourceFilterScope.librarySources(GlobalSearchScope.allScope(project), project)
|
||||
: KotlinSourceFilterScope.libraryClassFiles(GlobalSearchScope.allScope(project), project);
|
||||
}
|
||||
|
||||
private static List<KtFile> getContainingFiles(@NotNull Iterable<KtNamedDeclaration> declarations) {
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ public class KotlinReferencesSearcher : QueryExecutorBase<PsiReference, Referenc
|
||||
var namedArgsScope = function.useScope.intersectWith(queryParameters.scopeDeterminedByUser)
|
||||
|
||||
if (namedArgsScope is GlobalSearchScope) {
|
||||
namedArgsScope = KotlinSourceFilterScope.kotlinSourcesAndLibraries(namedArgsScope, project)
|
||||
namedArgsScope = KotlinSourceFilterScope.sourcesAndLibraries(namedArgsScope, project)
|
||||
|
||||
val filesWithFunctionName = CacheManager.SERVICE.getInstance(project).getVirtualFilesWithWord(
|
||||
function.name!!, UsageSearchContext.IN_CODE, namedArgsScope, true)
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public class KotlinAnnotationsIndex extends StringStubIndexExtension<KtAnnotatio
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<KtAnnotationEntry> get(@NotNull String s, @NotNull Project project, @NotNull GlobalSearchScope scope) {
|
||||
return super.get(s, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project));
|
||||
return super.get(s, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -46,6 +46,6 @@ public class KotlinClassShortNameIndex extends StringStubIndexExtension<KtClassO
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<KtClassOrObject> get(@NotNull String s, @NotNull Project project, @NotNull GlobalSearchScope scope) {
|
||||
return super.get(s, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project));
|
||||
return super.get(s, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -46,6 +46,6 @@ public class KotlinExactPackagesIndex extends StringStubIndexExtension<KtFile> {
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<KtFile> get(@NotNull String fqName, @NotNull Project project, @NotNull GlobalSearchScope scope) {
|
||||
return super.get(fqName, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project));
|
||||
return super.get(fqName, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ public class KotlinFileFacadeClassByPackageIndex private constructor() : StringS
|
||||
override fun getKey(): StubIndexKey<String, KtFile> = KEY
|
||||
|
||||
override fun get(key: String, project: Project, scope: GlobalSearchScope) =
|
||||
super.get(key, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project))
|
||||
super.get(key, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project))
|
||||
|
||||
companion object {
|
||||
private val KEY = KotlinIndexUtil.createIndexKey(KotlinFileFacadeClassByPackageIndex::class.java)
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ public class KotlinFileFacadeFqNameIndex private constructor() : StringStubIndex
|
||||
override fun getKey(): StubIndexKey<String, KtFile> = KEY
|
||||
|
||||
override fun get(key: String, project: Project, scope: GlobalSearchScope) =
|
||||
super.get(key, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project))
|
||||
super.get(key, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project))
|
||||
|
||||
companion object {
|
||||
private val KEY = KotlinIndexUtil.createIndexKey(KotlinFileFacadeFqNameIndex::class.java)
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ public class KotlinFileFacadeShortNameIndex private constructor() : StringStubIn
|
||||
override fun getKey(): StubIndexKey<String, KtFile> = KEY
|
||||
|
||||
override fun get(key: String, project: Project, scope: GlobalSearchScope) =
|
||||
super.get(key, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project))
|
||||
super.get(key, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project))
|
||||
|
||||
companion object {
|
||||
private val KEY = KotlinIndexUtil.createIndexKey(KotlinFileFacadeShortNameIndex::class.java)
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ public class KotlinFilePartClassIndex private constructor() : StringStubIndexExt
|
||||
override fun getKey(): StubIndexKey<String, KtFile> = KEY
|
||||
|
||||
override fun get(key: String, project: Project, scope: GlobalSearchScope) =
|
||||
super.get(key, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project))
|
||||
super.get(key, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project))
|
||||
|
||||
companion object {
|
||||
private val KEY = KotlinIndexUtil.createIndexKey(KotlinFilePartClassIndex::class.java)
|
||||
|
||||
+1
-1
@@ -46,6 +46,6 @@ public class KotlinFullClassNameIndex extends StringStubIndexExtension<KtClassOr
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<KtClassOrObject> get(@NotNull String fqName, @NotNull Project project, @NotNull GlobalSearchScope scope) {
|
||||
return super.get(fqName, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project));
|
||||
return super.get(fqName, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -45,6 +45,6 @@ public class KotlinFunctionShortNameIndex extends StringStubIndexExtension<KtNam
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<KtNamedFunction> get(@NotNull String s, @NotNull Project project, @NotNull GlobalSearchScope scope) {
|
||||
return super.get(s, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project));
|
||||
return super.get(s, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ public class KotlinMultifileClassPartIndex private constructor() : StringStubInd
|
||||
override fun getKey(): StubIndexKey<String, KtFile> = KEY
|
||||
|
||||
override fun get(key: String, project: Project, scope: GlobalSearchScope) =
|
||||
super.get(key, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project))
|
||||
super.get(key, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project))
|
||||
|
||||
companion object {
|
||||
private val KEY = KotlinIndexUtil.createIndexKey(KotlinMultifileClassPartIndex::class.java)
|
||||
|
||||
+1
-1
@@ -45,6 +45,6 @@ public class KotlinProbablyNothingFunctionShortNameIndex extends StringStubIndex
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<KtNamedFunction> get(@NotNull String s, @NotNull Project project, @NotNull GlobalSearchScope scope) {
|
||||
return super.get(s, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project));
|
||||
return super.get(s, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -45,6 +45,6 @@ public class KotlinProbablyNothingPropertyShortNameIndex extends StringStubIndex
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<KtProperty> get(@NotNull String s, @NotNull Project project, @NotNull GlobalSearchScope scope) {
|
||||
return super.get(s, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project));
|
||||
return super.get(s, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -45,6 +45,6 @@ public class KotlinPropertyShortNameIndex extends StringStubIndexExtension<KtPro
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<KtProperty> get(@NotNull String s, @NotNull Project project, @NotNull GlobalSearchScope scope) {
|
||||
return super.get(s, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project));
|
||||
return super.get(s, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project));
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -28,27 +28,27 @@ import org.jetbrains.kotlin.idea.util.ProjectRootsUtil;
|
||||
|
||||
public class KotlinSourceFilterScope extends DelegatingGlobalSearchScope {
|
||||
@NotNull
|
||||
public static GlobalSearchScope kotlinSourcesAndLibraries(@NotNull GlobalSearchScope delegate, @NotNull Project project) {
|
||||
public static GlobalSearchScope sourcesAndLibraries(@NotNull GlobalSearchScope delegate, @NotNull Project project) {
|
||||
return create(delegate, true, true, true, project);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static GlobalSearchScope kotlinSourceAndClassFiles(@NotNull GlobalSearchScope delegate, @NotNull Project project) {
|
||||
public static GlobalSearchScope sourceAndClassFiles(@NotNull GlobalSearchScope delegate, @NotNull Project project) {
|
||||
return create(delegate, true, false, true, project);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static GlobalSearchScope kotlinSources(@NotNull GlobalSearchScope delegate, @NotNull Project project) {
|
||||
public static GlobalSearchScope sources(@NotNull GlobalSearchScope delegate, @NotNull Project project) {
|
||||
return create(delegate, true, false, false, project);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static GlobalSearchScope kotlinLibrarySources(@NotNull GlobalSearchScope delegate, @NotNull Project project) {
|
||||
public static GlobalSearchScope librarySources(@NotNull GlobalSearchScope delegate, @NotNull Project project) {
|
||||
return create(delegate, false, true, false, project);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static GlobalSearchScope kotlinLibraryClassFiles(@NotNull GlobalSearchScope delegate, @NotNull Project project) {
|
||||
public static GlobalSearchScope libraryClassFiles(@NotNull GlobalSearchScope delegate, @NotNull Project project) {
|
||||
return create(delegate, false, false, true, project);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -46,6 +46,6 @@ public class KotlinSuperClassIndex extends StringStubIndexExtension<KtClassOrObj
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<KtClassOrObject> get(@NotNull String s, @NotNull Project project, @NotNull GlobalSearchScope scope) {
|
||||
return super.get(s, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project));
|
||||
return super.get(s, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -45,6 +45,6 @@ public class KotlinTopLevelClassByPackageIndex extends StringStubIndexExtension<
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<KtClassOrObject> get(@NotNull String fqName, @NotNull Project project, @NotNull GlobalSearchScope scope) {
|
||||
return super.get(fqName, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project));
|
||||
return super.get(fqName, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ public class KotlinTopLevelExtensionsByReceiverTypeIndex private constructor() :
|
||||
override fun getKey() = KEY
|
||||
|
||||
override fun get(s: String, project: Project, scope: GlobalSearchScope)
|
||||
= super.get(s, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project))
|
||||
= super.get(s, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project))
|
||||
|
||||
companion object {
|
||||
private val KEY = KotlinIndexUtil.createIndexKey<String, KtCallableDeclaration>(javaClass<KotlinTopLevelExtensionsByReceiverTypeIndex>())
|
||||
|
||||
+1
-1
@@ -45,6 +45,6 @@ public class KotlinTopLevelFunctionByPackageIndex extends StringStubIndexExtensi
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<KtNamedFunction> get(@NotNull String fqName, @NotNull Project project, @NotNull GlobalSearchScope scope) {
|
||||
return super.get(fqName, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project));
|
||||
return super.get(fqName, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -49,6 +49,6 @@ public class KotlinTopLevelFunctionFqnNameIndex extends StringStubIndexExtension
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<KtNamedFunction> get(@NotNull String s, @NotNull Project project, @NotNull GlobalSearchScope scope) {
|
||||
return super.get(s, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project));
|
||||
return super.get(s, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -45,6 +45,6 @@ public class KotlinTopLevelPropertyByPackageIndex extends StringStubIndexExtensi
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<KtProperty> get(@NotNull String fqName, @NotNull Project project, @NotNull GlobalSearchScope scope) {
|
||||
return super.get(fqName, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project));
|
||||
return super.get(fqName, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -46,6 +46,6 @@ public class KotlinTopLevelPropertyFqnNameIndex extends StringStubIndexExtension
|
||||
@NotNull
|
||||
@Override
|
||||
public Collection<KtProperty> get(@NotNull String s, @NotNull Project project, @NotNull GlobalSearchScope scope) {
|
||||
return super.get(s, project, KotlinSourceFilterScope.kotlinSourcesAndLibraries(scope, project));
|
||||
return super.get(s, project, KotlinSourceFilterScope.sourcesAndLibraries(scope, project));
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -32,5 +32,5 @@ public class PluginDeclarationProviderFactoryService : DeclarationProviderFactor
|
||||
syntheticFiles: Collection<KtFile>,
|
||||
filesScope: GlobalSearchScope
|
||||
): DeclarationProviderFactory =
|
||||
PluginDeclarationProviderFactory(project, KotlinSourceFilterScope.kotlinSources(filesScope, project), storageManager, syntheticFiles)
|
||||
PluginDeclarationProviderFactory(project, KotlinSourceFilterScope.sources(filesScope, project), storageManager, syntheticFiles)
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class KotlinGotoClassContributor implements GotoClassContributor {
|
||||
public NavigationItem[] getItemsByName(String name, String pattern, Project project, boolean includeNonProjectItems) {
|
||||
GlobalSearchScope scope = includeNonProjectItems ? GlobalSearchScope.allScope(project) : GlobalSearchScope.projectScope(project);
|
||||
Collection<KtClassOrObject> classesOrObjects =
|
||||
KotlinClassShortNameIndex.getInstance().get(name, project, KotlinSourceFilterScope.kotlinSourceAndClassFiles(scope, project));
|
||||
KotlinClassShortNameIndex.getInstance().get(name, project, KotlinSourceFilterScope.sourceAndClassFiles(scope, project));
|
||||
|
||||
if (classesOrObjects.isEmpty()) {
|
||||
return NavigationItem.EMPTY_NAVIGATION_ITEM_ARRAY;
|
||||
|
||||
@@ -47,7 +47,7 @@ public class KotlinGotoSymbolContributor implements ChooseByNameContributor {
|
||||
@Override
|
||||
public NavigationItem[] getItemsByName(String name, String pattern, Project project, boolean includeNonProjectItems) {
|
||||
GlobalSearchScope baseScope = includeNonProjectItems ? GlobalSearchScope.allScope(project) : GlobalSearchScope.projectScope(project);
|
||||
GlobalSearchScope noLibrarySourceScope = KotlinSourceFilterScope.kotlinSourceAndClassFiles(baseScope, project);
|
||||
GlobalSearchScope noLibrarySourceScope = KotlinSourceFilterScope.sourceAndClassFiles(baseScope, project);
|
||||
|
||||
Collection<? extends NavigationItem> functions = KotlinFunctionShortNameIndex.getInstance().get(name, project, noLibrarySourceScope);
|
||||
Collection<? extends NavigationItem> properties = KotlinPropertyShortNameIndex.getInstance().get(name, project, noLibrarySourceScope);
|
||||
|
||||
+1
-1
@@ -193,7 +193,7 @@ public class ConflictingExtensionPropertyInspection : AbstractKotlinInspection()
|
||||
object : Task.Modal(project, "Searching for imports to delete", true) {
|
||||
override fun run(indicator: ProgressIndicator) {
|
||||
val importsToDelete = runReadAction {
|
||||
val searchScope = KotlinSourceFilterScope.kotlinSources(GlobalSearchScope.projectScope(project), project)
|
||||
val searchScope = KotlinSourceFilterScope.sources(GlobalSearchScope.projectScope(project), project)
|
||||
ReferencesSearch.search(declaration, searchScope)
|
||||
.filterIsInstance<KtSimpleNameReference>()
|
||||
.map { ref -> ref.expression.getStrictParentOfType<KtImportDirective>() }
|
||||
|
||||
@@ -31,7 +31,7 @@ public class PluginJetFilesProvider {
|
||||
@NotNull
|
||||
public static Collection<KtFile> allFilesInProject(@NotNull Project project) {
|
||||
Collection<KtFile> result = new ArrayList<KtFile>();
|
||||
GlobalSearchScope scope = KotlinSourceFilterScope.kotlinSources(GlobalSearchScope.allScope(project), project);
|
||||
GlobalSearchScope scope = KotlinSourceFilterScope.sources(GlobalSearchScope.allScope(project), project);
|
||||
for (String packageWithFiles : KotlinExactPackagesIndex.getInstance().getAllKeys(project)) {
|
||||
result.addAll(KotlinExactPackagesIndex.getInstance().get(packageWithFiles, project, scope));
|
||||
}
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ public class DeprecatedSymbolUsageInWholeProjectFix(
|
||||
object : Task.Modal(project, "Applying '$text'", true) {
|
||||
override fun run(indicator: ProgressIndicator) {
|
||||
val usages = runReadAction {
|
||||
val searchScope = KotlinSourceFilterScope.kotlinSources(GlobalSearchScope.projectScope(project), project)
|
||||
val searchScope = KotlinSourceFilterScope.sources(GlobalSearchScope.projectScope(project), project)
|
||||
ReferencesSearch.search(psiElement, searchScope)
|
||||
.filterIsInstance<KtSimpleNameReference>()
|
||||
.map { ref -> ref.expression }
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public open class KotlinDirectInheritorsSearcher() : QueryExecutorBase<PsiClass,
|
||||
if (scope == null) return
|
||||
|
||||
runReadAction {
|
||||
val noLibrarySourceScope = KotlinSourceFilterScope.kotlinSourceAndClassFiles(scope, baseClass.getProject())
|
||||
val noLibrarySourceScope = KotlinSourceFilterScope.sourceAndClassFiles(scope, baseClass.getProject())
|
||||
KotlinSuperClassIndex.getInstance().get(name, baseClass.getProject(), noLibrarySourceScope).asSequence()
|
||||
.map { candidate -> SourceNavigationHelper.getOriginalPsiClassOrCreateLightClass(candidate)}
|
||||
.filterNotNull()
|
||||
|
||||
Reference in New Issue
Block a user