JavaEnterInTextBlockHandler: separate enter handler for text blocks (IDEA-223911)

1. auto-formatting in blank text block
2. proper caret offset in text block with content
2. semicolon after block in simple cases
3. disable insert of closing quotes in case when parser appended next text block open quotes to the current text block

GitOrigin-RevId: cb2bdf293dfc3a18d1aab055d379b9e92f0cff2e
This commit is contained in:
Artemiy Sartakov
2019-10-09 04:32:13 +00:00
committed by intellij-monorepo-bot
parent ce17629571
commit d3618f7276
19 changed files with 254 additions and 14 deletions
@@ -0,0 +1,8 @@
class Test {
void test() {
String block = """<caret>
text""";
}
}
@@ -0,0 +1,9 @@
class Test {
void test() {
String block = """
<caret>
text""";
}
}
@@ -0,0 +1,7 @@
class Test {
void test() {
String block = """<caret>text
""";
}
}
@@ -0,0 +1,8 @@
class Test {
void test() {
String block = """
<caret>text
""";
}
}
@@ -0,0 +1,7 @@
class Test {
void test() {
String block = """<caret>""";
}
}
@@ -0,0 +1,8 @@
class Test {
void test() {
String block = """
<caret>""";
}
}
@@ -0,0 +1,7 @@
class Test {
void test() {
String block = """<caret>"""
}
}
@@ -0,0 +1,8 @@
class Test {
void test() {
String block = """
<caret>""";
}
}
@@ -0,0 +1,9 @@
class Test {
void foo() {
String block = """
bar<caret>
foo
""";
}
}
@@ -0,0 +1,10 @@
class Test {
void foo() {
String block = """
bar
<caret>
foo
""";
}
}
@@ -0,0 +1,9 @@
class Test {
void test() {
String block = """<caret>
""";
}
}
@@ -0,0 +1,10 @@
class Test {
void test() {
String block = """
<caret>
""";
}
}