Community
Participate
Working Groups
If I have code like the following: StringBuffer myBuf = new StringBuffer(); myBuf.append("first").append("second").append("third"); I would usually want to format it as myBuf.append("first") .append("second") .append("third") ..or possibly with the first line also wrapped. Currently, no combination of line wrapping settings will cause this to happen. Even if "force split" is combined with the available wrapping options, the entire line is only wrapped "as neccessary". When method calls are not chained, the splitting and wrapping occurs correctly. It appears that a chain of method calls is not being subjected to the line wrapping rules for function calls (or at least, is not formatting as would be expected). An image will be attached showing a long chain of method calls being incorrectly formatted. The formatting shown is constant regardless of line wrapping settings.
Created attachment 7488 [details] Image showing bad chained function formatting This image shows the incorrect formatting of chained function calls. This formatting does not change regardless of line wrapping settings.
Reported against: 200401150010
This bug is due to the fact that I wasn't using the options for alignment inside a cascading method invocations. Using the option for alignment of qualified method invocation fixed it. Using your example, I now get the attached result. I think this is what is expected. Fixed and released in HEAD.
Verified in 200402121200.