This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 192306 - Class Hierarchy does not show subtypes from libraries.
Summary: Class Hierarchy does not show subtypes from libraries.
Alias: None
Product: java
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P2 normal with 2 votes (vote)
Assignee: Tomas Zezula
Depends on:
Reported: 2010-11-22 22:36 UTC by vidhyadharantechdays
Modified: 2010-12-18 06:10 UTC (History)
1 user (show)

See Also:
Exception Reporter:

Screenshot (77.24 KB, image/png)
2010-12-09 09:00 UTC, Tomas Zezula
Screen shot of NB build version (67.32 KB, image/png)
2010-12-13 21:41 UTC, vidhyadharantechdays
Windows test (82.08 KB, image/png)
2010-12-14 09:52 UTC, Tomas Zezula
Test Case Document (64.00 KB, application/msword)
2010-12-15 18:07 UTC, vidhyadharantechdays

Note You need to log in before you can comment on or make changes to this bug.
Description vidhyadharantechdays 2010-11-22 22:36:08 UTC
Class hierarchy is not showing for attachment jar files. i.e. Third party jar files.

please refer this thread
Comment 1 leonhad 2010-11-23 19:25:36 UTC
I tried an found same problem.
Comment 2 Michel Graciano 2010-11-24 00:38:40 UTC
Why this is marked as an API_REVIEW?
Comment 3 Tomas Zezula 2010-11-29 16:19:53 UTC
File Hierarchy and File Members now work also for class files.
Fixed jet-main 805e2dbf1d5a
Comment 4 vidhyadharantechdays 2010-11-29 16:22:54 UTC
(In reply to comment #3)
> File Hierarchy and File Members now work also for class files.
> Fixed jet-main 805e2dbf1d5a

Please Make sure it is tested in Maven as well
Comment 5 Tomas Zezula 2010-11-29 16:48:18 UTC
If maven correctly fullfils the java model contract it will work. Seems to work fine with basic maven project (tested on junit) I have no time to set up more complicated maven project.
Comment 6 Quality Engineering 2010-11-30 06:15:04 UTC
Integrated into 'main-golden', will be available in build *201011300001* on (upload may still be in progress)
User: Tomas Zezula <>
Log: #192306:Class hierarchy Alt + F12
Comment 7 vidhyadharantechdays 2010-12-08 21:21:53 UTC
Hi I have tested with NetBeans IDE Build 201012070001, The issue still persist.
Comment 8 Tomas Zezula 2010-12-09 08:59:23 UTC
Works for me, see the attached screenshot.
If you have some test case please attach it to this issue and reopen.
Comment 9 Tomas Zezula 2010-12-09 09:00:09 UTC
Created attachment 103791 [details]
Comment 10 vidhyadharantechdays 2010-12-13 21:41:05 UTC
Created attachment 104031 [details]
Screen shot of NB build version

I have tested with latest build but no luck for third party libraries.
Comment 11 vidhyadharantechdays 2010-12-13 21:45:01 UTC
Screen short attached.
Comment 12 Tomas Zezula 2010-12-14 08:52:02 UTC
Works fine for me as shown on my screenshot.
Your screenshot also shows that it works fine on sources.
If you have an reproduceable test case attach it.
You can try it by opening Libraries/JDK/rt.jar/java.lang, selecting Integer.class and calling Navigate/Inspect/File Hierarchy.
Comment 13 Tomas Zezula 2010-12-14 09:52:11 UTC
Created attachment 104048 [details]
Windows test
Comment 14 Tomas Zezula 2010-12-14 09:53:19 UTC
I've also did the test on Windows (XP) and works fine even on it, see
I did the test with java.lang.Integer as described above.
Comment 15 vidhyadharantechdays 2010-12-15 18:07:20 UTC
Created attachment 104131 [details]
Test Case Document

Hi please find the attached test case document. I have cross checked with Leon -, He have the same issue for struts third party libraries. 

Comment 16 vidhyadharantechdays 2010-12-15 18:13:23 UTC
Test case attached. please review.

Comment 17 Tomas Zezula 2010-12-17 08:39:59 UTC
Changing the summary.
The File Hierarchy action does not show subtypes coming from libraries.

There are two cases:

1st) The file comes from library as well. In this case the File Hierarchy action cannot even set up the find usages context other than the jar only in reasonable time. Other solution will take a list of all open projects check for the presence of the jar on each source root and add it to search, but this will be very slow for bigger amount of projects.

2nd) The file comes from project sources and has implementation in library. This is probably useless as it's wrong backward reference. The project library depends on project source but the dependence is vice versa. Such a library belongs to runtime classpath.

The 1st case (with the subtypes in the same jar) can be fixed, the generic case (with the project lookup) is problematic due to performance reason.
Comment 18 Tomas Zezula 2010-12-17 09:35:15 UTC
The current implementation of the File Hierarchy is not very effective and does nearly the same as I've described as the performance problem (in fact it does the same but a bit slower). It really deserves to be rewritten. But adding the support for class from libraries does not add any new performance overhead. It will have the same speed as if it the classes were from sources. So I will integrate it.
Comment 19 Tomas Zezula 2010-12-17 09:48:03 UTC
Fixed jet-main a34246da45b0
Comment 20 Tomas Zezula 2010-12-17 12:57:43 UTC
I've improved a bit the performance of HierarchyView, jet-main 2b5506d67c11
Comment 21 Quality Engineering 2010-12-18 06:10:46 UTC
Integrated into 'main-golden', will be available in build *201012180001* on (upload may still be in progress)
User: Tomas Zezula <>
Log: #192306:Class Hierarchy does not show subtypes from libraries.