java - How to set Eclipse code formatter to support fluent interfaces -
this question has answer here:
i've started working api uses "fluent interface". i'm struggling find how configure eclipse code formatter support properly.
what want this:
foo myfoo = new foo() .setthis() .setthat() .settheother() .setonemorething();
but can't hit on right settings: end this:
foo myfoo = new foo().setthis().setthat() .settheother().setonemorething();
which near readable.
has solved this?
sorry: turns out near-duplicate of this: how indent fluent interface pattern "correctly" eclipse?
here's answer worked me:
the place set on "line wrapping" tab of code formatting preferences page, in "qualified invocations" section of "function calls" section. settings wanted were:
line wrapping policy: wrap element, except first element if not necessary
indentation policy: indent on column
Comments
Post a Comment