Summary: information about the Call Hierarchy feature introduced in CAST Imaging ≥ 2.12.
Navigating through a large codebase is time-consuming, inefficient and prone to oversight as developers may need to manually search for method or function usages.
Call Hierarchy helps developers understand the flow of code execution by displaying the callers and callees of a selected element. By examining the call hierarchy of a particular element, developers can assess the potential impact of making changes to that element. They can determine which parts of the codebase rely on the selected element and understand the ripple effects that modifications may have on other components. They can identify methods or functions that are frequently called and extract them into reusable components or libraries.
Accessing the feature
To access the Call Hierarchy feature, you must be working at Object level in any scope:
Right click an object in the view and select Call Hierarchy from the contextual menu - this object will then be designated the source object:
Using the feature
When the Call Hierarchy option is clicked, the following dialog box is displayed enabling you to configure how the feature will function:
|Select link type|
Choose the type of links that will be taken into account by the Call Hierarchy feature:
|Number of depths|
Defines the maximum number of levels in the call graph. By default this is set to 4 and can be changed as required. Note that changing to above 10 can impact performance - the higher the number, the more objects need to be discovered, therefore impacting performance.
|Complete Call Graph|
Available in ≥ 2.17.
Select this option to choose the maximum depth available for the specific link type you have selected. If you have chosen Caller and Callee (the joint option), then the maximum depth chosen will be the higher of the two link types.
Hide external objects
Not available in ≥ 2.17. By default in these releases, external objects and main object + sub objects are ALWAYS shown.
Use these options to filter the type of objects in the results:
|Main objects only|
The example below shows a source object "authors" at the bottoms of the image and then varying levels of callers (those objects calling the source object):
Click to enlarge