From de0cbf584411f22dedb012b2536a8813b857cf5d Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Wed, 18 Apr 2018 20:21:27 +0300 Subject: [PATCH] Join parameter/argument list: use document to delete whitespaces Otherwise fix has no effect in IDE. Related to KT-23266 --- .../idea/intentions/ChopParameterListIntention.kt | 2 +- .../idea/intentions/JoinParameterListIntention.kt | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/ChopParameterListIntention.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/ChopParameterListIntention.kt index c6c66dbcd3f..b52d58dbf89 100644 --- a/idea/src/org/jetbrains/kotlin/idea/intentions/ChopParameterListIntention.kt +++ b/idea/src/org/jetbrains/kotlin/idea/intentions/ChopParameterListIntention.kt @@ -29,7 +29,7 @@ import org.jetbrains.kotlin.psi.psiUtil.siblings import org.jetbrains.kotlin.psi.psiUtil.startOffset abstract class AbstractChopListIntention( - private val listClass: Class, + protected val listClass: Class, private val elementClass: Class, text: String ) : SelfTargetingOffsetIndependentIntention(listClass, text), LowPriorityAction { diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/JoinParameterListIntention.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/JoinParameterListIntention.kt index d9b3791ebde..919bbe59b17 100644 --- a/idea/src/org/jetbrains/kotlin/idea/intentions/JoinParameterListIntention.kt +++ b/idea/src/org/jetbrains/kotlin/idea/intentions/JoinParameterListIntention.kt @@ -7,6 +7,8 @@ package org.jetbrains.kotlin.idea.intentions import com.intellij.openapi.editor.Editor import org.jetbrains.kotlin.psi.* +import org.jetbrains.kotlin.psi.psiUtil.endOffset +import org.jetbrains.kotlin.psi.psiUtil.startOffset abstract class AbstractJoinListIntention( listClass: Class, @@ -21,9 +23,14 @@ abstract class AbstractJoinListIntention