Add missing read action
This commit is contained in:
+7
-5
@@ -140,11 +140,13 @@ class KotlinDefinitionsSearcher : QueryExecutor<PsiElement, DefinitionsScopedSea
|
|||||||
for (implementation in implementations) {
|
for (implementation in implementations) {
|
||||||
if (isDelegated(implementation)) continue
|
if (isDelegated(implementation)) continue
|
||||||
|
|
||||||
val mirrorElement = (implementation as? KtLightMethod)?.kotlinOrigin
|
val elementToProcess = runReadAction {
|
||||||
val elementToProcess = when(mirrorElement) {
|
val mirrorElement = (implementation as? KtLightMethod)?.kotlinOrigin
|
||||||
is KtProperty, is KtParameter -> mirrorElement
|
when (mirrorElement) {
|
||||||
is KtPropertyAccessor -> if (mirrorElement.parent is KtProperty) mirrorElement.parent else implementation
|
is KtProperty, is KtParameter -> mirrorElement
|
||||||
else -> implementation
|
is KtPropertyAccessor -> if (mirrorElement.parent is KtProperty) mirrorElement.parent else implementation
|
||||||
|
else -> implementation
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!consumer.process(elementToProcess)) {
|
if (!consumer.process(elementToProcess)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user