Find methods calls in Eclipse project

后端 未结 6 473

I have a class X containing method myMethod(). I would like to find locations in all projects in my current workspace where this myMethod() is being called. I cannot use any

相关标签:
6条回答
  • 2020-11-30 21:35

    Right click on method and click on Open call Hierarchy

    0 讨论(0)
  • 2020-11-30 21:37

    Go to the method in X.java, and select Open Call Hierarchy from the context menu.

    0 讨论(0)
  • 2020-11-30 21:38

    Move the cursor to the method name. Right click and select References > Project or References > Workspace from the pop-up menu.

    0 讨论(0)
  • 2020-11-30 21:42
    select method > right click > References > Workspace/Project (your preferred context ) 
    

    or

    (Ctrl+Shift+G) 
    

    This will show you a Search view containing the hierarchy of class and method which using this method.

    0 讨论(0)
  • 2020-11-30 21:51

    You can also search for specific methods. For e.g. If you want to search for isEmpty() method of the string class you have to got to - Search -> Java -> type java.lang.String.isEmpty() and in the 'Search For' option use Method.

    You can then select the scope that you require.

    0 讨论(0)
  • 2020-11-30 21:54

    Select mymethod() and press ctrl+alt+h.

    To see some detailed Information about any method you can use this by selecting that particular Object or method and right click. you can see the "OpenCallHierarchy" (Ctrl+Alt+H). Like that many tools are there to make your work Easier like "Quick Outline" (Ctrl+O) to view the Datatypes and methods declared in a particular .java file.

    To know more about this, refer this eclipse Reference

    0 讨论(0)
提交回复
热议问题