how to show filenames of calling function in eclipse call hierarchy view

531 views Asked by At

Is it possible to get Eclipse Mars 4.5.0 IDE for C/C++ to show the filenames of the functions in the call hierarchy. For example in the below view I would like to see the name of the file that the "IncrementCount" and "DecrementCount" is in.

Reason is most functions are called from numerous files and I would like to see them listed here instead of clicking each function to open the files.

Call Hierarchy View

2

There are 2 answers

1
jdoe7777777 On

If you bring up the context menu from the white down arrow at the top left of the Call Hierarchy tab, there is an option to display filenames. This was seen in Eclipse 4.5.1 IDE for C/C++, but I would think it's likely in 4.5.0 as well.

0
HighCommander4 On

There is currently no option to get the Call Hierarchy view to display filenames for results.

As a workaround, you could consider using "Find References" instead (right-click -> References -> Workspace or Ctrl+Shift+G). This is like one level of the Call Hierarchy (i.e. it shows you the callers, but not the callers of the callers), and the callers are grouped by file.

That said, I don't see a reason the Call Hierarchy view shouldn't show filenames. Consider filing an issue asking for this to be added.