Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Netbeans class + method dropdown combo, what you call it?

 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Like in Visual Studio, you can go directly to that method.
Side by side in VS. How do you get the same stuff in netbeans/eclipse?
Thanks
Jack
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure exactly what Visual Studio provides, you'll have to give a detailed description of exactly what it does.

In Eclipse, if you have an instance of a specific class, and type a period and then hit ctrl-space, you get a list of public methods and fields. You can restrict this list by typing the first few letters of the method/file. You can then use the arrow keys to scroll through the list, and for each one that has javadoc defined, Eclipse displays a pop window showing the Javadoc.

Additionally, if you have code where a method or field reference appears, you can right-click the method/field and select go to definition.

Is that what you were asking about, or is it some other capability?
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe this feature is called "autocomplete". It works in my copy of NetBeans in exactly the same way as described by Peter in Eclipse. Googling netbeans autocomplete brings up questions on how to activate the feature in NetBeans, looks like due to some bug or misconfiguration NetBeans sometimes stops doing that.

If by "going directly to that method" you mean finding the declaration of a method, then this can be achieved by Ctrl-Click or Ctrl-B. This command is called "Go to declaration" in NetBeans (in the Navigate submenu). The Ctrl-B key can be remapped to something else, though.
 
Jacky Luk
Ranch Hand
Posts: 634
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Martin Vajsar wrote:I believe this feature is called "autocomplete". It works in my copy of NetBeans in exactly the same way as described by Peter in Eclipse. Googling netbeans autocomplete brings up questions on how to activate the feature in NetBeans, looks like due to some bug or misconfiguration NetBeans sometimes stops doing that.

If by "going directly to that method" you mean finding the declaration of a method, then this can be achieved by Ctrl-Click or Ctrl-B. This command is called "Go to declaration" in NetBeans (in the Navigate submenu). The Ctrl-B key can be remapped to something else, though.


I actually am talking about this
VS to Netbeans.png
[Thumbnail for VS to Netbeans.png]
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't have direct experience with Visual studio, but probably the closest think in NetBeans is Navigator (Windows/Navigating/Navigator). It takes much more screen estate, but you can have it minimized and click on it to bring it up. It only displays members of current class, to go to a different class, you'll use Navigate/Go To Type (Ctrl-O in Netbeans default keymap). In all Go To forms it is possible to use wildcards or camel case (eg. LiLi will match LinkedList and LineListener). (Recently I've found it is possible to use camel case in autocomplete too, it is very useful.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic