简体   繁体   中英

How to find where a method is used in Java project

I am working on learning a project which was already created by someone else. It was not followed a proper coding method (no comments and so on). Im finding it difficult to find where a method is used. I tried "find" but as it searches only a particular class im unable to get the answer. Im working in eclipse. So can anyone please help me out.

You can select method that you want to find and use "Ctrl +H" and references search. 在此处输入图片说明

I hope this can help you.

Right click on the method in the editor, and from the pop-up menu select

  • References > Project , or
  • References > Workspace ,

depending on whether you want to search only in the current project, or in the entire workspace.

For the find references in workspace option, the default keyboard shortcut is: Shift + Ctrl + G

After invoking the command, the Search window will display an overview of all locations where the method is used.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM