Code Maps improvements in Visual Studio Enterprise 2015 RTM: Code maps now have simpler menus, more intuitive icons, and independent group layout
Amongst the improvements we’ve made to Code Maps in Visual Studio Enterprise 2015 RTM are:
- Several of the icons that indicate the node type have been changed to be consistent with Solution Explorer, and with other tools and environments.
- The shortcut (context) menus have been reorganized to make them cleaner and much easier to use.
- You can now change the layout of the contents for a selection of groups as one operation.
The icons are now consistent with Solution Explorer and other tools
The following screenshot shows a code map in Visual Studio 2015 RC. You can see that, although the nodes are decorated with icons, these are of varying sizes and some are not even similar to the commonly accepted icon for projects and files as used in Solution Explorer and elsewhere.
Visual Studio 2015 Release Candidate node icons
In particular, the icon for a Web Project item, whilst easily recognizable, is larger than and different from that used in Solution Explorer. In addition, the icon for a Test Project uses the “template” icon, and the Modeling Project item uses another non-standard icon.
In Visual Studio 2015 RTM, we have changed the icons to make code maps both more intuitive, and to improve the appearance of the interface as a whole. The following screenshot shows the same project as before, but this time you can see that the Web Project and the Modeling Project icons are the same as used in Solution Explorer. In addition, we used the same “flask” symbol as in Solution Explorer as the basis for the Test Project icon.
Visual Studio 2015 Final Release node icons
We also updated some of the other icons, such as those for Windows Store, Phone, WPF, and VSIX projects and Portable Libraries, to give a cleaner appearance – although we kept others (such as Class) the same as before. You can, of course, examine all the icons in the Legend window.
The shortcut (context) menus are now much simpler
The second improvement is one that I’m personally excited about – we’ve changed the structure of commands on many of the code maps shortcut, or context, menus.
In Visual Studio 2013, and in previous releases of Visual Studio 2015, the top-level shortcut menu was overloaded with the editing commands. And there was no obvious location or structure for other commands, other than an attempt to put the ones you might use most nearer the top. For example, the following screenshot shows the Visual Studio 2013 shortcut menu for a Class node.
Visual Studio 2013 shortcut menus
However, after much review by users, it turns out that the commands people care about most – and that provide the most value – are the “create a new code map from the selection” and “show the contribution of links” commands. These were not as visible as we would have liked.
In Visual Studio 2015 preview versions, we rearranged some of the other commands related to grouping. However, interesting commands such as actions on the current selection (for example, “create a group from the selection”) were not discoverable. Commands that retrieve the complete inheritance hierarchy were hidden in submenus of the Advanced submenu, along with other “progressive reveal” commands such as Show All Base Types.
In addition, the map editing commands – which are not our primary scenario – were still at the top of the menus, whereas our primary scenarios are to understand the architecture of a solution and the impact of a change. And there were other issues raised during our review, but it’s probably wise to stop here.
In Visual Studio 2015 RTM, the context menus are now lean and clean. For example, if nothing is selected you get the following shortcut menu. Notice how everything is neatly categorized under Select, Edit, or Group.
Visual Studio 2015 Final Release shortcut menus
When you open the shortcut menu for selected nodes in the map, the shortcut menu contains additional useful commands related to that selection. For example, when you select a link and open the shortcut menu, you get two commands to help you understand the links between code elements.
When you select an assembly node, you get the useful New Graph from Selection command at the top, followed by the top-level categories Select, Edit, and Group. You also get an additional category, Layout, which you can use to manage how the contents of the group appear. More about that later.
The useful commands to fetch related code elements and show them on the map are also on this top-level menu. For example, when you select a class – in addition to creating a new map and opening the code source file in the editor – there are all of the commands to help you investigate the relationships between this class and other parts of your solution. Yes, there are nine of them, but they allow you to show all the related code elements in many different ways.
You can to choose the layout of a selection of groups
Often you need to change the layout of the contents of a group, such as the classes in a namespace or the methods in a class. However, you may want to specify a different layout for different groups – depending on the contents of the group, different layouts make it easier to see what’s going on.
In Visual Studio 2013, you could change the layout of the contents of all groups using the Layout menu button on the map toolbar, or change the layout of an individual group by using the hovering (pop-up) toolbar that appears when you select a group. But to have different layouts in different groups, you had to set it for each one individually.
Visual Studio 2013 layout options on the pop-up menu
Now, in Visual Studio 2015, you can also select one or more groups (hold CTRL to multi-select as usual) and use the options on the new Layout menu to specify the layout for just the selected groups. For example, suppose I’m interested in seeing the list of members of all controller classes, without needing to see the calls between their methods. I can simply select the controller classes and specify List View on the new Layout menu.
Visual Studio 2015 Layout options on the shortcut menu
Now I see what I wanted – a useful list-based view of the controller class members.
With these changes and improvements, you should find code maps are not only more useful, but also a lot easier to create and use. For more information, see Visualize code on the MSDN website.
Thanks for your feedback, which really has been helping us drive the product!