Community
Participate
Working Groups
I20060221-0800 1. add the following source (which has a compile error): package test; public class Test { public void testMethod() { class NamedInnerClass { } NamedInnerClas } } 2. close the editor ==> inner class is not shown in testMethod() in Package Explorer 3. open the editor ==> inner class is not shown in testMethod() in Package Explorer and Outline view 4. type into the editor ==> inner class appears in Package Explorer and Outline view 5. close editor ==> class again gone I assume the reason for this is that on the first reconcile the model thinks it is consistent and hence only reports the problems since force problem detection is true. Once the cu is changed the inner class is reported. In the end the difference is probably caused because statements recovery is enabled on reconcile.
That's correct, the statement recovery is enabled in the reconciler thread (see JavaReconcilingStategy#reconcile(...)) and it is not when opening a regular ICompilationUnit (through either openWhenClosed(...) or becomeWorkingCopy(...)). David any idea why statement recovery is not enabled in the latter case ? Or should we not report local elements during reconcile during recovery ?
Talking with David, it appears that even with statement recovery off, it is possible to add an internal option to the SourceElementParser that will recover headers. Reassigning to David to make the change.
Created attachment 46369 [details] Proposed fix Add an internal option to the parser to enable the recovery of all headers in methods body.
Released for 3.3M1 Test added LocalElementTests#testLocalType5()
*** Bug 149853 has been marked as a duplicate of this bug. ***
Verified for 3.3 M1 using build I20060804-0010.
*** Bug 208013 has been marked as a duplicate of this bug. ***