Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call hierarchy from a certain function

Background:

Working in eclipse, I have two function: do_something and perform_task. I know that do_something calls a number of other functions which in turn call others (and so on and so on) and somewhere down the line perform_task gets called as well.

Since this is a big project, lots of flows and so on, I've already found two different sequences where do_something activates perform_task through some other sequence of functions.

Actuall question:

Is there a way in eclipse to get the call hierarchy of a certain function, but only sequences that will include also a certain other function in the sequence?

Thinking of this in terms of graph paths, we have a directed graph, and instead of asking what are paths to node x, I want to know what are the paths to node x that include node y.

like image 717
shapiro yaacov Avatar asked Jan 14 '16 10:01

shapiro yaacov


1 Answers

It's not exactly what you're asking for, but might be useful enough:

In the Call Hierarchy view, there's an option to show the callees of the selected method instead of the callers. Look at the view toolbar of Call Hiearchy for the two buttons that depict green dots connected with lines; those button toggle between the two modes.

enter image description here

If you select do_something and open the Call Hierarchy view on it, then set the mode to Show Callees you might be able to explore the various paths out of do_something that lead to perform_task.

like image 58
E-Riz Avatar answered Sep 28 '22 02:09

E-Riz