Summary: | [formatter] Keep empty array initializer on one line option has no effect | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | RESOLVED INVALID | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | martinae |
Version: | 3.1 | ||
Target Milestone: | 3.1 M6 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Olivier Thomann
2005-03-28 17:12:08 EST
Fixed and released in HEAD. Regression tests updated. The FORMATTER_KEEP_EMPTY_ARRAY_INITIALIZER_ON_ONE_LINE already had an effect before this change. When FORMATTER_BRACE_POSITION_FOR_ARRAY_INITIALIZER (prefs page > Braces > Array Initializer) was set to NEXT_LINE or NEXT_LINE_SHIFTED, the user could disable wrapping before the opening brace by checking "Keep empty array initalizer on one line". Now, the FORMATTER_KEEP_EMPTY_ARRAY_INITIALIZER_ON_ONE_LINE option does what it did before, *plus* it always forces a line break inside an empty array initializer (but not inside non-empty array initializers). IMO, this new behavior does not make sense since it mixes two options. Do you want me to revert the change? I found the problem by looking at the code formatter preferences page were the option has apparently no effect. |