> fooBuilder() //
>   .withKetchup() //
>   .withMayonaise() //
>   .andLikeThat();
> 
> It's not pretty, but I don't think there is anything else you can do.

Do you want this wrapping all the time, or only after the chained method
calls go past the configured line length?

I've had good luck with the formatting setting Line Wrapping / Function
Calls / Qualified invocations, when set to:

    Wrap all elements, every element on a new line

It will format code like your example above, without the "//" hack,
assuming it crossed the line length threshold.

If you want that format even before hitting the line length threshold,
you can try the "Force split" option, but then even simple "a.getB()"
will be split, unless you also try it with:

    Wrap all ements, except first element if not necessary

With this option + force split, non-chained calls like "a.getB()" stay
the some, and then all chained calls will be formatted like your above
example.

I'm not sure exactly what you're looking for, but you might try those
two options.

- Stephen

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to