Using Static Graphs

Simplifying Graph Displays

Simplifying Graph Displays

The Static Graphs can display many relationships between items in your program simultaneously. To use the graphs effectively, you may want to display only a subset of these relationships. You can filter nodes out based on topics such as inheritance, containment, type of function call, declarations, and many others, depending on the graph. To apply filters to new nodes and arcs that are added to the graph, choose "View: Filters…". The filters take effect immediately. When you make changes, such as settings filters, SoftBench Static Analyzer saves the changes automatically.

The main SoftBench Static Analyzer window also offers filtering mechanisms. See “Simplifying Query Results” on page 266.

Reducing Graph Complexity

For large software applications, you can control graph complexity by reducing the number of relationships displayed on the graph or by hiding relationships of lesser interest after they are displayed.

For example, when you display all functions on the Call Graph, the resulting graph contains all functions and all "Calls" and "Calls Within" relationships. Once you see the entire graph, you may decide to concentrate on a small subsection of the call hierarchy and hide the rest of the graph:

1.Choose "Graph: All Functions" to display the initial call graph of all functions.

2.Press Shift, then select the node at the top of the subsection of nodes that you want to retain. The Shift key causes SoftBench Static Analyzer to select all nodes in the hierarchy below the selected node.

Alternatively, you can select multiple nodes by pressing the Control key as you individually select nodes, or you can drag the mouse and draw a box around the nodes you want to select.

3.Choose "Hide Unselected" from the popup menu.

In this example, you selected the nodes to retain. You can also hide nodes using reverse logic and select the nodes you want to hide, then choose "Hide Selected".

292

Chapter 10