-
Better Navigation with Visual Studio 2010
Navigating between your open windows continues to improve with each version of Visual Studio. Ctl-Tab displays a navigable list of available windows and Ctl-F6/Ctl-Shift-F6 navigates through tabs. Ctl-Minus and Ctl-Shift-Minus now offer a slightly different behavior, which navigates only through text editor (code) tabs, skipping designers. You can access the drop-down list of open tabs with Ctl-Alt-Down, or if this fails, key map searching on “EzMdi.”
Once dropped down, you can navigate to a specific tab either with the mouse or by typing the initial characters of the name. A subtle aspect of the drop-down is that the drop-down arrow changes when there are tabs out of view. The trick of navigating by typing the name also works when navigating in Solution Explorer. Windows themselves become more flexible in Visual Studio 2010. All windows can separate from Visual Studio, which is particularly useful when you drag them to a second monitor. Tool windows remain in a dockable state at all times, making rearrangement easier. The float option remains, but its purpose is to float a single item of a set of tabbed and docked windows. Dragging the title bar moves the set. In both cases, simply dragging to a dock location redocks, and dropping on a title bar adds to that tabbed set. Tool windows can now become tabs in the main window.
Within a code window you can navigate backward and forward using the back and forward buttons or keyboard shortcuts (which differ by keyboard layout). The Navigate To dialog box is new to Visual Studio 2010 and can be accessed via the Edit menu or a shortcut key. This feature has sometimes been called “Quick Search.” It allows navigation to any symbol (such as a type or method) in your project and is cached for very fast performance.
The search is based on a Pascal-style search, which assumes every capital letter or underscore in your symbol name delimits a word you might search on. A special trick is to include a space in your search string to find two different word parts based on a partial search. For example, “bi att” finds BizServiceAttribute and BizObjectAttribute. If you type capital letters, Visual Studio 2010 will evaluate them as an abbreviation, so BSA will also retrieve BizServiceAttribute as one of the matching options. This new dialog is especially useful when you’re not quite sure of the name. It enhances the benefits of good, semantic, multipart naming.
The Visual Studio 2010 editor has a feature that at first glance may seem a little odd. Hovering the cursor over a symbol highlights all matching symbols. This illustrates how symbols are used, particularly if you temporarily zoom out. What’s cool is you can navigate between the highlighted words using Ctl-Shift up and down arrows. If you don’t like this feature, you can turn it off in the Tool/Options page for each language.
C# and C++ have a special navigation feature called Call Hierarchy. Call Hierarchy allows exploration and navigation based on the ways methods are used, jumping to call sites and to called members. While this has some similarities to the runtime callstack, it’s available at design time and shows all potential paths, not just the single, currently executing path. Call Hierarchy is an extremely valuable tool. Hopefully, Visual Basic will support Call Hierarchy in the next version.
Source of Information : Visual Studio Magazine August 2010
Subscribe to:
Post Comments (Atom)
0 comments: