add missing read actions for Find Usages (EA-66822)
This commit is contained in:
+2
-1
@@ -168,7 +168,8 @@ public class KotlinReferencesSearcher : QueryExecutorBase<PsiReference, Referenc
|
|||||||
private fun searchNamedElement(queryParameters: ReferencesSearch.SearchParameters, element: PsiNamedElement?,
|
private fun searchNamedElement(queryParameters: ReferencesSearch.SearchParameters, element: PsiNamedElement?,
|
||||||
name: String? = element?.getName()) {
|
name: String? = element?.getName()) {
|
||||||
if (name != null && element != null) {
|
if (name != null && element != null) {
|
||||||
queryParameters.getOptimizer().searchWord(name, queryParameters.getEffectiveSearchScope(), true, element)
|
val scope = runReadAction { queryParameters.getEffectiveSearchScope() }
|
||||||
|
queryParameters.getOptimizer().searchWord(name, scope, true, element)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -101,7 +101,7 @@ public abstract class KotlinFindMemberUsagesHandler<T : JetNamedDeclaration>
|
|||||||
|
|
||||||
val psiMethod: PsiMethod? = when (element) {
|
val psiMethod: PsiMethod? = when (element) {
|
||||||
is PsiMethod -> element
|
is PsiMethod -> element
|
||||||
is JetConstructor<*> -> LightClassUtil.getLightClassMethod(element as JetFunction)
|
is JetConstructor<*> -> runReadAction { LightClassUtil.getLightClassMethod(element as JetFunction) }
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
if (psiMethod != null) {
|
if (psiMethod != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user