VS10x CodeMAP is a Visual Studio extension that displays a graphical nested representation of the current code editor window (C#, VB, C++). It helps the developer visualize type nesting, implemented interfaces, regions, member type and scope, as well as quickly navigate to their respective positions in code.
1. Code Visualization
Have a look at the small sample below. Notice the implemented interfaces. The region sub-container is prefixed with a # symbol for easier identification. Members have distinctive icons, with special overlays for constructors, event implementations, virtual members, statics and members belonging to implemented interfaces.
By default, VS10x CodeMAP will adjust its color to match the Visual Studio theme (dark, light, or custom). You can see below samples with the standard Light and Dark themes, as well as with the Solarized (dark) theme provided by the Color Theme Editor extension):
- with the Visual Studio 2013 Light theme
- with the Visual Studio 2013 Dark theme
- with the Visual Studio 2013 'Color Theme Editor' extension's Solarized (dark) theme
2. Code Collapsing and Sync
Containers can be collapsed in order to help you stay focused on items that are currently in development. What's worth to notice is that a collapse operation in CodeMAP will also collapse the corresponding part in the code editor. Moreover, it works both ways, so if you for example collapse a class in the code editor, the corresponding container in CodeMAP will get collapsed as well!
3. Persistent History
VS10x CodeMAP is also a navigational tool - if you double-click an item, its position in code will be brought into view. That is something you should expect, of course, but the CodeMAP also makes returning to the last viewed/edited members a breeze by highlighting the last 5 accessed or edited (C# only) items in various ways:
- In CodeMAP, with a distinctive background color (grey in this example, but configurable) or with a variable opacity clock image.
- In the editor, with a bluish background color for the entire member body (can be turned off).
- On the scroll map (a special area added by CodeMAP to the left of the vertical scrollbar), blue rectangles are added to represent the member position relative to the entire code file (you can align the scroll thumb with the blue marker to bring the item into view) (can be turned off).
4. Highlighting Items with Color Labels
Now, highlighting recently accessed items may be good, but what if you have items you return to over and over? Well, you can specify a special highlight by applying a color label (yellow, red, green, blue, purple, gray). As with history, labeled items are emphasized in various ways:
- In CodeMAP, with a colored background applied to the item's name.
- In the editor, with a colored background for the entire member body; the color is the same as the one used to highlight the item in CodeMAP (can be turned on or off by default from the "Customize" dialog, and can be later reset on a per-item basis by using the item popup menu).
- On the scroll map (a special area added by the CodeMAP to the left of the vertical scrollbar), red rectangles are added to represent the member position relative to the entire code file (you can align the scroll thumb with the blue marker to bring the item into view) (can be turned off).
The behavior for the above last two emphasizing techniques is customizable.
5. Named Bookmarks
In large code files, a code elements-based CodeMAP might not be enough. If you find yourself looking over and over for certain positions in code, then named bookmarks are for you. Simply start a comment with the BMK token and then type in a meaningful name (this will end up with something like //BMK Some name here in C# or'BMK Some name here in VB, with or without space after the comment start token i.e. // and ' respectively) and VS10x CodeMAP will pick that up and add the name at the top of the containing element, so that you can find it instantly.
If the filter textbox is not visible (it can be configured to auto-hide) then just hover the mouse pointer over the narrow orange bar at the top of the CodeMAP area. In order to cancel an existing filter, either clear filter textbox by clicking on the x-button on the right side or press Esc while in the filter textbox.