Community
Participate
Working Groups
I20040304 The type hierarchy does not seem the return all super types. Test Case 1: 1. have JFace as binary 2. open TreeViewer in JavaEditor 3. press Ctrl+O 4. press Ctrl+O Observe: only one level of inheritance is shown even though we ask the type hierarchy for all super types getAllSupertypes(IType) Test Case 2: 1. have Resources plug-in as binary 2. open org.eclipse.core.internal.resources.File 3. select File in declaration 4. press F4 Observe: Type hierarchy is not complete (type Resource is missing)
Could be a regression introduced by fix for bug 52384
*** Bug 53095 has been marked as a duplicate of this bug. ***
After investigation it sounds that test case 1 is a duplicate of bug 53095 and test case 2 is a different problem...
Fixed. Now the org.eclipse.core.internal.resources.File hierarchy is well displayed when pressing F4. This problem occured because of following necessary different reasons: 1) org.eclipse.core.internal.resources.File has no subtype 2) it exists a class with same name which has subtypes (java.io.File) 3) project used for class file org.eclipse.core.internal.resources.File contains a prerequesite on org.eclipse.core.resources project Due to these -so specific- resasons, TypeHierarchy for org.eclipse.core.internal.resources.File was incompletely computed and only its direct superclass was stored in classToSuperclass map... [jdt-core-internal] Changes made in method reportHierarchy of HierarchyResolver. Given parameter binaryTypeBinding may be null _and_ focus a binary type. In this case, only tries to get cached type binding corresponding to focus fully qualified name. If null, then focus type has not been resolved indirectly and then we must not report any hierarchy. Otherwise store this binding to focus type and continue... Test case added in separated class TypeHierarchyTests2 and new workspace test project TypeHierarchy2 as adding these test in TypeHierarchyTests has side effects I could not fixed without lib.jar source files...
Moved test case to TypeHierarchyTests
Verified in I200403250800.