Community
Participate
Working Groups
20050906 For the following code, use a smaller line width and use 'wrap only when necessary'. It seems to me that this is more than necessary.... String s, t, u, v; s = t = u = v = "TextTextText"; -> String s, t, u, v; s = t = u = v = "TextTextText";
This is due to the fact that the assignment aligment was set to use the outer most alignement to split. So s = t = u = v = "TextTextText"; would split first: s and then t and then u and finally v. Because splitting ends up being wider than no split we end up with this weird wrapping. I can either fix it using the inner most alignment first or disable the wrapping if it doesn't help. I will investigate the latter.
I believe I have a similar instance of this bug (regardless, it's related). The following code goes from column 9 to column 97: psp = this.poolSetPosDao.findByPoolSetSampleNumber( ps, tecanRecord.getSampleNumber() ); If it were to wrap after the "ps," parameter, it would be at column 64 and fit within 80 just fine. Instead, Eclipse first wraps at the assignment, which does not get the (now second) line under 80 characters, and then it wraps the parameters. This produces an extra (useless) line of code.
Ownership has changed for the formatter, but I surely will not have enough time to fix your bug during the 3.5 development process, hence set its priority to P5. Please provide a patch if you definitely need the bug to be fixed in this version and I'll have a look at it... TIA
This problem no longer occurs after the formatter redesign. *** This bug has been marked as a duplicate of bug 303519 ***
*** Bug 250636 has been marked as a duplicate of this bug. ***