javaintellij-ideaintellij-14

Intellij code indentation for builders


Currently if I write use the following builder class Intellij will indent the following way

SomeClass.create()
    .someMethod()
    .someOtherMethod();

What I would like it to do is indent like this:

SomeClass.create()
         .someMethod()
         .someOtherMethod();

Does anybody know how to set this up?


Solution

  • enter image description here

    Produces the following when reformatting source:

    enter image description here