Eclipse IDE – How to locate methods in Java file ?

In this article, we will discuss how to locate methods in a Java class file in Eclipse IDE

Though, there are standard to limit the number of lines of code for a Java class file. But at times, we are forced to write more methods inside same Java class which in turns makes life cumbersome to identify correct method where we are interested to work/modify/rectify/fix the issue

To simplify this, Eclipse IDE provides easy shortcut keys and some alternate ways to find correct method inside a Java class file

1. 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

Let’s understand each one with simple example in Eclipse IDE:

1.1 To find method inside same Java class file

Step 1: press CTRL + O simultaneously

Step 2: enter method name to be searched

Step 3: Wildcards can also be used, in case if we don’t remember method name

1.2 Searching files from Search (CTRL + H) menu

This helps to find any phrase from files

Step 1: press CTRL + H simultaneously

Step 2: Wildcards can also be used, in case if we don’t remember method name along with file extensions

2. Useful Eclipse IDE shortcuts :

Related Articles:

References:

Happy Coding !!
Happy Learning !!

Eclipse IDE - How to open editor using CTRL+E ?
Eclipse IDE - How to search files ?