Community
Participate
Working Groups
I think the source clean up module "formats code" before it "organize imports" if selected. In some configurations (like my one) the clean up show every time changes on the imports even if there were none. i think because of the "whitespace before semicolon" option on format. hint: select every option in source format and in source clean up. then cleanup source to reproduce. every time there will be shown some changes on imports.
Please provide example of what you mean as well as steps to reproduce. Thanks.
Created attachment 114408 [details] Cleanup Setttings
Created attachment 114409 [details] Source Formatter Settings
Created attachment 114411 [details] Screenshot
in the screenshot you can see the result of a cleanup process. even if you repeat the process several times there are the same differences in the import directives. you should be able to reproduce if you import the attached setting in your SourceFormatter and your CleanUp preferences.
Moving to JDT/UI
ImportRewriteAnalyzer.getResultingEdits(IProgressMonitor) does not honor the following code formatter setting: org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_SEMICOLON
Created attachment 116029 [details] Proposed fix
Released for 3.5M3. Test added ImporRewriteTest#testAddImports4()
Verified for 3.5M3 using I20081027-1800
*** Bug 257177 has been marked as a duplicate of this bug. ***