| Summary: | [formatter] Single line comment gets formatted into multiple lines | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Sarika Sinha <sarika.sinha> | ||||||
| Component: | Core | Assignee: | Mateusz Matela <mateusz.matela> | ||||||
| Status: | RESOLVED DUPLICATE | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | jarthana, noopur_gupta | ||||||
| Version: | 4.6 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 260620 [details]
After Formatting
Sarika, which build are you using? Can you please attach your formatter settings too? Jay, I am using Version: Neon (4.6) Build id: N20160327-2000 with default formatter settings i.e Eclipse [built-in] This is the expected behavior. If you don't want comments to be wrapped, increase the 'Maximum line width for comments'. Maximum line width for Comments is 120 by default , and If a place the comment on a new line, still it breaks it into 2 line at location 80. There is a separate line width for comments in the Comments-tab of the formatter editor. ... and it defaults to 80 characters, which I guess is kind of odd. Yes, IMHO both the width should be defaulted to same value. There's a proposition to change it to 120 in bug 472688. I raise an argument there about why it makes sense to have shorter lines for comments. Feel free to join the discussion. *** This bug has been marked as a duplicate of bug 472688 *** |
Created attachment 260619 [details] Before Formatting Attaching the sample file before and after formatting. Formatting converts the single line comment into multiple lines. In the attached file, even if I move the comment to next line it gets formatted into 2 lines.