From 7d3b28d75b1ad55b093e7ed655e5b3610d5795ce Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Wed, 27 May 2020 21:21:37 +0900 Subject: [PATCH] Add missing runReadAction call (EA-223789) --- .../idea/codeInsight/KotlinCopyPasteReferenceProcessor.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/codeInsight/KotlinCopyPasteReferenceProcessor.kt b/idea/src/org/jetbrains/kotlin/idea/codeInsight/KotlinCopyPasteReferenceProcessor.kt index fb7929cd768..77fe414dcff 100644 --- a/idea/src/org/jetbrains/kotlin/idea/codeInsight/KotlinCopyPasteReferenceProcessor.kt +++ b/idea/src/org/jetbrains/kotlin/idea/codeInsight/KotlinCopyPasteReferenceProcessor.kt @@ -173,7 +173,10 @@ class KotlinCopyPasteReferenceProcessor : CopyPastePostProcessor() } + val allElementsToResolve = runReadAction { + elements.flatMap { it.collectDescendantsOfType() } + } + // TODO: allowResolveInDispatchThread could be dropped as soon as // ConvertJavaCopyPasteProcessor will perform it on non UI thread val bindingContext = runReadAction {