BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Future Focus: Call Hierarchy in Visual Studio

Future Focus: Call Hierarchy in Visual Studio

This item in japanese

The Visual Studio team has started to shed some light on the current development of Visual Studio, revealing some of the features that will most likely be available in the next release of Microsoft's IDE, and inviting everyone to comment on those features while in their incipient phase.

Code Gallery has been chosen as the open forum to discuss new Visual Studio features, and the project is available here. The latest feature to be discussed is Call Hierarchy.

What is Call Hierarchy?

According to Charlie Calvert, Call Hierarchy is:

One of many features that the team has planned for the next version of the IDE. It allows developers to explore a code execution path by showing all calls to, or calls from, a selected method. There are several scenarios in which this functionality might be useful. It will allow developers to:

  • Get a better understanding of how code flows
  • Navigate through their code
  • Understand the impact of making changes to their code.

This is what it makes it different from other features:

  • Unlike Find All References, it will allow you to drill down several levels deep so that you can view complex chains of method calls and additional entry points.
  • Unlike the run time Call Stack displayed by the debugger which shows a single code execution path, the Call Hierarchy will be available at design time, and it will allow you to explore all possible execution paths.

Implementing Call Hierarchy

There are currently two ways proposed to display the Call Hierarchy:

  • The "In-Depth Understanding" visualization will allow developers to thoroughly explore a call hierarchy.
  • The "Quick Understanding" visualization will help developers quickly navigate or explore a call hierarchy while still inside the editor window.

The "In-Depth Understanding" will open up a docking window displaying the following information:

  • The Calls To tree view shows all the methods that call the selected method. The tree visible in this sub-window can be expanded so that you can drill deeper into the stack of callers.
  • The Calls From tree view shows all the methods called by the selected method. This tree can be expanded to further explore the stack of called methods.
  • Preview – This pane provides a quick read-only preview of the code surrounding the selected method.

The "Quick Understanding" will not display the Call Hierarchy information in a docking window but inside an inline view, allowing the developer to stay in the code context. Either way, everyone is invited to comment on this proposed feature and give a feedback here.

Rate this Article

Adoption
Style

BT