Especially with lambdas, you may end up with a chain of method calls that you’d like to have automatically formatted with each invocation on each line (maybe except for the very first invocation).
You can configure the Eclipse Java formatter with that respect; you just need to reach the right option (the “Force split” is necessary to have each invocation on a separate line):
and then you can have method calls formatted automatically like that:
Thanks Lorenzo. I did not know that this formatting option existed. I always use // to force a line split.
Neither did I, that’s why I thought it was worth mentioning it 😉