Project: JDT
Bug 398112 [save actions] Save Actions create inconsistency
Reported: 2013-01-14 13:17:58 | Status: verified fixed

I activated the save actions in Eclipse 4.3 Integration build (format at save and organization of imports). I'm also using a type filter for java.awt.* and javax.swing.* If I delete the import statements with Ctrl+D and save parts of the imports are created, except the import for the SWT Text widget because Eclipse has several possible imports. So I use Ctrl+O to import the correct package. If I now try to save via Ctrl+S I get the information that the file is out-of-sync and that save failed (see attached screenshot). This is repeatable, sometimes I have to do the whole thing 2-3 times to get this errors. Try the following steps with the attached project: Setup: 1.) Activate Save Actions and Type filter as described above 2.) Import attacshed example project 3.) Open the TodoDetailPart class Test 1.) Delete import statements via Ctrl+D 2.) Ctrl+S 3.) Ctrl+O select the SWT Text widget import 4.) Ctrl+S -> should fail If 4.) does not fail, repeat at least 5 times.

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitDocumentProvider.java