From 391a0fdde5788ad7c8e854e7eba03a4e186256b5 Mon Sep 17 00:00:00 2001 From: shiraji Date: Thu, 22 Sep 2016 17:28:42 +0900 Subject: [PATCH] Add "Copy concatenation text to clipboard" intention #KT-13744 Fixed --- .../kotlin/generators/tests/GenerateTests.kt | 5 ++ .../after.kt.template | 2 + .../before.kt.template | 3 + .../description.html | 7 +++ idea/src/META-INF/plugin.xml | 5 ++ .../ConcatenatedStringGenerator.kt | 54 ++++++++++++++++ ...yConcatenatedStringToClipboardIntention.kt | 41 +++++++++++++ .../concatenatedStringGenerator/constants.kt | 1 + .../constants.kt.result | 1 + .../concatenatedStringGenerator/simple.kt | 1 + .../simple.kt.result | 1 + .../stringtemplate.kt | 1 + .../stringtemplate.kt.result | 1 + .../concatenatedStringGenerator/variables.kt | 1 + .../variables.kt.result | 1 + .../.intention | 1 + .../constants.kt | 4 ++ .../constants.kt.after | 4 ++ .../numbers.kt | 3 + .../simple.kt | 4 ++ .../simple.kt.after | 4 ++ .../simpleString.kt | 3 + .../variables.kt | 5 ++ .../variables.kt.after | 5 ++ ...AbstractConcatenatedStringGeneratorTest.kt | 39 ++++++++++++ ...catenatedStringGeneratorTestGenerated.java | 61 +++++++++++++++++++ .../intentions/IntentionTestGenerated.java | 39 ++++++++++++ 27 files changed, 297 insertions(+) create mode 100644 idea/resources/intentionDescriptions/CopyConcatenatedStringToClipboardIntention/after.kt.template create mode 100644 idea/resources/intentionDescriptions/CopyConcatenatedStringToClipboardIntention/before.kt.template create mode 100644 idea/resources/intentionDescriptions/CopyConcatenatedStringToClipboardIntention/description.html create mode 100644 idea/src/org/jetbrains/kotlin/idea/intentions/copyConcatenatedStringToClipboard/ConcatenatedStringGenerator.kt create mode 100644 idea/src/org/jetbrains/kotlin/idea/intentions/copyConcatenatedStringToClipboard/CopyConcatenatedStringToClipboardIntention.kt create mode 100644 idea/testData/concatenatedStringGenerator/constants.kt create mode 100644 idea/testData/concatenatedStringGenerator/constants.kt.result create mode 100644 idea/testData/concatenatedStringGenerator/simple.kt create mode 100644 idea/testData/concatenatedStringGenerator/simple.kt.result create mode 100644 idea/testData/concatenatedStringGenerator/stringtemplate.kt create mode 100644 idea/testData/concatenatedStringGenerator/stringtemplate.kt.result create mode 100644 idea/testData/concatenatedStringGenerator/variables.kt create mode 100644 idea/testData/concatenatedStringGenerator/variables.kt.result create mode 100644 idea/testData/intentions/copyConcatenatedStringToClipboard/.intention create mode 100644 idea/testData/intentions/copyConcatenatedStringToClipboard/constants.kt create mode 100644 idea/testData/intentions/copyConcatenatedStringToClipboard/constants.kt.after create mode 100644 idea/testData/intentions/copyConcatenatedStringToClipboard/numbers.kt create mode 100644 idea/testData/intentions/copyConcatenatedStringToClipboard/simple.kt create mode 100644 idea/testData/intentions/copyConcatenatedStringToClipboard/simple.kt.after create mode 100644 idea/testData/intentions/copyConcatenatedStringToClipboard/simpleString.kt create mode 100644 idea/testData/intentions/copyConcatenatedStringToClipboard/variables.kt create mode 100644 idea/testData/intentions/copyConcatenatedStringToClipboard/variables.kt.after create mode 100644 idea/tests/org/jetbrains/kotlin/idea/intentions/AbstractConcatenatedStringGeneratorTest.kt create mode 100644 idea/tests/org/jetbrains/kotlin/idea/intentions/ConcatenatedStringGeneratorTestGenerated.java diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index 6a978864f0c..ace85b15958 100755 --- a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -90,6 +90,7 @@ import org.jetbrains.kotlin.idea.imports.AbstractOptimizeImportsTest import org.jetbrains.kotlin.idea.intentions.AbstractIntentionTest import org.jetbrains.kotlin.idea.intentions.AbstractIntentionTest2 import org.jetbrains.kotlin.idea.intentions.AbstractMultiFileIntentionTest +import org.jetbrains.kotlin.idea.intentions.AbstractConcatenatedStringGeneratorTest import org.jetbrains.kotlin.idea.intentions.declarations.AbstractJoinLinesTest import org.jetbrains.kotlin.idea.internal.AbstractBytecodeToolWindowTest import org.jetbrains.kotlin.idea.kdoc.AbstractKDocHighlightingTest @@ -529,6 +530,10 @@ fun main(args: Array) { model("intentions/loopToCallChain", pattern = "^([\\w\\-_]+)\\.kt$") } + testClass { + model("concatenatedStringGenerator", pattern = "^([\\w\\-_]+)\\.kt$") + } + testClass() { model("intentions", pattern = "^(inspections\\.test)$", singleClass = true) model("inspections", pattern = "^(inspections\\.test)$", singleClass = true) diff --git a/idea/resources/intentionDescriptions/CopyConcatenatedStringToClipboardIntention/after.kt.template b/idea/resources/intentionDescriptions/CopyConcatenatedStringToClipboardIntention/after.kt.template new file mode 100644 index 00000000000..473a84f6f16 --- /dev/null +++ b/idea/resources/intentionDescriptions/CopyConcatenatedStringToClipboardIntention/after.kt.template @@ -0,0 +1,2 @@ +the following text is copied to the clipboard: +s: ? t: ? \ No newline at end of file diff --git a/idea/resources/intentionDescriptions/CopyConcatenatedStringToClipboardIntention/before.kt.template b/idea/resources/intentionDescriptions/CopyConcatenatedStringToClipboardIntention/before.kt.template new file mode 100644 index 00000000000..c2ffd40a886 --- /dev/null +++ b/idea/resources/intentionDescriptions/CopyConcatenatedStringToClipboardIntention/before.kt.template @@ -0,0 +1,3 @@ +fun p(s: String, t: String) { + println("s: $s t: $t") +} diff --git a/idea/resources/intentionDescriptions/CopyConcatenatedStringToClipboardIntention/description.html b/idea/resources/intentionDescriptions/CopyConcatenatedStringToClipboardIntention/description.html new file mode 100644 index 00000000000..1a21d782393 --- /dev/null +++ b/idea/resources/intentionDescriptions/CopyConcatenatedStringToClipboardIntention/description.html @@ -0,0 +1,7 @@ + + +This intention copies the text of a String concatenation +to the system clipboard. This can be useful for example when you have a multi-line SQL query in +your code, split into concatenated lines which you need to copy to an external application. + + \ No newline at end of file diff --git a/idea/src/META-INF/plugin.xml b/idea/src/META-INF/plugin.xml index b4bc6829045..0c88e154913 100644 --- a/idea/src/META-INF/plugin.xml +++ b/idea/src/META-INF/plugin.xml @@ -1354,6 +1354,11 @@ Kotlin + + org.jetbrains.kotlin.idea.intentions.copyConcatenatedStringToClipboard.CopyConcatenatedStringToClipboardIntention + Kotlin + + this.appendTo(sb) + is KtConstantExpression -> sb.append(text) + is KtStringTemplateExpression -> this.appendTo(sb) + else -> sb.append("?") + } + } + + private fun KtStringTemplateExpression.appendTo(sb: StringBuilder) { + collectDescendantsOfType().forEach { + stringTemplate -> + when (stringTemplate) { + is KtLiteralStringTemplateEntry -> sb.append(stringTemplate.text) + is KtEscapeStringTemplateEntry -> sb.append(stringTemplate.unescapedValue) + else -> sb.append("?") + } + } + } +} \ No newline at end of file diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/copyConcatenatedStringToClipboard/CopyConcatenatedStringToClipboardIntention.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/copyConcatenatedStringToClipboard/CopyConcatenatedStringToClipboardIntention.kt new file mode 100644 index 00000000000..10d1fa90555 --- /dev/null +++ b/idea/src/org/jetbrains/kotlin/idea/intentions/copyConcatenatedStringToClipboard/CopyConcatenatedStringToClipboardIntention.kt @@ -0,0 +1,41 @@ +/* + * Copyright 2010-2016 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin.idea.intentions.copyConcatenatedStringToClipboard + +import com.intellij.openapi.editor.Editor +import com.intellij.openapi.ide.CopyPasteManager +import org.jetbrains.kotlin.builtins.KotlinBuiltIns +import org.jetbrains.kotlin.idea.caches.resolve.analyze +import org.jetbrains.kotlin.idea.intentions.SelfTargetingOffsetIndependentIntention +import org.jetbrains.kotlin.lexer.KtTokens +import org.jetbrains.kotlin.psi.KtBinaryExpression +import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall +import java.awt.datatransfer.StringSelection + +class CopyConcatenatedStringToClipboardIntention : SelfTargetingOffsetIndependentIntention( + KtBinaryExpression::class.java, "Copy concatenation text to clipboard") { + override fun applyTo(element: KtBinaryExpression, editor: Editor?) { + val text = ConcatenatedStringGenerator().create(element) + CopyPasteManager.getInstance().setContents(StringSelection(text)) + } + + override fun isApplicableTo(element: KtBinaryExpression): Boolean { + if (element.operationToken != KtTokens.PLUS) return false + val resolvedCall = element.getResolvedCall(element.analyze()) ?: return false + return KotlinBuiltIns.isString(resolvedCall.candidateDescriptor.returnType) + } +} \ No newline at end of file diff --git a/idea/testData/concatenatedStringGenerator/constants.kt b/idea/testData/concatenatedStringGenerator/constants.kt new file mode 100644 index 00000000000..136bbe32160 --- /dev/null +++ b/idea/testData/concatenatedStringGenerator/constants.kt @@ -0,0 +1 @@ +"" + 1 + 1.1 + "foo" \ No newline at end of file diff --git a/idea/testData/concatenatedStringGenerator/constants.kt.result b/idea/testData/concatenatedStringGenerator/constants.kt.result new file mode 100644 index 00000000000..72123464fac --- /dev/null +++ b/idea/testData/concatenatedStringGenerator/constants.kt.result @@ -0,0 +1 @@ +11.1foo \ No newline at end of file diff --git a/idea/testData/concatenatedStringGenerator/simple.kt b/idea/testData/concatenatedStringGenerator/simple.kt new file mode 100644 index 00000000000..8c4c39a8813 --- /dev/null +++ b/idea/testData/concatenatedStringGenerator/simple.kt @@ -0,0 +1 @@ +"foo" + "bar" \ No newline at end of file diff --git a/idea/testData/concatenatedStringGenerator/simple.kt.result b/idea/testData/concatenatedStringGenerator/simple.kt.result new file mode 100644 index 00000000000..f6ea0495187 --- /dev/null +++ b/idea/testData/concatenatedStringGenerator/simple.kt.result @@ -0,0 +1 @@ +foobar \ No newline at end of file diff --git a/idea/testData/concatenatedStringGenerator/stringtemplate.kt b/idea/testData/concatenatedStringGenerator/stringtemplate.kt new file mode 100644 index 00000000000..b7403f4871a --- /dev/null +++ b/idea/testData/concatenatedStringGenerator/stringtemplate.kt @@ -0,0 +1 @@ +"foo$foo$bar" + "${bar}${bar2()}bar" \ No newline at end of file diff --git a/idea/testData/concatenatedStringGenerator/stringtemplate.kt.result b/idea/testData/concatenatedStringGenerator/stringtemplate.kt.result new file mode 100644 index 00000000000..63de438a127 --- /dev/null +++ b/idea/testData/concatenatedStringGenerator/stringtemplate.kt.result @@ -0,0 +1 @@ +foo????bar \ No newline at end of file diff --git a/idea/testData/concatenatedStringGenerator/variables.kt b/idea/testData/concatenatedStringGenerator/variables.kt new file mode 100644 index 00000000000..5c92a735c5c --- /dev/null +++ b/idea/testData/concatenatedStringGenerator/variables.kt @@ -0,0 +1 @@ +"" + b + "foo" \ No newline at end of file diff --git a/idea/testData/concatenatedStringGenerator/variables.kt.result b/idea/testData/concatenatedStringGenerator/variables.kt.result new file mode 100644 index 00000000000..3060c348600 --- /dev/null +++ b/idea/testData/concatenatedStringGenerator/variables.kt.result @@ -0,0 +1 @@ +?foo \ No newline at end of file diff --git a/idea/testData/intentions/copyConcatenatedStringToClipboard/.intention b/idea/testData/intentions/copyConcatenatedStringToClipboard/.intention new file mode 100644 index 00000000000..8de0b8f2349 --- /dev/null +++ b/idea/testData/intentions/copyConcatenatedStringToClipboard/.intention @@ -0,0 +1 @@ +org.jetbrains.kotlin.idea.intentions.copyConcatenatedStringToClipboard.CopyConcatenatedStringToClipboardIntention \ No newline at end of file diff --git a/idea/testData/intentions/copyConcatenatedStringToClipboard/constants.kt b/idea/testData/intentions/copyConcatenatedStringToClipboard/constants.kt new file mode 100644 index 00000000000..516901bdf53 --- /dev/null +++ b/idea/testData/intentions/copyConcatenatedStringToClipboard/constants.kt @@ -0,0 +1,4 @@ +// IS_APPLICABLE: true +// INTENTION_TEXT: Copy concatenation text to clipboard + +val s = "" + 1 + 1.1 + "foo" \ No newline at end of file diff --git a/idea/testData/intentions/copyConcatenatedStringToClipboard/constants.kt.after b/idea/testData/intentions/copyConcatenatedStringToClipboard/constants.kt.after new file mode 100644 index 00000000000..e24d019cd95 --- /dev/null +++ b/idea/testData/intentions/copyConcatenatedStringToClipboard/constants.kt.after @@ -0,0 +1,4 @@ +// IS_APPLICABLE: true +// INTENTION_TEXT: Copy concatenation text to clipboard + +val s = "" + 1 + 1.1 + "foo" \ No newline at end of file diff --git a/idea/testData/intentions/copyConcatenatedStringToClipboard/numbers.kt b/idea/testData/intentions/copyConcatenatedStringToClipboard/numbers.kt new file mode 100644 index 00000000000..cce3cdb3fcc --- /dev/null +++ b/idea/testData/intentions/copyConcatenatedStringToClipboard/numbers.kt @@ -0,0 +1,3 @@ +// IS_APPLICABLE: false + +val foo = 1 + 1 \ No newline at end of file diff --git a/idea/testData/intentions/copyConcatenatedStringToClipboard/simple.kt b/idea/testData/intentions/copyConcatenatedStringToClipboard/simple.kt new file mode 100644 index 00000000000..2365c0fd216 --- /dev/null +++ b/idea/testData/intentions/copyConcatenatedStringToClipboard/simple.kt @@ -0,0 +1,4 @@ +// IS_APPLICABLE: true +// INTENTION_TEXT: Copy concatenation text to clipboard + +val foo = "foo" + "bar" \ No newline at end of file diff --git a/idea/testData/intentions/copyConcatenatedStringToClipboard/simple.kt.after b/idea/testData/intentions/copyConcatenatedStringToClipboard/simple.kt.after new file mode 100644 index 00000000000..7de9792f411 --- /dev/null +++ b/idea/testData/intentions/copyConcatenatedStringToClipboard/simple.kt.after @@ -0,0 +1,4 @@ +// IS_APPLICABLE: true +// INTENTION_TEXT: Copy concatenation text to clipboard + +val foo = "foo" + "bar" \ No newline at end of file diff --git a/idea/testData/intentions/copyConcatenatedStringToClipboard/simpleString.kt b/idea/testData/intentions/copyConcatenatedStringToClipboard/simpleString.kt new file mode 100644 index 00000000000..de047bca154 --- /dev/null +++ b/idea/testData/intentions/copyConcatenatedStringToClipboard/simpleString.kt @@ -0,0 +1,3 @@ +// IS_APPLICABLE: false + +val foo = "foo" \ No newline at end of file diff --git a/idea/testData/intentions/copyConcatenatedStringToClipboard/variables.kt b/idea/testData/intentions/copyConcatenatedStringToClipboard/variables.kt new file mode 100644 index 00000000000..70ca8c30c87 --- /dev/null +++ b/idea/testData/intentions/copyConcatenatedStringToClipboard/variables.kt @@ -0,0 +1,5 @@ +// IS_APPLICABLE: true +// INTENTION_TEXT: Copy concatenation text to clipboard + +val b = 100 +val s = "" + b + "foo" \ No newline at end of file diff --git a/idea/testData/intentions/copyConcatenatedStringToClipboard/variables.kt.after b/idea/testData/intentions/copyConcatenatedStringToClipboard/variables.kt.after new file mode 100644 index 00000000000..45772815521 --- /dev/null +++ b/idea/testData/intentions/copyConcatenatedStringToClipboard/variables.kt.after @@ -0,0 +1,5 @@ +// IS_APPLICABLE: true +// INTENTION_TEXT: Copy concatenation text to clipboard + +val b = 100 +val s = "" + b + "foo" \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/AbstractConcatenatedStringGeneratorTest.kt b/idea/tests/org/jetbrains/kotlin/idea/intentions/AbstractConcatenatedStringGeneratorTest.kt new file mode 100644 index 00000000000..fe64deae07a --- /dev/null +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/AbstractConcatenatedStringGeneratorTest.kt @@ -0,0 +1,39 @@ +/* + * Copyright 2010-2016 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin.idea.intentions + +import junit.framework.TestCase +import org.jetbrains.kotlin.idea.intentions.copyConcatenatedStringToClipboard.ConcatenatedStringGenerator +import org.jetbrains.kotlin.idea.test.KotlinCodeInsightTestCase +import org.jetbrains.kotlin.psi.KtBinaryExpression +import org.jetbrains.kotlin.psi.KtPsiFactory +import java.io.File + +abstract class AbstractConcatenatedStringGeneratorTest : KotlinCodeInsightTestCase() { + + @Throws(Exception::class) + protected fun doTest(path: String) { + val mainFile = File(path) + val readText = mainFile.readText() + val resultFile = File("$path.result") + val expectedText = resultFile.readText() + val expression = KtPsiFactory(project).createExpression(readText) as? KtBinaryExpression + TestCase.assertNotNull("Invalid expression: $readText", expression) + val generatedString = ConcatenatedStringGenerator().create(expression!!) + TestCase.assertEquals("mismatch '$expectedText' - '$generatedString'", expectedText, generatedString) + } +} \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/ConcatenatedStringGeneratorTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/ConcatenatedStringGeneratorTestGenerated.java new file mode 100644 index 00000000000..f4ba3a229b3 --- /dev/null +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/ConcatenatedStringGeneratorTestGenerated.java @@ -0,0 +1,61 @@ +/* + * Copyright 2010-2016 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin.idea.intentions; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.JUnit3RunnerWithInners; +import org.jetbrains.kotlin.test.KotlinTestUtils; +import org.jetbrains.kotlin.test.TestMetadata; +import org.junit.runner.RunWith; + +import java.io.File; +import java.util.regex.Pattern; + +/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +@TestMetadata("idea/testData/concatenatedStringGenerator") +@TestDataPath("$PROJECT_ROOT") +@RunWith(JUnit3RunnerWithInners.class) +public class ConcatenatedStringGeneratorTestGenerated extends AbstractConcatenatedStringGeneratorTest { + public void testAllFilesPresentInConcatenatedStringGenerator() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/concatenatedStringGenerator"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); + } + + @TestMetadata("constants.kt") + public void testConstants() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/concatenatedStringGenerator/constants.kt"); + doTest(fileName); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/concatenatedStringGenerator/simple.kt"); + doTest(fileName); + } + + @TestMetadata("stringtemplate.kt") + public void testStringtemplate() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/concatenatedStringGenerator/stringtemplate.kt"); + doTest(fileName); + } + + @TestMetadata("variables.kt") + public void testVariables() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/concatenatedStringGenerator/variables.kt"); + doTest(fileName); + } +} diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java index 3842fc11854..9903ab564ff 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java @@ -5490,6 +5490,45 @@ public class IntentionTestGenerated extends AbstractIntentionTest { } + @TestMetadata("idea/testData/intentions/copyConcatenatedStringToClipboard") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class CopyConcatenatedStringToClipboard extends AbstractIntentionTest { + public void testAllFilesPresentInCopyConcatenatedStringToClipboard() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/intentions/copyConcatenatedStringToClipboard"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); + } + + @TestMetadata("constants.kt") + public void testConstants() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/copyConcatenatedStringToClipboard/constants.kt"); + doTest(fileName); + } + + @TestMetadata("numbers.kt") + public void testNumbers() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/copyConcatenatedStringToClipboard/numbers.kt"); + doTest(fileName); + } + + @TestMetadata("simple.kt") + public void testSimple() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/copyConcatenatedStringToClipboard/simple.kt"); + doTest(fileName); + } + + @TestMetadata("simpleString.kt") + public void testSimpleString() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/copyConcatenatedStringToClipboard/simpleString.kt"); + doTest(fileName); + } + + @TestMetadata("variables.kt") + public void testVariables() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/copyConcatenatedStringToClipboard/variables.kt"); + doTest(fileName); + } + } + @TestMetadata("idea/testData/intentions/declarations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class)