diff --git a/idea/resources/META-INF/plugin-common.xml b/idea/resources/META-INF/plugin-common.xml
index 3c51a3ba3d1..ec305138016 100644
--- a/idea/resources/META-INF/plugin-common.xml
+++ b/idea/resources/META-INF/plugin-common.xml
@@ -1683,11 +1683,6 @@
Kotlin
-
- org.jetbrains.kotlin.idea.intentions.ConvertTrimIndentToTrimMarginIntention
- Kotlin
-
-
org.jetbrains.kotlin.idea.intentions.ConvertPropertyGetterToInitializerIntention
Kotlin
diff --git a/idea/resources/intentionDescriptions/ConvertTrimIndentToTrimMarginIntention/after.kt.template b/idea/resources/intentionDescriptions/ConvertTrimIndentToTrimMarginIntention/after.kt.template
deleted file mode 100644
index 1c94172d80e..00000000000
--- a/idea/resources/intentionDescriptions/ConvertTrimIndentToTrimMarginIntention/after.kt.template
+++ /dev/null
@@ -1,7 +0,0 @@
-fun test() {
- val x =
- """
- |a
- |b
- """.trimMargin()
-}
\ No newline at end of file
diff --git a/idea/resources/intentionDescriptions/ConvertTrimIndentToTrimMarginIntention/before.kt.template b/idea/resources/intentionDescriptions/ConvertTrimIndentToTrimMarginIntention/before.kt.template
deleted file mode 100644
index bc79586214c..00000000000
--- a/idea/resources/intentionDescriptions/ConvertTrimIndentToTrimMarginIntention/before.kt.template
+++ /dev/null
@@ -1,7 +0,0 @@
-fun test() {
- val x =
- """
- a
- b
- """.trimIndent()
-}
\ No newline at end of file
diff --git a/idea/resources/intentionDescriptions/ConvertTrimIndentToTrimMarginIntention/description.html b/idea/resources/intentionDescriptions/ConvertTrimIndentToTrimMarginIntention/description.html
deleted file mode 100644
index 4e78233c6d4..00000000000
--- a/idea/resources/intentionDescriptions/ConvertTrimIndentToTrimMarginIntention/description.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-This intention converts an trimIndent() call to an trimMargin() call.
-
-
\ No newline at end of file
diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/ConvertTrimIndentToTrimMarginIntention.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/ConvertTrimIndentToTrimMarginIntention.kt
deleted file mode 100644
index 833e52c9896..00000000000
--- a/idea/src/org/jetbrains/kotlin/idea/intentions/ConvertTrimIndentToTrimMarginIntention.kt
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
- * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
- */
-
-package org.jetbrains.kotlin.idea.intentions
-
-import com.intellij.openapi.editor.Editor
-import org.jetbrains.kotlin.name.FqName
-import org.jetbrains.kotlin.psi.KtCallExpression
-import org.jetbrains.kotlin.psi.KtPsiFactory
-import org.jetbrains.kotlin.psi.KtStringTemplateExpression
-import org.jetbrains.kotlin.psi.psiUtil.getQualifiedExpressionForSelector
-import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
-
-class ConvertTrimIndentToTrimMarginIntention : SelfTargetingIntention(
- KtCallExpression::class.java, "Convert to 'trimMargin'"
-) {
- override fun isApplicableTo(element: KtCallExpression, caretOffset: Int): Boolean {
- val template = (element.getQualifiedExpressionForSelector()?.receiverExpression as? KtStringTemplateExpression) ?: return false
- if (!template.text.startsWith("\"\"\"")) return false
-
- val callee = element.calleeExpression ?: return false
- if (callee.text != "trimIndent" || callee.getCallableDescriptor()?.fqNameSafe != FqName("kotlin.text.trimIndent")) return false
-
- val entries = template.entries
- return listOfNotNull(entries.firstOrNull(), entries.lastOrNull()).all { it.text.isLineBreakOrBlank() }
- }
-
- override fun applyTo(element: KtCallExpression, editor: Editor?) {
- val qualifiedExpression = element.getQualifiedExpressionForSelector()
- val template = (qualifiedExpression?.receiverExpression as? KtStringTemplateExpression) ?: return
-
- val indent = template.entries.asSequence().mapNotNull { stringTemplateEntry ->
- val text = stringTemplateEntry.text
- if (text.isLineBreakOrBlank()) null else text.takeWhile { it.isWhitespace() }
- }.minBy { it.length } ?: ""
-
- val newTemplate = buildString {
- template.entries.forEach { entry ->
- val text = entry.text
- if (text.isLineBreakOrBlank()) {
- append(text)
- } else {
- append(indent)
- append("|")
- append(text.drop(indent.length))
- }
- }
- }
- qualifiedExpression.replace(KtPsiFactory(element).createExpression("\"\"\"$newTemplate\"\"\".trimMargin()"))
- }
-}
-
-private fun String.isLineBreakOrBlank() = this == "\n" || this.isBlank()
\ No newline at end of file
diff --git a/idea/testData/intentions/convertTrimIndentToTrimMargin/.intention b/idea/testData/intentions/convertTrimIndentToTrimMargin/.intention
deleted file mode 100644
index aab5bd3a9eb..00000000000
--- a/idea/testData/intentions/convertTrimIndentToTrimMargin/.intention
+++ /dev/null
@@ -1 +0,0 @@
-org.jetbrains.kotlin.idea.intentions.ConvertTrimIndentToTrimMarginIntention
diff --git a/idea/testData/intentions/convertTrimIndentToTrimMargin/differentIndent.kt b/idea/testData/intentions/convertTrimIndentToTrimMargin/differentIndent.kt
deleted file mode 100644
index 3767088a06a..00000000000
--- a/idea/testData/intentions/convertTrimIndentToTrimMargin/differentIndent.kt
+++ /dev/null
@@ -1,9 +0,0 @@
-// WITH_RUNTIME
-fun test() {
- val x =
- """
- a
- b
- c
- """.trimIndent()
-}
\ No newline at end of file
diff --git a/idea/testData/intentions/convertTrimIndentToTrimMargin/differentIndent.kt.after b/idea/testData/intentions/convertTrimIndentToTrimMargin/differentIndent.kt.after
deleted file mode 100644
index 22542896f51..00000000000
--- a/idea/testData/intentions/convertTrimIndentToTrimMargin/differentIndent.kt.after
+++ /dev/null
@@ -1,9 +0,0 @@
-// WITH_RUNTIME
-fun test() {
- val x =
- """
- |a
- | b
- | c
- """.trimMargin()
-}
\ No newline at end of file
diff --git a/idea/testData/intentions/convertTrimIndentToTrimMargin/notBlankFirst.kt b/idea/testData/intentions/convertTrimIndentToTrimMargin/notBlankFirst.kt
deleted file mode 100644
index 82e1e3b04a6..00000000000
--- a/idea/testData/intentions/convertTrimIndentToTrimMargin/notBlankFirst.kt
+++ /dev/null
@@ -1,9 +0,0 @@
-// IS_APPLICABLE: false
-// WITH_RUNTIME
-fun test() {
- val x =
- """1
- a
- b
- """.trimIndent()
-}
\ No newline at end of file
diff --git a/idea/testData/intentions/convertTrimIndentToTrimMargin/notBlankLast.kt b/idea/testData/intentions/convertTrimIndentToTrimMargin/notBlankLast.kt
deleted file mode 100644
index d0ac3be6dfa..00000000000
--- a/idea/testData/intentions/convertTrimIndentToTrimMargin/notBlankLast.kt
+++ /dev/null
@@ -1,9 +0,0 @@
-// IS_APPLICABLE: false
-// WITH_RUNTIME
-fun test() {
- val x =
- """
- a
- b
- 1""".trimIndent()
-}
\ No newline at end of file
diff --git a/idea/testData/intentions/convertTrimIndentToTrimMargin/notRawString.kt b/idea/testData/intentions/convertTrimIndentToTrimMargin/notRawString.kt
deleted file mode 100644
index 546af3e46f2..00000000000
--- a/idea/testData/intentions/convertTrimIndentToTrimMargin/notRawString.kt
+++ /dev/null
@@ -1,5 +0,0 @@
-// IS_APPLICABLE: false
-// WITH_RUNTIME
-fun test() {
- val x = " a".trimIndent()
-}
\ No newline at end of file
diff --git a/idea/testData/intentions/convertTrimIndentToTrimMargin/simple.kt b/idea/testData/intentions/convertTrimIndentToTrimMargin/simple.kt
deleted file mode 100644
index 67cce5562fe..00000000000
--- a/idea/testData/intentions/convertTrimIndentToTrimMargin/simple.kt
+++ /dev/null
@@ -1,10 +0,0 @@
-// INTENTION_TEXT: "Convert to 'trimMargin'"
-// WITH_RUNTIME
-fun test() {
- val x =
- """
- a
-
- b
- """.trimIndent()
-}
\ No newline at end of file
diff --git a/idea/testData/intentions/convertTrimIndentToTrimMargin/simple.kt.after b/idea/testData/intentions/convertTrimIndentToTrimMargin/simple.kt.after
deleted file mode 100644
index 5db4a664817..00000000000
--- a/idea/testData/intentions/convertTrimIndentToTrimMargin/simple.kt.after
+++ /dev/null
@@ -1,10 +0,0 @@
-// INTENTION_TEXT: "Convert to 'trimMargin'"
-// WITH_RUNTIME
-fun test() {
- val x =
- """
- |a
-
- |b
- """.trimMargin()
-}
\ No newline at end of file
diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java
index 8000d9f3cc1..5f1a7f38c1a 100644
--- a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java
+++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java
@@ -8132,44 +8132,6 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
}
}
- @TestMetadata("idea/testData/intentions/convertTrimIndentToTrimMargin")
- @TestDataPath("$PROJECT_ROOT")
- @RunWith(JUnit3RunnerWithInners.class)
- public static class ConvertTrimIndentToTrimMargin extends AbstractIntentionTest {
- private void runTest(String testDataFilePath) throws Exception {
- KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
- }
-
- public void testAllFilesPresentInConvertTrimIndentToTrimMargin() throws Exception {
- KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/convertTrimIndentToTrimMargin"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true);
- }
-
- @TestMetadata("differentIndent.kt")
- public void testDifferentIndent() throws Exception {
- runTest("idea/testData/intentions/convertTrimIndentToTrimMargin/differentIndent.kt");
- }
-
- @TestMetadata("notBlankFirst.kt")
- public void testNotBlankFirst() throws Exception {
- runTest("idea/testData/intentions/convertTrimIndentToTrimMargin/notBlankFirst.kt");
- }
-
- @TestMetadata("notBlankLast.kt")
- public void testNotBlankLast() throws Exception {
- runTest("idea/testData/intentions/convertTrimIndentToTrimMargin/notBlankLast.kt");
- }
-
- @TestMetadata("notRawString.kt")
- public void testNotRawString() throws Exception {
- runTest("idea/testData/intentions/convertTrimIndentToTrimMargin/notRawString.kt");
- }
-
- @TestMetadata("simple.kt")
- public void testSimple() throws Exception {
- runTest("idea/testData/intentions/convertTrimIndentToTrimMargin/simple.kt");
- }
- }
-
@TestMetadata("idea/testData/intentions/convertTrimMarginToTrimIndent")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)