I've recently started working with an API that uses a "fluent interface". I'm struggling to find how to configure the Eclipse code formatter to support this properly.
What I want to get is this:
Foo myFoo = new Foo()
.setThis()
.setThat()
.setTheOther()
.setOneMoreThing();
but I can't hit on the right settings: I end up with something like this:
Foo myFoo = new Foo().setThis().setThat()
.setTheOther().setOneMoreThing();
which is nowhere near as readable.
Has anyone already solved this?