Author Topic: How to get a list of callers to present function  (Read 3248 times)

MichaelBrenden

  • Community Member
  • Posts: 13
  • Hero Points: -1
How to get a list of callers to present function
« on: December 07, 2011, 02:59:01 am »
Made to handle so many languages, SE uses lots of loaded words.  Even after battling the docs, I'm having trouble understanding if SE can do this:

I click to put cursor insertion point somewhere on a function name.
I want to see a list of everywhere in my project files (by file and line in file) that calls the function the cursor insertion point is presently on.
Can SE do this?  If so, what is the feature referred to as, and how do I do it?

I see stuff about "references" but I don't understand; there seems to be many dead ends, empty files listed, etc.

chrisant

  • Senior Community Member
  • Posts: 1413
  • Hero Points: 131
Re: How to get a list of callers to present function
« Reply #1 on: December 07, 2011, 04:22:46 am »
Yes, that's finding "references".  It's probably Ctrl+/ but the key binding could be different depending on the keyboard emulation mode.

Can you elaborate on the "dead ends" and "empty files listed" part?

MichaelBrenden

  • Community Member
  • Posts: 13
  • Hero Points: -1
Re: How to get a list of callers to present function
« Reply #2 on: December 07, 2011, 09:23:53 am »
Well, for example, if I move cursor onto any "__construct()" line and hit ctrl+/, a "References" window appears, but it lists nearly every class in my project: over 1,200 files across my ten or so related projects in this particular "workspace".  I'd like to make SE be much more selective, to at least keep to the current single project.  It just seems very rough this way; and the "jump to", too, the ctrl+. feature, same thing: SE presents a bunch of unrelated files that are basically either blanks and/or dead-ends.

chrisant

  • Senior Community Member
  • Posts: 1413
  • Hero Points: 131
Re: How to get a list of callers to present function
« Reply #3 on: December 07, 2011, 10:03:07 am »
Re: "__construct()" -- Yes, there might be a threshold involved:  it seems as if SE filters the list if the symbol name is relatively unique, but if the symbol name is defined in a large number of places then SE doesn't filter the list.  It's probably a performance limitation, but I agree it's frustrating.  I wish it would show a cancellable progress bar while it filtered the list.  (I just added this to the wish list topic here).

Re: "blanks and/or dead-ends" -- I'm not sure what this refers to, can you elaborate further?  If there's a "?" icon next to these references then it means SE isn't sure whether or not it's a relevant reference, but SE prefers to show false positives, versus suppressing false negatives.