{"id":443,"date":"2011-09-20T11:00:00","date_gmt":"2011-09-20T11:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vbteam\/2011\/09\/20\/visual-studio-11-developer-preview-visual-basic-vb-call-hierarchy\/"},"modified":"2024-07-05T12:39:21","modified_gmt":"2024-07-05T19:39:21","slug":"visual-studio-11-developer-preview-visual-basic-vb-call-hierarchy","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/vbteam\/visual-studio-11-developer-preview-visual-basic-vb-call-hierarchy\/","title":{"rendered":"Visual Studio 11 Developer Preview: Visual Basic (VB) Call Hierarchy"},"content":{"rendered":"<p>By Zain Naboulsi (<a href=\"http:\/\/blogs.msdn.com\/b\/zainnab\/\" target=\"_blank\" rel=\"noopener\">Blog<\/a>)<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Default:<\/strong> CTRL + ALT + K<\/p>\n<p><strong>Menu: <\/strong>View | Call Hierarchy<\/p>\n<p><strong>Command:<\/strong> View.CallHierarchy; EditorContextMenus.CodeWindow.ViewCallHierarchy<\/p>\n<p><strong>Versions:<\/strong> Visual Studio 11 Developer Preview<\/p>\n<p><strong>Languages:<\/strong> VB<\/p>\n<p>With the announcement of the Visual Studio 11 Developer Preview it&rsquo;s time to take a look at some of the features you can start using with our latest version of the IDE right away.&nbsp; If you are already familiar with the C++\/C# Call Hierarchy feature from my <a href=\"http:\/\/blogs.msdn.com\/b\/zainnab\/archive\/2010\/01\/19\/using-the-call-hierarchy-c-only-vstiptool0005.aspx\">previous blog post<\/a> then you are already familiar with the features and may just want to start playing with this on your own. For those not familiar, I&rsquo;ll repeat the content here. And now on with the tip&hellip;<\/p>\n<p>(queue choir music)<\/p>\n<p>Visual Basic developers everywhere rejoice!<\/p>\n<p>The Call Hierarchy is now available for VB!<\/p>\n<p>&nbsp;<\/p>\n<p>This feature allows you to visually inspect the calls to and from any selected method, property, or constructor. Simply right-click any method, property, or constructor name and select View Call Hierarchy:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/09\/3568.image_thumb_1178A3B6.png\"><img decoding=\"async\" style=\"padding-left: 0px;padding-right: 0px;padding-top: 0px;border-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/09\/3568.image_thumb_1178A3B6.png\" width=\"314\" height=\"199\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>This will bring up the Call Hierarchy window:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/09\/1031.image_thumb_70F16403.png\"><img decoding=\"async\" style=\"padding-left: 0px;padding-right: 0px;padding-top: 0px;border-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/09\/1031.image_thumb_70F16403.png\" width=\"551\" height=\"273\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Note the Calls To and Calls From areas? You can expand them to see a list under each node if applicable:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/09\/0844.image_thumb_10340AD7.png\"><img decoding=\"async\" style=\"padding-left: 0px;padding-right: 0px;padding-top: 0px;border-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/09\/0844.image_thumb_10340AD7.png\" width=\"551\" height=\"273\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>If you select an item under one of these areas then you will get a list of Call Sites that show where the calls are happening:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/09\/2502.image_thumb_4F91BE67.png\"><img decoding=\"async\" style=\"padding-left: 0px;padding-right: 0px;padding-top: 0px;border-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/09\/2502.image_thumb_4F91BE67.png\" width=\"554\" height=\"277\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>You can double-click any call site to go to the line of calling code:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/09\/2260.image_thumb_61021F3F.png\"><img decoding=\"async\" style=\"padding-left: 0px;padding-right: 0px;padding-top: 0px;border-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/09\/2260.image_thumb_61021F3F.png\" width=\"338\" height=\"177\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Instead of doing a double-click you can also right-click the call site and choose Go To Reference or you can copy the name and location of the call site as you see it listed:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/09\/4152.image_thumb_277F0F48.png\"><img decoding=\"async\" style=\"padding-left: 0px;padding-right: 0px;padding-top: 0px;border-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/09\/4152.image_thumb_277F0F48.png\" width=\"338\" height=\"154\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>You can also right-click any items in the tree-view to get a list of possible actions:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/09\/1680.image_thumb_7BCE454B.png\"><img decoding=\"async\" style=\"padding-left: 0px;padding-right: 0px;padding-top: 0px;border-width: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2011\/09\/1680.image_thumb_7BCE454B.png\" width=\"557\" height=\"276\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Here is a table of the actions you may come across and what they can do for you:<\/p>\n<table border=\"1\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td width=\"142\">\n<p><b>Context Menu Item<\/b><\/p>\n<\/td>\n<td width=\"250\">\n<p><b>Description<\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"142\">\n<p>Add As New Root<\/p>\n<\/td>\n<td width=\"250\">\n<p>Adds the selected node to the tree view pane as a new root node.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"142\">\n<p>Remove Root<\/p>\n<\/td>\n<td width=\"250\">\n<p>Removes the selected root node from the tree view pane. This option is available only from a root node.<\/p>\n<p>You can also use the Remove Root toolbar button to remove the selected root node.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"142\">\n<p>Go To Definition<\/p>\n<\/td>\n<td width=\"250\">\n<p>Runs the Go To Definition command on the selected node. This navigates to the original definition for a method call or variable definition.<\/p>\n<p>You can also press F12 to run the Go To Definition command on the selected node.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"142\">\n<p>Find All References<\/p>\n<\/td>\n<td width=\"250\">\n<p>Runs the Find All References command on the selected node. This finds all the lines of code in your project that reference a class or member.<\/p>\n<p>You can also use SHIFT+F12 to run the Find All References command on the selected node.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"142\">\n<p>Copy<\/p>\n<\/td>\n<td width=\"250\">\n<p>Copies the contents of the selected node (but not its subnodes).<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"142\">\n<p>Refresh<\/p>\n<\/td>\n<td width=\"250\">\n<p>Collapses the selected node so that re-expanding it displays current information.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>So, just as with C++ and C#, we now have the Call Hierarchy feature available for VB developers.&nbsp; This is all part of our master plan to get all languages on parity with each other so that most features are available regardless of the language used.&nbsp; Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Zain Naboulsi (Blog) &nbsp; Default: CTRL + ALT + K Menu: View | Call Hierarchy Command: View.CallHierarchy; EditorContextMenus.CodeWindow.ViewCallHierarchy Versions: Visual Studio 11 Developer Preview Languages: VB With the announcement of the Visual Studio 11 Developer Preview it&rsquo;s time to take a look at some of the features you can start using with our latest [&hellip;]<\/p>\n","protected":false},"author":260,"featured_media":8818,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[195],"tags":[],"class_list":["post-443","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-basic"],"acf":[],"blog_post_summary":"<p>By Zain Naboulsi (Blog) &nbsp; Default: CTRL + ALT + K Menu: View | Call Hierarchy Command: View.CallHierarchy; EditorContextMenus.CodeWindow.ViewCallHierarchy Versions: Visual Studio 11 Developer Preview Languages: VB With the announcement of the Visual Studio 11 Developer Preview it&rsquo;s time to take a look at some of the features you can start using with our latest [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts\/443","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/users\/260"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/comments?post=443"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts\/443\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/media\/8818"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/media?parent=443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/categories?post=443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/tags?post=443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}