From 40900b0050c23440dbcaa46a7bdabbe82c16e717 Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Fri, 29 Apr 2016 12:14:45 +0300 Subject: [PATCH] No explicit runWriteAction required --- .../idea/completion/handlers/KotlinCallableInsertHandler.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/handlers/KotlinCallableInsertHandler.kt b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/handlers/KotlinCallableInsertHandler.kt index e322166de89..a335e461d09 100644 --- a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/handlers/KotlinCallableInsertHandler.kt +++ b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/handlers/KotlinCallableInsertHandler.kt @@ -25,7 +25,6 @@ import org.jetbrains.kotlin.idea.core.completion.DeclarationLookupObject import org.jetbrains.kotlin.idea.imports.importableFqName import org.jetbrains.kotlin.idea.util.CallType import org.jetbrains.kotlin.idea.util.ImportInsertHelper -import org.jetbrains.kotlin.idea.util.application.runWriteAction import org.jetbrains.kotlin.psi.KtFile import org.jetbrains.kotlin.renderer.render import org.jetbrains.kotlin.resolve.DescriptorUtils @@ -46,9 +45,7 @@ abstract class KotlinCallableInsertHandler(val callType: CallType<*>) : BaseDecl val descriptor = o.descriptor as? CallableDescriptor ?: return if (descriptor.extensionReceiverParameter != null || callType == CallType.CALLABLE_REFERENCE) { if (DescriptorUtils.isTopLevelDeclaration(descriptor)) { - runWriteAction { - ImportInsertHelper.getInstance(context.project).importDescriptor(file, descriptor) - } + ImportInsertHelper.getInstance(context.project).importDescriptor(file, descriptor) } } else if (callType == CallType.DEFAULT) {