Community
Participate
Working Groups
The type hierarchy should also show anonymous inner classes. This is important because the anonymous inner classes are very diffucult to find. You can't simply grep for extends <classname>, but you have to search for Constructor() { . Because there can be different constructors, it's not so easy th find the anonymous class.
Use Search for Implementors of <classname>. I agree it would be more intuitive to show them in type hierarchies as well. The reason we do not currently is that our Java Model does not provide element handles to local types. We want to revisit this for 2.1 (no promise yet).
Eclipse Version: 2.0, Build id: 200209230010. Type Hierarchy shows anonymous inner classes declared in binary projects, but NOT those declared in source projects. Steps to reproduce: + import org.junit as binary project + focus type hierarchy to interface junit.framework.Protectable +> 2 implementors shown (those generated classes with $ in their name) - import org.junit as source project - focus type hierarchy to interface junit.framework.Protectable -> no implementor available It would be helpful to have JavaElements for anonymous classes in source too. The problem not only occurs in the TypeHierarchy, but also if you e.g. want to display a call graph in the UI. There shouldn't be any difference between source and binary projects, and JavaElements should be available for every Java language element down to member level.
Local types are not members (just contained inside methods/initializers). We do not reify them yet, and will not for 2.1.
reopen
pls double check it works now
Verified JUnit scenario (there are actually 3 Protectable anonymous classes in JUnit 3.8.1) Closing *** This bug has been marked as a duplicate of 38024 ***