Bug 3192 - Invalid type hierarchy when missing type(s) in hierarchy (1GF5RN4)
Summary: Invalid type hierarchy when missing type(s) in hierarchy (1GF5RN4)
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All Windows NT
: P3 normal (vote)
Target Milestone: 2.0 M2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:51 EDT by Dani Megert CLA
Modified: 2002-01-11 09:34 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2001-10-10 22:51:02 EDT
Invalid type hierarchy when missing type(s) in hierarchy.

	Test Case:
	1. Create J project
	2. Add JUnit
	3. Use J9 lib instead of SDK
	4. Open type hierarchy on TraceFrame
	==> shown type hierarchy is TraceFrame --> Object

	This is even more confusing if the source is not opened, e.g.by
	fist opening Test.java in the type hierarchy and then setting the
	focus to the above class.

	The type hierarchy should either not show the hierarchy or
	somehow indicate the problem.


NOTES:
EG (7/12/01 11:10:49 AM)
	moving to JCORE for comment

JBL (8/29/2001 4:29:33 PM)
	I don't have a version of JUnit that contains a type TraceFrame. Could you provide me with this version?

DM (8/29/01 5:01:56 PM)
	Sent JUnit 3.2 to Jerome.
Comment 1 DJ Houghton CLA 2001-10-23 23:51:07 EDT
PRODUCT VERSION:
	0.122


Comment 2 Jerome Lanneluc CLA 2002-01-09 05:59:08 EST
I find that not showing the hierarchy would be even more confusing.

I'm not sure why you're saying that the hierarchy is invalid: the super type 
Frame doesn't exist, so we cannot invent it. If we put a fake Frame class, this 
would confused the user since there would be no source to show.

In VAME and VAJ, the hierarchy doesn't include Object when the super type 
doesn't exist. Is this what you want?
Comment 3 Dani Megert CLA 2002-01-09 06:26:23 EST
I would excpect that either the view opens and I see that there are missing
classes or the hierarchy is not displayed and I get a dialog. Maybe the test
case is a bit specific because Object is the next class in the hierarchy.

What about A -> B -> C -> D -> E -> Object and then taking B and D out? Would
you expect to get A -> C -> E -> Object or only A (when looking at type
hierarchy of A)? In both cases I would like a hint either in the view or a
dialog before it opens.
Comment 4 Jerome Lanneluc CLA 2002-01-09 06:36:38 EST
What about the hint being that A has no super type (not even Object) if its 
direct super type is missing? So in your example, if B is missing we would show 
A only. If B is present and C is missing we would show A -> B. Etc.

I think when the user sees that a type is not rooted at Object, he/she would 
know that there is a problem with the hierarchy.
Comment 5 Dani Megert CLA 2002-01-09 06:49:24 EST
This should work but the UI should then still give some hint. I don't want to
check myself if Object is visible in my (Supertype-)Hierarchy.
Of course the nicest would be a dummy tree (UI) element <missing super class>.
As you stated earlyer I would not insert a dummy class into the model because
this would drag in other problems.


Comment 6 Jerome Lanneluc CLA 2002-01-10 13:13:43 EST
If a type is missing, the hierarchy is not rooted at Object any longer (this is 
consistent with VAJ and VAME.)

Please, enter a bug against JDT/UI if you consider that the UI should give some 
other hint that the hierarchy has problems. In this case, it should use the 
fact that the hierarchy is not rooted at Object.