| Summary: | Formatter: it should be possible to tell the formatter to never add or remove newlines (except for blank lines). | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Geoffrey De Smet <ge0ffrey.spam> |
| Component: | Core | Assignee: | Ayushman Jain <amj87.iitr> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Olivier_Thomann |
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | stalebug | ||
Ayushman, please check this one. I thought we already have such an option. The option exists: "Do not wrap" in conjunction with "preserve new ... lines". But it does not keep its hand from my code: it still does unwrapping on some code. I am looking for the option "NEVER add or remove a \n character" (AKA "keep your (un)wrapping hands from code" :) (In reply to comment #2) > The option exists: "Do not wrap" in conjunction with "preserve new ... lines". > But it does not keep its hand from my code: it still does unwrapping on some > code. > > I am looking for the option "NEVER add or remove a \n character" (AKA "keep > your (un)wrapping hands from code" :) I think the "never join already wrapped lines" option in "line wrapping" tab should cover this case, i.e. should not condense the given example to a single line since its already wrapped. But strangely, it doesn't. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Build Identifier: 20100917-0705 Suppose I have these 2 lines in a java file: private WorstScoreSolverBenchmarkComparator worstScoreSolverBenchmarkComparator = new WorstScoreSolverBenchmarkComparator(); then the eclipse formatter makes it 1 really long line. In the formatter, I have set everything to "Do not wrap" and also checked "preserve new ... lines", However, if I set the formatter to "always wrap", then he wraps similar lines incorrectly. I want to do the wrapping manually: If I did wrapping on a line, there should be wrapping. If I didn't, there shouldn't be wrapping. Either way, eclipse's formatter should NEVER add or remove newlines (except to add or remove blank lines). Reproducible: Always