0

In Netbeans 7.2, when I try to navigate to a method implementation (that has more than one implementation) nothing happens. If the method only has one implementation it all works, but if it has more than one, it doesn't. Is it possible to make it suggest both implementations (like in e.g. eclipse)?

Update 1: I investigated this and found that NB7.2 only supports this kind of navigation in your own code. So if you have a library that consists of an interface and two classes that implement this interface, it will not suggest that you navigate to these two classes, instead Netbeans tells you that "overriden methods not found". Maybe the nNtbeans compiler is unable to find these classes.

Update 2: In eclipse this feature refers to JDT weaving. I'm wondering, are there any in netbeans?

ollo
  • 24,797
  • 14
  • 106
  • 155
maks
  • 5,911
  • 17
  • 79
  • 123

1 Answers1

2

To your first question, in the margin (where the line numbers are) you will either see a little green "i" for implements or a "o" over overwrites or a little gray dot (which I take as meaning it does both)...

enter image description here

So, if you click on it you can navigate "up" the parent chain or "down" the child chain, depending on what it is you want to do.

It can actually be quite neat as you don't need to click, click, click, click to get to the parent class/interface, you click and select :P

MadProgrammer
  • 343,457
  • 22
  • 230
  • 366
  • what about if I want to go to method implemenation just from another method, not from declaration – maks Sep 24 '12 at 16:39
  • actually such problem only arises when I try to go to implementation method that is in some library. Actually it doesn't go to the implementation at all. For open projects' it works. For example I can't even go to implemention of `ArrayList.add()` method while pressing Ctrl+Alt and clicking on the method – maks Sep 24 '12 at 16:54
  • So know you have at least two methods of navigating. Yeah, I know it's kind of a pain in the ass to start by clicking the method name, but at least that gets you to where you want to go, doesn't it? – MadProgrammer Sep 24 '12 at 19:51
  • If I use some library and it has a complicated hierarchy and a lot of classes, I use it through some interface and I want to see an implementation of concrete method, so I even will not now from where to start as netbeans have no ability to navigate to library code. It's very poor navigation((( – maks Sep 24 '12 at 20:06
  • You could take a look under Navigate|Inspect|Hierarchic, unfortunately, it's used mostly for class navigation and not method navigation. – MadProgrammer Sep 24 '12 at 22:49