Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse shortcut to find function name

Tags:

java

eclipse

I have certain methods/functions in a class which are fairly very large, 3-4k lines. (Poor design, dont ask) which makes navigation very difficult.

Is there a certain shortcut in eclipse, such that, if i am at a certain line of code, using the shortcut will take me directly to the beginning of the function or atleast give me the name of the function.

like image 354
frewper Avatar asked Sep 05 '13 05:09

frewper


People also ask

How do you find where a function is called in eclipse?

Shortcut commands in Eclipse IDE:CTRL + O –> used to search methods inside same Java class. CTRL + H –> opens dialog box which provides number of options to find method.

What does Ctrl k do in Eclipse?

In Eclipse, if the cursor is over a word and you press Ctrl + K you will jump to the next occurrence of that word in the file.

What is Ctrl Shift R in eclipse?

Open project, file, etc. Ctrl+Shift+R. Open Resource (file, folder or project) Alt+Enter. Show and access file properties.


2 Answers

Ctrl+o might be what you are looking for.

It will list out all the methods under the class file.

You just take a look at all other shorcut keys available here http://www.shortcutworld.com/en/win/Eclipse.html.

Hope it helps.

like image 147
Sankarganesh Eswaran Avatar answered Oct 23 '22 22:10

Sankarganesh Eswaran


You can use Outline view. If you have your cursor within a method, the appropriate method will be selected in the view and double-clicking on the selected method will take you to the top of the method.

Screenshot coming up.

Edit:enter image description here

like image 41
rocketboy Avatar answered Oct 23 '22 21:10

rocketboy