Bug 161916 - [hierarchy] Quick TypeHierarchy doesn't find subtypes in some cases
Summary: [hierarchy] Quick TypeHierarchy doesn't find subtypes in some cases
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M5   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-23 05:10 EDT by Erwin Tratar CLA
Modified: 2008-02-04 15:59 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erwin Tratar CLA 2006-10-23 05:10:57 EDT
The quick (sub)type hierarchy is empty if opened on e.g. org.eclipse.jdt.core.dom.Annotation or org.eclipse.jdt.core.dom.Expression. It does not show any subtypes, but the supertype hierarchy works. It works fine on org.eclipse.jdt.core.dom.IExtendedModifier however. 

Opening the same class in the normal Hierarchy View shows a message about "All types of the current hierarchy 'xxx' have been filtered by either the selectd working set or the chosen locked method.".

To reproduce I unzipped a fresh Eclipse 3.2.1, used a new workspace and created a new project.
Comment 1 Markus Keller CLA 2006-10-24 08:12:19 EDT
I cannot reproduce. I tried with a JDK 1.5 and chose 'File > Import > Plug-in Development > Plug-ins and Fragments' to import org.eclipse.jdt.core as project with source folder.

Please reopen and provide more exact steps if you can still reproduce in a plain Eclipse SDK install.
Comment 2 Erwin Tratar CLA 2006-10-24 08:34:05 EDT
I think it has to do with the fact that it's a binary class (I did not import the org.eclipse.jdt.core as source).

What I did:

- extract a fresh 3.2.1 SDK
- open on new workspace
- create a new plugin project
- add dependency on org.eclipse.jdt.core,
 org.eclipse.jdt.core.manipulation,
 org.eclipse.jdt.debug,
 org.eclipse.jdt.ui
- opened org.eclipse.jdt.core.dom.Annotation
- navigated to the class' name (Annotation) and pressed CTRL+T
- popup is empty

Inspired by your comment I removed all but the org.eclipse.jdt.core dependencies, and not it works!

Some further investigation shows that it does not work when org.eclipse.jdt.core and org.eclipse.jdt.ui are selected as dependencies. Without *.ui it works.

My environment:
eclipse.buildId=M20060921-0945
java.runtime.version=1.5.0_09-b03
Comment 3 Markus Keller CLA 2006-10-24 09:51:47 EDT
Thanks, Erwin. Reproduced in HEAD.

ITypeHierarchy#getRootClasses() returns an empty array. Expected: j.l.Object.
Comment 4 Jerome Lanneluc CLA 2007-12-17 11:12:51 EST
Verified that the scenario described in comment 2 works using 3.4M4
Comment 5 Kent Johnson CLA 2008-02-04 15:59:59 EST
Verified for 3.4M5 using I20080204-0010