Eclipse find references for method

前端 未结 4 1103
借酒劲吻你
借酒劲吻你 2021-01-04 03:54

I wanted to find all the callers of the the method \"get\" for the following class:

package com.zzz.zzz.zzz.services;

public final class EMF {
  private sta         


        
相关标签:
4条回答
  • 2021-01-04 04:28

    With get highlighted, hit Ctrl+Shift+G. It'll come up with a list of results in the search tab/window. It'll find all references within your workspace. It does it via proper references, and not a plain text search.

    0 讨论(0)
  • 2021-01-04 04:30

    In Eclipse Kepler you can configure the search to filter out all Potential Matches (when using References - Workspace / Project or Hierarchy. To activate the filter, click the small down-arrow at the right top of the Search view and activate the Potential Matches check-box. enter image description here

    0 讨论(0)
  • 2021-01-04 04:31

    Find references in Project relies on method name, that's why it's not accurate. Try using Call Hierarchy.

    0 讨论(0)
  • 2021-01-04 04:36

    Sometimes, if you have multiple methods of the same name, e.g., constructors of a class, all with the same name but different signature, for example, it can be a pain to find all callers of one of those constructors. A trick you can use is to comment out the one you are investigating, and build. The compiler will then tell you all the places it is unable to find that signature, and hence these are exactly all the places that are trying to call that method with that name and that particular signature.

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