My eclipse formatter is currently formatting a multi-line function call as follows:
someObject.doSomething( some().long().chain().of().methods() );
But I want eclipse to align the closing bracket with the method call:
someObject.doSomething( some().long().chain().of().methods() );
I tried playing with the new line and wrap rules in code formatting, but could not achieve this. What will be the solution?
After some time digging, I found a similar question that has an accepted answer, but doesn't seem to answer the same question: Can Eclipse formatting be configured to indent multiple lines between brackets correctly?
The author of this question also says:
Edit: I found the settings for "Line Wrapping" β "Default indentation for wrapped lines" and "Default indentation for array initialization" and set them to "1" instead of "0". This is better for an array of initializers, but still do not back out of the path to match opening the parentheses the way I want :
Reins source share