Code Structure Windows in Visual Studio 2012 RC

As we are aware of Visual Studio 2012 RC Release, techies are very interested to know about the new feature of Visual Studio 2012 RC.

Today, we will discuss about the one of the new feature of Visual Studio 2012 RC called Code Structure Windows.

What is Code Structure Window?

Code Structure Window is nothing but the window in which we can examine the properties, methods and members of the Dynamic Link Library, Type Libraries [TLB], COM Components and .Net Framework components of Visual Studio Projects.

Types of Code Structure Window

There are four types of Windows available as listed below.

Class View

VB, C# and C++

Call Hierarchy

VB, C# and C++

Object Browser

All

Code Definition

VB, C# and C++


Let us discuss about the Code Structure Window one by one.

Class View Window

We can see the Class View Window in the Solution Explorer as a part and also as a separate Window. The below image shows the Class View as a part of Solution Explorer. The Class View can be invoked using combination of Ctrl + Shift + C keys

WinVSRC1.jpg
The first figure shows the Class View as a part of Solution Explorer and the second figure shows the way to get the Class View Window as a separate Window.

In Class View, there are two panes which is shown in the below figure.

WinVSRC2.jpg

In the above figure, we can see the two panes of Class View. The Upper Pane holds the namespace, types, interfaces and enumerations and the Lower Pane holds the members of the selected item.

Toolbox for Class View

WinVSRC3.jpg

There are five buttons available in the Toolbar of the Class View Window.

  • New Folder
  • Backward
  • Forward
  • Setting
  • View Class Diagram

New Folder

The New Folder button is used to create Virtual Folders to organize the elements which is used frequently.

Backward

The Backward button navigates you to the Previous selected item.

Forward

The Forward button navigates you to the Next selected item

Settings

The Settings button will list all the available options to get the list of methods and members in the selected item.

View Class Diagram

The View Class Diagram button will generates the Class Diagram for the selected namespace or type.

WinVSRC4.jpg

Call Hierarchy Window

The Call Hierarchy Window shows you the hierarchy of the selected method or property or constructor. There may be multiple levels of methods call inside a selected method.

WinVSRC5.jpg

We can invoke the Call Hierarchy Window in many ways. The first way is from VIEW Menu, Solution Explorer, Class View and Code Editor Window . The Shortcut Key Ctrl + Alt + K is used to invoke the same.

The above figure shows the Call Hierarchy Windows for the Method AddUserInfo. In this windows, we can see the two level of Call Hierarchy. The first level is the button1_Click event and at the second hierarchy the AddUserInfo method.

Under every level, we have two groups namely Calls To and Calls From. The Calls From group has the methods or events or properties which will be called inside the selected method or event or property. The Calls To group has the methods or events or properties which is called from another method or event or property.

There are two Panes in the Call Hierarchy Window called Main pane which has the types or names and the Call Sites pane has the location of the selected method or event or property.

Object Browser Window

WinVSRC6.jpg

The Object Browser Window is used to display the description about the namespace in selected solution or project. The Object Browser can be invoked from the VIEW Menu or by using Ctrl + Alt + J combination of keys.

There are two panes in the Object Browser in which the Right Pane [Pane I] will display the types or namespaces in the selected solution or project. The Left Pane [Pane II] will display the methods or properties of the selected type or class in the Right Pane.

Code Definition Window

The Code Definition window nothing but a windows which displays the definition of a selected type or member in the active project. The type or member can be selected in the code editor or in a code view window.

WinVSRC7.jpg

The Code Definition Window can be invoked from the VIEW Menu or using the Short Key Ctrl + \ + D.

WinVSRC8.jpg

The Code Definition Window is READ-ONLY window. We cant edit the definitions directly but the option EDIT DEFINITION used to edit the definitions.

That's it Guys.

We done with the Code Structure Windows.

Summary

Well, We gone through the Code Structure Windows and for the more detailed content please refer MSDN.

Thanks for spending your precious time here. Please provide your valuable feedbacks and comments, which make me to give a better article next time.

Up Next
    Ebook Download
    View all
    Learn
    View all