IDEA-122138 formatting for Spock by default

This commit is contained in:
Max Medvedev
2014-03-19 13:29:53 +04:00
parent 00827c2819
commit 46711896e7
6 changed files with 9 additions and 5 deletions
@@ -47,7 +47,7 @@ public class GroovyCodeStyleSettings extends CustomCodeStyleSettings {
public boolean SPACE_BEFORE_CLOSURE_LBRACE = true;
public boolean SPACE_WITHIN_GSTRING_INJECTION_BRACES = false;
public boolean SPACE_WITHIN_TUPLE_EXPRESSION = false;
public boolean INDENT_LABEL_BLOCKS = false;
public boolean INDENT_LABEL_BLOCKS = true;
public boolean SPACE_AROUND_REGEX_OPERATORS = true;
//imports
@@ -78,7 +78,7 @@ public class GroovySmartCompletionTest extends GroovyCompletionTestBase {
public void testDontCompletePrivateMembers() {doSmartCompletion "foo1", "foo2", "getFoo1", "getFoo2"}
public void testEnumMembersInAssignment() {doSmartCompletion "IN_STOCK", "NOWHERE", "ORDERED" }
public void testEnumMembersInAssignment() {doSmartCompletion "IN_STOCK", "NOWHERE", "ORDERED", "valueOf" }
public void testEnumMembersInAssignmentInsideEnum() {doSmartCompletion "IN_STOCK", "NOWHERE", "ORDERED", "next", "previous", "valueOf" }
public void testPreferVarargElement() {
@@ -743,6 +743,7 @@ def bar() {
}
void testLabels() {
groovyCustomSettings.INDENT_LABEL_BLOCKS = false
checkFormatting('''\
def foo() {
abc:foo()
@@ -1,3 +1,4 @@
label: <begin>123<end>
-----
label: def preved = 123<caret>
label:
def preved = 123<caret>
@@ -2,6 +2,7 @@ l:<all>123<end>
print 123
-----
l: def preved = 123
l:
def preved = 123
print preved
@@ -1,4 +1,5 @@
Outer: for (it in [1, 2, 3]) {
Outer:
for (it in [1, 2, 3]) {
if (it % 2 == 0) {
while (true) {
continue Outer