| Summary: | Java formatter does not break an excessively long line | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Terry Parker <tparker> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | mateusz.matela |
| Version: | 4.5 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
Look like you need to change the wrapping policy for Expressions -> Assignments from "Do not wrap" to "Wrap where necessary". This is due to changed interpretation of the "Never join already wrapped lines" setting in Eclipse Mars, as explained in bug 372801. There's more discussion about it in bug 474362. |
The following snippet is formatted with a line length of 80 indentation set at 4. It should break after the assignment token, but even if I manually make that break, the formatter recombines it into a single overly-long line. private static final Comparator<BitmapBuilderEntry> ORDER_BY_DESCENDING = new Comparator<BitmapBuilderEntry>() { public int compare(BitmapBuilderEntry a, BitmapBuilderEntry b) { return Integer.signum(b.getBuilder().cardinality() - a.getBuilder().cardinality()); } };