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.
Summary: | Simple navigation to overriding methods | ||
---|---|---|---|
Product: | java | Reporter: | Jiri Prox <jiriprox> |
Component: | Editor | Assignee: | Dusan Balek <dbalek> |
Status: | NEW --- | ||
Severity: | blocker | CC: | markiewb, pjiricka |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
Jiri Prox
2008-03-14 14:47:02 UTC
Ideally, if there is only one implementation, the editor would move directly to the implementing source. If there is more than one implementation, a little pop up box (like the insert code pop up box) would be displayed so that an implementation can be selected. *** Issue 71911 has been marked as a duplicate of this issue. *** Isn't this already implemented? As I understand the feature, I don't believe it is currently implemented. (BTW: The above mentioned discussion URL seems to be dead. (http://www.netbeans.org/servlets/BrowseList?list=nbusers&by=thread&from=836327)) In a java project, go to the declaration of a method, perhaps in an interface or in a root class of some hierarchy. When you select the method name, there is nothing in the gutter to click on, but I frequently want to jump *as directly as possible* from there to an implementation of the same method elsewhere in my project (an override, or an implementation of the method). If not in the gutter, there should be a simple, direct popup or popup submenu listing the names of classes implementing that method. And conversley, when viewing one of these implementing methods, I often want to jump directly not only to the root declaration, or super implementation, but to another "peer" implementation. I am not certain but I think I saw this implemented in Eclipse: some special popup with which the programmer was jumping all over the place, among these various method implementations. It looked to be a huge time saver for the person that was coding. Just one or two gestures, and no waiting for a search. I was jealous, I always wanted exactly that. :-) +1 on this. This was just mentioned to me by Jerome Dochez from the GlassFIsh team - the lack of quick navigation to subclasses or overriding methods is what is preventing him from using NetBeans. He also showed be how smoothly this works in IntelliJ. Also, enhancement 167312 is somewhat related. The correct link to the original discussion is: http://netbeans.org/projects/www/lists/nbusers/archive/2008-03/message/1357 (In reply to comment #5) > +1 on this. This was just mentioned to me by Jerome Dochez from the GlassFIsh > team - the lack of quick navigation to subclasses or overriding methods is what > is preventing him from using NetBeans. He also showed be how smoothly this > works in IntelliJ. > I guess I can understand why tedious navigation would prevent one from using an IDE. I'll also add Smalltalk (e.g., Squeak), and Self to the list of O-O language IDE's that *do* have this feature. Petr, could you please specify what exactly is missing (in Java support)? For example, using a recent NB daily build: 1. Using a clean userdir, I have opened masterfs module from NB 2. I have opened FileObject (using Ctrl-O) 3. Wait for a short while 4. The (left) gutter shows icon with gray "I" (or "O") next to FileObject class declaration as well as next to getName() and other methods. 5. Clicking on this icon brings up a pop-up with classes that extend FileObject or override/implement the selected method, clicking at the class navigates to the overridder. 6. The pop-up will also be shown when Ctrl-Alt-click-ing on the method name in its declaration. 7. The pop-up is also shown when Ctrl-Alt-click-ing on a method use - try to go to FileObject.isLocked and try to Cltr-Alt-click on the "lock()" - it brings up a popup with overriders of FileObject.lock() (whereas Ctrl-clicking on the method would jump to the FileObject.lock() method declaration). (To my knowledge, it worked in the same way in NB6.9, but is much faster in trunk/7.0.) The main issue (but outside the scope of java.editor/Java support) is that this depends on correct implementation of various queries, esp. there must be correct sourcepath for the opened source. This is typically not a problem for sources from opened projects, and seems also work fine for registered J2SE platforms and libraries. There is a problem with Maven "binary" libraries sources for which do not specify sourcepath (#192647) (and in some cases apisupport projects - if you use ".nbbuild.properties" to specify nbjdk.home, you should make sure the given platform is registered in Java platforms). Thanks. Yes you are right, now I checked and it really works, for both classes names and method named, and for both classes and interfaces. I guess the following refers to this feature? http://wiki.netbeans.org/NewAndNoteWorthy#Go_to_Implementation If so, please feel free to close as fixed. |