With Eclipse 3.6, this seems doable by customizing your Java user profile > Code Style> Formatting . Edit it and go to the Line Pack tab and select Feature Call> Skilled Calls . Then, in Settings for qualified calls, configure the following things:

This (should) lead to the expected result:
SomeEntity e1 = new SomeEntity.Builder() .age(10) .amount(10.0d) .firstname("foo") .lastname("bar") .build();
But this, obviously, will affect all the code that I personally donโt like. Therefore, I use the new Off / On Tags from Eclipse 3.6 (last tab when editing a profile):

And attach the parts that are not formatted the way I want, and do it yourself:
// @formatter:off SomeEntity e2 = new SomeEntity.Builder() .age(10) .amount(10.0d) .firstname("foo") .lastname("bar") .build(); // @formatter:on
Choose your poison :)
Pascal Thivent Nov 13 2018-10-11 15:55
source share