diff --git a/idea/src/META-INF/plugin.xml b/idea/src/META-INF/plugin.xml
index b5bc7f9af0f..7d3ee5a2907 100644
--- a/idea/src/META-INF/plugin.xml
+++ b/idea/src/META-INF/plugin.xml
@@ -727,6 +727,7 @@
+
+ "bar"
+}
\ No newline at end of file
diff --git a/idea/testData/joinLines/stringTemplate/firstLineVariable.kt.after b/idea/testData/joinLines/stringTemplate/firstLineVariable.kt.after
new file mode 100644
index 00000000000..588d2b2e799
--- /dev/null
+++ b/idea/testData/joinLines/stringTemplate/firstLineVariable.kt.after
@@ -0,0 +1,4 @@
+fun test() {
+ val foo = "1"
+ val s = foo + "bar"
+}
\ No newline at end of file
diff --git a/idea/testData/joinLines/stringTemplate/secondLineVariable.kt b/idea/testData/joinLines/stringTemplate/secondLineVariable.kt
new file mode 100644
index 00000000000..188610ddb4d
--- /dev/null
+++ b/idea/testData/joinLines/stringTemplate/secondLineVariable.kt
@@ -0,0 +1,5 @@
+fun test() {
+ val foo = "1"
+ val s = "bar" +
+ foo
+}
\ No newline at end of file
diff --git a/idea/testData/joinLines/stringTemplate/secondLineVariable.kt.after b/idea/testData/joinLines/stringTemplate/secondLineVariable.kt.after
new file mode 100644
index 00000000000..68df4130f30
--- /dev/null
+++ b/idea/testData/joinLines/stringTemplate/secondLineVariable.kt.after
@@ -0,0 +1,4 @@
+fun test() {
+ val foo = "1"
+ val s = "bar" + foo
+}
\ No newline at end of file
diff --git a/idea/testData/joinLines/stringTemplate/simple.kt b/idea/testData/joinLines/stringTemplate/simple.kt
new file mode 100644
index 00000000000..30709391ee6
--- /dev/null
+++ b/idea/testData/joinLines/stringTemplate/simple.kt
@@ -0,0 +1,4 @@
+fun test() {
+ val s = "foo" +
+ "bar"
+}
\ No newline at end of file
diff --git a/idea/testData/joinLines/stringTemplate/simple.kt.after b/idea/testData/joinLines/stringTemplate/simple.kt.after
new file mode 100644
index 00000000000..53f0a7490a2
--- /dev/null
+++ b/idea/testData/joinLines/stringTemplate/simple.kt.after
@@ -0,0 +1,3 @@
+fun test() {
+ val s = "foobar"
+}
\ No newline at end of file
diff --git a/idea/testData/joinLines/stringTemplate/threeLines.kt b/idea/testData/joinLines/stringTemplate/threeLines.kt
new file mode 100644
index 00000000000..260502316c3
--- /dev/null
+++ b/idea/testData/joinLines/stringTemplate/threeLines.kt
@@ -0,0 +1,5 @@
+fun test() {
+ val s = "foo" +
+ "bar" +
+ "baz"
+}
\ No newline at end of file
diff --git a/idea/testData/joinLines/stringTemplate/threeLines.kt.after b/idea/testData/joinLines/stringTemplate/threeLines.kt.after
new file mode 100644
index 00000000000..ae29b808428
--- /dev/null
+++ b/idea/testData/joinLines/stringTemplate/threeLines.kt.after
@@ -0,0 +1,4 @@
+fun test() {
+ val s = "foobar" +
+ "baz"
+}
\ No newline at end of file
diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/declarations/JoinLinesTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/declarations/JoinLinesTestGenerated.java
index d17ebbc20a1..120efc43ab3 100644
--- a/idea/tests/org/jetbrains/kotlin/idea/intentions/declarations/JoinLinesTestGenerated.java
+++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/declarations/JoinLinesTestGenerated.java
@@ -425,4 +425,37 @@ public class JoinLinesTestGenerated extends AbstractJoinLinesTest {
doTest(fileName);
}
}
+
+ @TestMetadata("idea/testData/joinLines/stringTemplate")
+ @TestDataPath("$PROJECT_ROOT")
+ @RunWith(JUnit3RunnerWithInners.class)
+ public static class StringTemplate extends AbstractJoinLinesTest {
+ public void testAllFilesPresentInStringTemplate() throws Exception {
+ KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/joinLines/stringTemplate"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
+ }
+
+ @TestMetadata("firstLineVariable.kt")
+ public void testFirstLineVariable() throws Exception {
+ String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/stringTemplate/firstLineVariable.kt");
+ doTest(fileName);
+ }
+
+ @TestMetadata("secondLineVariable.kt")
+ public void testSecondLineVariable() throws Exception {
+ String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/stringTemplate/secondLineVariable.kt");
+ doTest(fileName);
+ }
+
+ @TestMetadata("simple.kt")
+ public void testSimple() throws Exception {
+ String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/stringTemplate/simple.kt");
+ doTest(fileName);
+ }
+
+ @TestMetadata("threeLines.kt")
+ public void testThreeLines() throws Exception {
+ String fileName = KotlinTestUtils.navigationMetadata("idea/testData/joinLines/stringTemplate/threeLines.kt");
+ doTest(fileName);
+ }
+ }
}