This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 136532 - Implement "Go to Implementation" (aka type hierarchy)
Summary: Implement "Go to Implementation" (aka type hierarchy)
Alias: None
Product: java
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker with 9 votes (vote)
Assignee: Jan Jancura
: 88399 148517 168058 171542 (view as bug list)
Depends on:
Reported: 2008-06-05 10:19 UTC by gborkowski
Modified: 2010-08-20 15:16 UTC (History)
4 users (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description gborkowski 2008-06-05 10:19:31 UTC
Recently I did a switch to Eclipse, and now I can't go back because of two missing features. One is Call Hierarchy (see
issue 132187) - I got response it will be in 6.5, very good. 
Second is Type hierarchy, more precisely Quick Type Hierarchy. And it is not what is in NetBeans under Alt-Shift-F12.
What i'm really missing is something what I called "Go to Implementation".
The use case is following:
In current days, we usually use Spring, and coding to interface in our code. Using interfaces let us use proxy-based
aspects in Spring.
This means, that we have typical structure like this:

interface MyService {

interface MyDAO {

class MyServiceImpl {
 MyDAO myDAO; //injected by DI
 someMethod() {

class MyDAOIMpl {...}

class Main {
 MyService service; //injected by DI
 public static void main(..) {

Now i open class Main in editor, put caret on someMethod. I want to see implementation. When I press CTRL and click the
method, I go to interface MyService, which is of no value for me. I have to do Search for Usages to find MyServiceImpl
and the method implementation then. In this method there is a call to MyDAO.someDAOmethod() - but again, if press Ctrl,
i'm taken to DAO interface, which is again of no value.
The point is, that in most applications there is only one implementation of such interface. So for example when I press
Ctrl+shift and click the method, I should be taken to the implementation in class, not declaration in interface. If
there are more than one implementation, some popup should be shown with list of implementations to select.

In Eclipse it is solved by Quick Type hierarchy. Put caret on method (in our example in Main class), press Ctrl-T and
you see in-line popup with classes implementing interface. If you select given class, you are taken to this exactly
method in selected class. It has wider functionality, but this is what I found essential. In applications based on
Spring or other interface-base frameworks, one really cannot work without such option. And Alt-Shift-F12 in Netbeans
does not work on methods.

I think it can be even more functional and simplified if it is implemented as I described above (e.g. Ctrl-Shift+click
to navigate, and context menu->go to implementation).

It looks like it is related somehow to issue 18358, and will potentially satisfy that issue, at least to some extend.
Comment 1 gborkowski 2008-06-05 10:31:21 UTC
And by the way: I don't see any difference between Go to Source and Go to Declaration when invoked on method call in
editor (it is different for fields, but for methods seems to work exactly the same). So perhaps we could change the
behavior of Go to Source, when called on methods, to work as I described ("Go to implementation")?
Comment 2 Sherold Dev 2008-11-26 22:12:11 UTC
I suggest to raise the priority to P1.

This feature is really badly missing and there is no good enough replacement for it. Developers spend most of their time
in the IDE editing and navigating the code. Being able to traverse the type hierarchy very quickly from within a popup
is highly addictive.

To be honest, I can't believe that this feature is still missing.
Comment 3 Vitezslav Stejskal 2009-09-07 10:31:08 UTC
*** Issue 168058 has been marked as a duplicate of this issue. ***
Comment 4 Vitezslav Stejskal 2009-09-07 10:31:21 UTC
*** Issue 148517 has been marked as a duplicate of this issue. ***
Comment 5 Vitezslav Stejskal 2009-09-07 10:31:32 UTC
*** Issue 171542 has been marked as a duplicate of this issue. ***
Comment 6 malfunction84 2009-09-17 04:54:15 UTC
A few questions:
- What happened to the Go To Implementation plugin?  It showed up in 6.5, but I don't see it in 6.7.
- How does this issue relate to issue 142112?

Also, some notes from issue 168058:
The plugin works for method calls.  It should also work on:
- Interface names
- Abstract class names
Comment 7 catweasle 2010-03-18 13:16:01 UTC
issue 104311 is also a duplicate, no?
Comment 8 malfunction84 2010-03-19 18:34:01 UTC
Isn't this already in 6.9?
Comment 9 pekarna 2010-03-24 22:49:31 UTC
Is this a duplicate of issue 88399?
Comment 10 pekarna 2010-03-24 22:51:43 UTC
There was a fine beta plugin which added "Navigate -> Go to implementations" in
the context menu, but I can't find it anymore in 6.8.

I'd add +10 to this as this is what I miss a lot.
Comment 11 David Strupl 2010-08-20 14:26:51 UTC
I think that since 6.9 there are the icons in the left editor gutter (right over the line numbers) that implement what is requested here (on right click). I mean the green or white "I" or "O" icons ... Marking as fixed.
Comment 12 malfunction84 2010-08-20 15:07:32 UTC
*** Bug 88399 has been marked as a duplicate of this bug. ***
Comment 13 malfunction84 2010-08-20 15:16:26 UTC
The icons in the editor gutter are indeed useful, but some people want a list of implementations to appear when they Ctrl+click a method name which has implementations.  I think bug 142112 is intended to cover this feature.