correct indent on enter in multiline non-g-strings

This commit is contained in:
peter
2011-12-22 19:21:53 +01:00
parent 8e9ee41e45
commit 7b86f93320
3 changed files with 14 additions and 1 deletions
@@ -247,7 +247,7 @@ public class GroovyEnterHandler extends EnterHandlerDelegateAdapter {
EditorModificationUtil.insertStringAtCaret(editor, "\n");
}
else {
EditorModificationUtil.insertStringAtCaret(editor, "\n");
originalHandler.execute(editor, dataContext);
}
return true;
}
@@ -77,6 +77,7 @@ public class EnterActionTest extends GroovyFormatterTestCase {
public void testGstring7() throws Throwable { doTest(); }
public void testGstring8() throws Throwable { doTest(); }
public void testGstring9() throws Throwable { doTest(); }
public void testMultilineIndent() throws Throwable { doTest(); }
public void testSpaces1() throws Throwable { doTest(); }
public void testString1() throws Throwable { doTest(); }
public void testString2() throws Throwable { doTest(); }
@@ -0,0 +1,12 @@
'''
class Foo {
void foo() {}<caret>
}
'''
-----
'''
class Foo {
void foo() {}
<caret>
}
'''