Bug 22373 - Type hierarchy should show anonymous inner classes
Summary: Type hierarchy should show anonymous inner classes
Status: RESOLVED DUPLICATE of bug 38024
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-13 03:44 EDT by Kerschbaumer Samuel CLA
Modified: 2003-10-30 09:18 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kerschbaumer Samuel CLA 2002-08-13 03:44:42 EDT
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.
Comment 1 Philipe Mulet CLA 2002-08-13 07:46:01 EDT
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).
Comment 2 Markus Keller CLA 2002-09-24 12:50:08 EDT
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.
Comment 3 Philipe Mulet CLA 2002-10-28 09:08:43 EST
Local types are not members (just contained inside methods/initializers).
We do not reify them yet, and will not for 2.1.

Comment 4 Philipe Mulet CLA 2003-10-30 04:38:41 EST
reopen
Comment 5 Philipe Mulet CLA 2003-10-30 04:39:14 EST
pls double check it works now
Comment 6 Jerome Lanneluc CLA 2003-10-30 09:18:18 EST
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 ***