Bug 328488 - [type hierarchy] Type Hierarchy of interface doesn't show some inherited implementations from side branches
Summary: [type hierarchy] Type Hierarchy of interface doesn't show some inherited impl...
Status: CLOSED DUPLICATE of bug 64319
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-22 11:30 EDT by x y CLA
Modified: 2010-10-22 14:36 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description x y CLA 2010-10-22 11:30:13 EDT
Build Identifier: 20100917-0705

Look at this sample:

    static interface I1
    {
        void f();
    }
    
    static class A
    {
        public void f(){}
    }
    
    static class AA extends A implements I1
    {
    }

    static class B implements I1
    {
        public void f(){}
    }

If cursor stays on I1.f() method and you press Ctrl+T. What do you expect? I expect to see some info about A.f() (either as AA.f() or A.f() ). But it is not in list so I assume B.f() is the only implementation of I1.f(). But as you can see it is not true.

Reproducible: Always
Comment 1 Markus Keller CLA 2010-10-22 14:36:50 EDT
A is not in the hierarchy of I1, so it cannot be shown.

AA is in the hierarchy of I1, but it doesn't implement f(). It only inherits f() from an other supertype.

To find such cases, we would have to compute another type hierarchy for each subtype of the original type. That's too expensive for the quick hierarchy.

Suggested fix for such code is to override the method in the "joiner" class (AA) and call the super method. That also helps the next reader of the code.

*** This bug has been marked as a duplicate of bug 64319 ***