Community
Participate
Working Groups
While testing UI for bug 251133, I saw a weird behavior of the formatter when the 'Never indent line comment on first column' is activated. The example is: interface Example { // This is a long comment with whitespace that should be split... int foo3(); ... } When checking the 'Never indent line comment on first column' preference, I got this output: interface Example { // This is a long comment with whitespace that should be split in multiple line // comments in case the line comment formatting is enabled int foo3(); ... } Which first looks really weird. As the comment is on first column, I would expect the formatter to set the wrapped line comments also on the first column, hence I should get the following output: interface Example { // This is a long comment with whitespace that should be split in multiple line // comments in case the line comment formatting is enabled int foo3(); ... }
Note that this is not a regression introduced by the fix for bug 251133 as I get the same behavior in 3.6M5...
In fact this is a regression introduced while re-writing the formatter for comments... It worked properly in 3.3.2 but was broken in 3.4.0..
Created attachment 160980 [details] Proposed patch Fix is trivial, just do not indent while wrapping the comment line if the preference is set...
(In reply to comment #3) > Created an attachment (id=160980) [details] > Proposed patch > Released for 3.6M6 in HEAD stream.
Verified for 3.6M6 using I20100307-2000.