Community
Participate
Working Groups
Build ID: M20071023-1652 Steps To Reproduce: When formatting code the formatter sometimes thinks it's best to do a break on the '.' in a line - even if the result is worser than the original. It isn't even consistent, but seems to do the line break insert in an inconsistent manner. The attached picture shows a really 'stupid' line break at a '.'. Notice that the second case in the same picture didn't get a line break.
Created attachment 86464 [details] Current formatting rules.
(In reply to comment #0) > Build ID: M20071023-1652 > > Steps To Reproduce: > When formatting code the formatter sometimes thinks it's best to do a break on > the '.' in a line - even if the result is worser than the original. It isn't > even consistent, but seems to do the line break insert in an inconsistent > manner. > "sometimes" is a bit vague to me. May you please attach 2 code formatting scenarios where: 1 - code formatter behaves as expected 2 - code formatter inserts an unexpected line break > The attached picture shows a really 'stupid' line break at a '.'. Notice that > the second case in the same picture didn't get a line break. > May you please attach the screen shots. Thanks.
Created attachment 86542 [details] Screen shot Seems like Bugzilla didn't attach this when creating the report initally - so here I try again.
Created attachment 86543 [details] Example code to test formatting with.
Please note also that since the variable preceding the dot is very short in my case the reformatting where a line break is inserted actually make the code harder to read.
I've seen a lot of occurances of this too. This happens a lot with debug lines where I have a long string and each component of System.out.println or String.format gets put on its own line like in the example attached.
This issue has been fixed for 3.6M5... *** This bug has been marked as a duplicate of bug 264112 ***
Verified for 3.6M6 using build I20100305-1011