From 07f06352d74ceeb773f1fbe1497f7686cd246073 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Tue, 31 Jan 2017 20:37:49 +0300 Subject: [PATCH] if-then --> safe access: run write action manually to avoid AWT events inside --- .../intentions/IfThenToSafeAccessIntention.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/branchedTransformations/intentions/IfThenToSafeAccessIntention.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/branchedTransformations/intentions/IfThenToSafeAccessIntention.kt index 95189b75f00..f9fcea7a076 100644 --- a/idea/src/org/jetbrains/kotlin/idea/intentions/branchedTransformations/intentions/IfThenToSafeAccessIntention.kt +++ b/idea/src/org/jetbrains/kotlin/idea/intentions/branchedTransformations/intentions/IfThenToSafeAccessIntention.kt @@ -21,6 +21,7 @@ import org.jetbrains.kotlin.idea.core.replaced import org.jetbrains.kotlin.idea.inspections.IntentionBasedInspection import org.jetbrains.kotlin.idea.intentions.SelfTargetingOffsetIndependentIntention import org.jetbrains.kotlin.idea.intentions.branchedTransformations.* +import org.jetbrains.kotlin.idea.util.application.runWriteAction import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.psi.* @@ -50,6 +51,8 @@ class IfThenToSafeAccessIntention : SelfTargetingOffsetIndependentIntention