I have a small problem with java code formatting in Intellij Idea 14.1.4. I have a piece of code formatted manually by me, that looks good for me:
public class Test {
private static final ImmutableMap<String, String> map = new ImmutableMap.Builder<String, String>()
.put("key", "value")
.put("key", "value")
.put("key", "value")
.put("key", "value")
.put("key", "value")
.put("key", "value")
.build()
}
but when I reformatted this code(Ctrl + Alt + L), I got:
public class Test {
private static final ImmutableMap<String, String> map =
new ImmutableMap.Builder<String, String>().put("key", "value")
.put("key", "value")
.put("key", "value")
.put("key", "value")
.put("key", "value")
.put("key", "value")
.build()
}
Expected result: Intellij won't reformat anything because the code is already well-formatted.
I have a scheme with the next settings:
Could anybody explain how I can reach expected result?