Bug 238210 - [formatter] CodeFormatter wraps line comments without whitespaces
Summary: [formatter] CodeFormatter wraps line comments without whitespaces
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4.1   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-24 03:40 EDT by Axel Faust CLA
Modified: 2008-08-28 12:34 EDT (History)
2 users (show)

See Also:


Attachments
Testcase Source File (707 bytes, application/octet-stream)
2008-06-24 03:40 EDT, Axel Faust CLA
no flags Details
Proposed patch (14.18 KB, patch)
2008-07-01 07:58 EDT, Frederic Fusier CLA
no flags Details | Diff
Proposed patch for R3_4_maintenance stream (14.20 KB, patch)
2008-07-03 05:15 EDT, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Faust CLA 2008-06-24 03:40:07 EDT
Created attachment 105684 [details]
Testcase Source File

Using Eclipse 3.3.2 with line comment formatting enabled and maximum comment line width set to 100, the two protected-region line comments in the attached test case were not wrapped (even at smaller line widths), since they do not contain whitespaces.
The rewritten CodeFormatter in Eclipse 3.4 RC1 and RC4 now wraps these lines at either "-", "=", "[" or "]", depending on the line width and actual length of comment.
Comment 1 Frederic Fusier CLA 2008-07-01 07:53:19 EDT
Released for 3.5M1
Comment 2 Frederic Fusier CLA 2008-07-01 07:58:20 EDT
Created attachment 106222 [details]
Proposed patch

Note that this patch also solves the problem of bug 234168 for line comments. I used this solution as it makes the code simpler and so safer... That's why I think it should be released like this in R3_4_maintenance stream.
Comment 3 Jerome Lanneluc CLA 2008-07-01 10:04:00 EDT
+1 for 3.4.1 since this is a regression comparing to 3.3.2
Comment 4 Frederic Fusier CLA 2008-07-03 05:15:20 EDT
Created attachment 106406 [details]
Proposed patch for R3_4_maintenance stream
Comment 5 Frederic Fusier CLA 2008-07-03 05:25:13 EDT
Released for 3.4.1
Comment 6 Olivier Thomann CLA 2008-08-06 12:27:00 EDT
Verified for 3.5M1 using I20080805-1307
Comment 7 Olivier Thomann CLA 2008-08-06 13:28:08 EDT
Reopen to close as RESOLVED/FIXED. Will be closed as VERIFIED during 3.4.1
verification pass.
Comment 8 Olivier Thomann CLA 2008-08-06 13:29:16 EDT
Fixed.
Comment 9 Olivier Thomann CLA 2008-08-28 12:34:43 EDT
Verified for 3.4.1 using M20080827-2000