Community
Participate
Working Groups
I20071113-0800. Sometimes types are missing in the type hierarchy. So far I could narrow down one test case: 1. load the 'platform-ui', 'platform-text' and 'jdt' modules from CVS (wait until build is done) 3. replace RefreshEditorAction with rev. 1.1 4. Use Open Type to open org.eclipse.ui.actions.RefreshAction (wait for the index to be built) 4. Ctrl+T ==> OK: observe the anonymous inner class subclass 5. exit 6. start 7. Ctrl+T on org.eclipse.ui.actions.RefreshAction ==> BUG: observe the anonymous inner subclass is not there Some strange stuff: 1. after opening RefreshEditorAction in the Java Editor Ctrl+T correctly reports the anonymous inner subclass. 2. exit, delete the search indexes and restart: problem is gone. Exit, restart: problem is back again. As alternative I can either offer my test workspace (60 MB) or we can debug it together via NetMeeting.
Created attachment 83049 [details] -debug trace
>2. exit, delete the search indexes and restart: problem is gone. Exit, restart: >problem is back again. Actually deleting the index doesn't fix it.
Created attachment 83246 [details] Proposed fix and regression test
Created attachment 83323 [details] Another approach for the fix (and same regression test) With the first proposed fix, the type hierarchy creation is slowed down quite a bit. This new approach attempts to make the compiler more fault-tolerant. However this fix makes ResolveTests#testConstructor3() and testConstrictor4() fail with a NPE, and AnnotationTest#test113() fail as another error is introduced. Need to talk to Philippe to decide what to do.
There is more work on the compiler side to make it work correctly. Bug 210422 has been opened against the compiler.
Other test case: public final class X { X(int i) {} void foo() { new X(12) {}; } } Hierarchy on X misses anonymous type.
Created attachment 83421 [details] Assuming compiler is fixed, this should fix the problem (includes same regression test)
Created attachment 83443 [details] Improved fix and new test (from comment 6)
Fix and tests released for 3.4M4
Verified for 3.4 M4 using build I20071211-0010.