Do not search for text occurrences if this option is switched off

This commit is contained in:
Natalia Selezneva
2019-01-30 12:21:28 +03:00
parent 4a0574dc5f
commit c2dd365158
@@ -52,9 +52,11 @@ abstract class KotlinFindUsagesHandler<T : PsiElement>(psiElement: T,
}
protected fun searchTextOccurrences(element: PsiElement, processor: Processor<UsageInfo>, options: FindUsagesOptions): Boolean {
if (!options.isSearchForTextOccurrences) return false
val scope = options.searchScope
if (options.isSearchForTextOccurrences && scope is GlobalSearchScope) {
if (scope is GlobalSearchScope) {
if (options.fastTrack == null) {
return processUsagesInText(element, processor, scope)
}