Bug 54043 - Problems with type hierarchy for binary types
Summary: Problems with type hierarchy for binary types
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.0 M8   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-08 11:44 EST by Dani Megert CLA
Modified: 2004-03-25 12:56 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 Dani Megert CLA 2004-03-08 11:44:17 EST
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)
Comment 1 Philipe Mulet CLA 2004-03-09 12:23:02 EST
Could be a regression introduced by fix for bug 52384
Comment 2 Philipe Mulet CLA 2004-03-09 12:49:00 EST
*** Bug 53095 has been marked as a duplicate of this bug. ***
Comment 3 Frederic Fusier CLA 2004-03-11 10:49:08 EST
After investigation it sounds that test case 1 is a duplicate of bug 53095 and 
test case 2 is a different problem...
Comment 4 Frederic Fusier CLA 2004-03-11 13:19:56 EST
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...

Comment 5 Jerome Lanneluc CLA 2004-03-17 13:36:52 EST
Moved test case to TypeHierarchyTests
Comment 6 Jerome Lanneluc CLA 2004-03-25 12:56:43 EST
Verified in I200403250800.