Fix INRE from find usages activated with Ctrl + Click (EA-137655)
Only Ctrl + Click is affected as find usages from Alt + F7 is a different action (`GotoDeclarationAction` is `DumbAware`, but `ShowUsagesAction` is not).
This commit is contained in:
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.idea.findUsages.handlers
|
||||
import com.intellij.find.findUsages.FindUsagesHandler
|
||||
import com.intellij.find.findUsages.FindUsagesOptions
|
||||
import com.intellij.openapi.diagnostic.Logger
|
||||
import com.intellij.openapi.project.DumbService
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.PsiReference
|
||||
import com.intellij.psi.impl.light.LightMemberReference
|
||||
@@ -73,7 +74,7 @@ abstract class KotlinFindUsagesHandler<T : PsiElement>(psiElement: T,
|
||||
|
||||
protected fun searchReferences(element: PsiElement, processor: Processor<UsageInfo>, options: FindUsagesOptions): Boolean {
|
||||
val searcher = createSearcher(element, processor, options)
|
||||
if (!runReadAction { searcher.buildTaskList() }) return false
|
||||
if (!DumbService.getInstance(element.project).runReadActionInSmartMode<Boolean> { searcher.buildTaskList() }) return false
|
||||
return searcher.executeTasks()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user