12

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?

Cheetah
  • 13,785
  • 31
  • 106
  • 190

1 Answers1

22
  • Code Style => Java => Wrapping and Braces => Chained Method Calls
  • Align when multiline

enter image description here

Produces the following when reformatting source:

enter image description here

Dave Newton
  • 158,873
  • 26
  • 254
  • 302