Community
Participate
Working Groups
1. Create CSS file with following content: .class { background-color: #ccc /*#d4e2fc*/ /*#c3d9ff*/; } 2. Format it two or three times (Ctrl-Shift-F). Each time formatter inserts additional spaces between two comments, resulting in unlimited growth of line length and file size. Eclipse: Eclipse Java EE IDE for Web Developers. Version: Indigo Service Release 1 Build id: 20110916-0149 WTP: wtp-M-3.3.2-20111117045640
Bug is still not fixed in Web Tools 3.4.0.
This patch avoids the white space duplication: https://github.com/zalapa/webtools.sourceediting/commit/78784a5cb355bcc47b444d9c3b66c9a6fde36e2a
Hi Chava, Thanks for looking into this. I think the patch looks good overall, however, the following testcase fails: TestCSSDecl#testInsertPropertyInExistingRule And also, if you could, please add a new test case to make sure we don't regress from this. Should be good after that.
Thanks Nick for the review, in the previous patch i forgot to run the complete css test suite. I did just run the Formmatter tests, however my mistake was too simple, this is the fix for the previous patch. https://github.com/zalapa/webtools.sourceediting/commit/c8693e3285948dedf47ad5146949cf39b50a7d51
This is the junit part. I did a change the order in which the expected result are obtained, since right now it is getting the same result for a formatted and no formatted document, so the junit did not have any sense. https://github.com/zalapa/webtools.sourceediting.tests/commit/c9b1bb569787525f8e3a3157f46382c7f6f58a95
Patch looks good. I've pushed your changes to master. Thanks, chava.