chiliNUT
chiliNUT

Reputation: 19573

In netbeans, how can I tell what function/method I am in?

In IntelliJ IDE's like PHP Storm or Android Studio, the current function/method that the cursor is in is displayed at the top of the screen. No such luck in NetBeans.

Is there any way to find out what function/method the cursor is currently in?

It is a huge pain if, say, I search for foo in my project, and I find foo inside of class Bar, now I want to know what method of Bar I am in. I have to manually scroll up through my code to try and figure it out. Very annoying and time consuming. The Navigator tab does not really help here, as it displays the structure of my class but gives no indication of where the cursor is.

Is there a way to find out what method the cursor is in?

Upvotes: 2

Views: 1174

Answers (3)

michaelf
michaelf

Reputation: 499

I know this is an old thread but using "View ">"Show Breadcrumbs" will do what you want.

Upvotes: 6

Maxim Grachev
Maxim Grachev

Reputation: 439

Use Navigator window (Window->Navigator or Ctrl + 7). It should automatically show the current function. Works for me on Windows OS.

Upvotes: 1

Matthew Alan Troutman
Matthew Alan Troutman

Reputation: 41

I don't think this is exactly what you you're looking for, but if you click on one of the braces (}) at the end of a method/if statement etc, it will display the line directly above/next to the starting brace({). It works with methods, but it requires you to have to scroll to the bottom of the method so it's not that helpful, sorry that I couldn't help anymore.

Upvotes: 0

Related Questions