diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/codeStyle/GroovyCodeStyleSettings.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/codeStyle/GroovyCodeStyleSettings.java index ef1024af66c8..ca788aa5f883 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/codeStyle/GroovyCodeStyleSettings.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/codeStyle/GroovyCodeStyleSettings.java @@ -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 diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/completion/GroovySmartCompletionTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/completion/GroovySmartCompletionTest.groovy index 017f3991416a..f2c7dd66e4d1 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/completion/GroovySmartCompletionTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/completion/GroovySmartCompletionTest.groovy @@ -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() { diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/formatter/FormatterTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/formatter/FormatterTest.groovy index bea7f0742361..dec170054a9b 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/formatter/FormatterTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/lang/formatter/FormatterTest.groovy @@ -743,6 +743,7 @@ def bar() { } void testLabels() { + groovyCustomSettings.INDENT_LABEL_BLOCKS = false checkFormatting('''\ def foo() { abc:foo() diff --git a/plugins/groovy/testdata/groovy/refactoring/introduceVariable/label1.test b/plugins/groovy/testdata/groovy/refactoring/introduceVariable/label1.test index 20f1b6e1ddf1..13343e039249 100644 --- a/plugins/groovy/testdata/groovy/refactoring/introduceVariable/label1.test +++ b/plugins/groovy/testdata/groovy/refactoring/introduceVariable/label1.test @@ -1,3 +1,4 @@ label: 123 ----- -label: def preved = 123 \ No newline at end of file +label: +def preved = 123 \ No newline at end of file diff --git a/plugins/groovy/testdata/groovy/refactoring/introduceVariable/label2.test b/plugins/groovy/testdata/groovy/refactoring/introduceVariable/label2.test index 9b5accf37461..3778b815ce5a 100644 --- a/plugins/groovy/testdata/groovy/refactoring/introduceVariable/label2.test +++ b/plugins/groovy/testdata/groovy/refactoring/introduceVariable/label2.test @@ -2,6 +2,7 @@ l:123 print 123 ----- -l: def preved = 123 +l: +def preved = 123 print preved \ No newline at end of file diff --git a/plugins/groovy/testdata/intentions/EachToFor/UpdateReturn_after.groovy b/plugins/groovy/testdata/intentions/EachToFor/UpdateReturn_after.groovy index 416e8497de79..00903832408b 100644 --- a/plugins/groovy/testdata/intentions/EachToFor/UpdateReturn_after.groovy +++ b/plugins/groovy/testdata/intentions/EachToFor/UpdateReturn_after.groovy @@ -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