Fix search scope during inlining #KT-20251 Fixed

Do not use KotlinSourceFilterScope because build scripts are lost otherwise
This commit is contained in:
Mikhail Glukhikh
2017-10-19 16:35:10 +03:00
parent 26c1aec5df
commit 1b0421d27b
@@ -54,7 +54,7 @@ class KotlinInlineCallableProcessor(
override fun findUsages(): Array<UsageInfo> { override fun findUsages(): Array<UsageInfo> {
if (inlineThisOnly && reference != null) return arrayOf(UsageInfo(reference)) if (inlineThisOnly && reference != null) return arrayOf(UsageInfo(reference))
val usages = runReadAction { val usages = runReadAction {
val searchScope = KotlinSourceFilterScope.projectSources(GlobalSearchScope.projectScope(myProject), myProject) val searchScope = GlobalSearchScope.projectScope(myProject)
ReferencesSearch.search(declaration, searchScope) ReferencesSearch.search(declaration, searchScope)
} }
return usages.map(::UsageInfo).toTypedArray() return usages.map(::UsageInfo).toTypedArray()