Community
Participate
Working Groups
Created attachment 113232 [details] The log file of my workspace. I20080918-0100 Test file: public class Test { private void v() { Object o = new new Object() {}; } } ---------------- 1. Copy / paste the file into a new project and save. This should work 2. Window > Preferences > Java > Editor > Save Actions 3. Check 'Perform the selected actions on save'. The defaults should be fine. Click 'OK'. 4. Make the file dirty and save again. 5. An error occurs.
Added regression tests in: org.eclipse.jdt.core.tests.dom.ASTConverterTestAST3_2#_test0697 org.eclipse.jdt.core.tests.dom.ASTConverterTestAST3_2#_test0698 David, The problem seems to come from the statement recovery. I wrote two test cases: 1) I expect the method body to be empty since there is no statement recovery. We do get one statement. 2) I expect the statement to be recovered and the source range to cover the statement properly. Right now the declaration source end doesn't seem to be set. Both tests are disabled for now.
Changing Version tag to something more believable.
I enabled and updated tests test0697 and test0698. 1) The body contains one statement: the anonymous type 2) The statement recovery works but does not recover the full AST (bug 277805). *** This bug has been marked as a duplicate of bug 274898 ***
Verified for 3.6M1 using I20090802-2000