From f6a61e8034b6eca1e8d9a2c8dc7e76990a9be26a Mon Sep 17 00:00:00 2001 From: Dmitry Gridin Date: Fri, 31 May 2019 15:26:23 +0700 Subject: [PATCH] Minor: cleanup ChangePackageIntention --- .../changePackage/ChangePackageIntention.kt | 81 ++++++++++--------- 1 file changed, 43 insertions(+), 38 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/refactoring/move/changePackage/ChangePackageIntention.kt b/idea/src/org/jetbrains/kotlin/idea/refactoring/move/changePackage/ChangePackageIntention.kt index 7f18c721bc8..b31aeb5d6f8 100644 --- a/idea/src/org/jetbrains/kotlin/idea/refactoring/move/changePackage/ChangePackageIntention.kt +++ b/idea/src/org/jetbrains/kotlin/idea/refactoring/move/changePackage/ChangePackageIntention.kt @@ -23,8 +23,8 @@ import com.intellij.openapi.application.ApplicationManager import com.intellij.openapi.editor.Editor import com.intellij.openapi.util.TextRange import com.intellij.psi.PsiDocumentManager -import org.jetbrains.kotlin.idea.core.util.CodeInsightUtils import org.jetbrains.kotlin.idea.core.quoteSegmentsIfNeeded +import org.jetbrains.kotlin.idea.core.util.CodeInsightUtils import org.jetbrains.kotlin.idea.intentions.SelfTargetingOffsetIndependentIntention import org.jetbrains.kotlin.idea.refactoring.hasIdentifiersOnly import org.jetbrains.kotlin.idea.util.application.executeWriteCommand @@ -32,9 +32,10 @@ import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.FqNameUnsafe import org.jetbrains.kotlin.psi.KtPackageDirective -class ChangePackageIntention: SelfTargetingOffsetIndependentIntention(KtPackageDirective::class.java, "Change package") { +class ChangePackageIntention : + SelfTargetingOffsetIndependentIntention(KtPackageDirective::class.java, "Change package") { companion object { - private val PACKAGE_NAME_VAR = "PACKAGE_NAME" + private const val PACKAGE_NAME_VAR = "PACKAGE_NAME" } override fun isApplicableTo(element: KtPackageDirective) = element.packageNameExpression != null @@ -54,14 +55,14 @@ class ChangePackageIntention: SelfTargetingOffsetIndependentIntention