Community
Participate
Working Groups
When "indent on column" option is selected for the method arguments if the arguments do not fit the defined line length, the whole column should wrap. Example with current formatter: MyLongClassName myLongVariable = someOtherLongCode(param1, param2, param3); Should be: MyLongClassName myLongVariable = someOtherLongCode( param1, param2, param3);
(In reply to comment #0) IMHO, _both_ options should be available. MY experience is that in the preview, it appears as (option 1): MyLongClassName myLongVariable = someOtherLongCode(param1, param2, param3); but when the code formatter runs, it is (option 2): MyLongClassName myLongVariable = someOtherLongCode( param1, param2, param3); Given that option 1 is closer to what my compadres produce with IntelliJ, I would like to format that way. (More explicitly, I would like to format identically to IntelliJ)
Both formatting are doable right now. The first one: MyLongClassName myLongVariable = someOtherLongCode(param1, param2, param3); can be done by setting: - tab char as MIXED or TAB - use tabulation only for leading indents (see bug 97918) - indent on column - alignment for method invocation to WRAP_NEXT_PER_LINE The second one: MyLongClassName myLongVariable = someOtherLongCode( param1, param2, param3); - indent on default - continuation indent to 1 - alignment for method invocation to WRAP_ONE_PER_LINE In this case you get two indents for param1, param2 and param3 instead of one. Closing as FIXED. Regression tests in org.eclipse.jdt.core.tests.formatter.FormatterRegressionTests.test597/599.
Reopen to close as WORKSFORME since no code has been changed to solve this PR.
Closing.