The Class View window is similar in design and function to the Solution Explorer window. It, too, provides a hierarchical view of project elements. However, the view here is not concerned with the physical files that constitute a solution or project; rather, this window provides a view of the various namespaces, types, interfaces, and enums within a project. The Class View window is composed of four major visual components: a toolbar, a search bar, a tree view of types (called the objects pane), and a members pane. Figure 5.3. The Class View window.
ToolbarThe Class View window's toolbar provides easy access to command buttons for adding virtual folders, moving forward and back through the objects pane items, and controlling which objects are displayed. Table 5.4 describes the various Class View toolbar buttons.
The Search BarThe search bar is a drop-down text box that provides a quick and easy way to filter the objects shown in the objects pane. When a search term (such as type name or namespace name) is entered, the Class View window will clear the objects pane and then repopulate it with only those objects that match the search term. Figure 5.4 shows the results of a search for FeedAdapter. Figure 5.4. Filtering the objects pane.
To restore the objects pane and remove the filter, click on the Clear Search button to the right of the Search button. Recent search terms are saved for reuse in the drop-down list. Objects PaneThe objects pane encloses a tree of objects grouped, at the highest level, by project. Each object is identified by an icon and by its name. Expanding a project node within the tree will reveal the various types contained within that project. Further parent-child relationships are also visible, such as the namespace-to-class relationship and the type-to-parent-type relationship. Table 5.5 shows the icons used in the object pane.
Certain signal images are also overlaid on top of these icons to visually represent scope and access information for each object. These access type signal icons are shown in Table 5.6.
The depth of the various levels shown for each object will be dictated by the view settings in place at the time. For instance, turning on the Show Base Types option will append an additional base type level to the tree for each type. The object pane's principal duty is to allow quick and easy navigation back and forth through the object tree for each project. It exposes, in other words, an object-oriented view of each project. Right-clicking within the objects pane will display the shortcut menu. The menu is essentially identical to the shortcut menu exposed by the Solution Explorer, with the exception of various Sort and Group by selections. The Sort options available here are
Members PaneThe members pane reacts to the selection(s) made in the objects pane by displaying all of the membersproperties, events, constants, variables, enumsdefined on the selected type. Each member has a distinctive icon to immediately convey information such as scope and type; even member signatures show up here (note that the same signal icons used by the objects pane, and documented in Table 5.7, are used here as well).
The members pane is ideal for quickly visualizing type behavior and attributes: Just select the class/type in the objects pane and browse its members in the members pane. Note Many developers will find that the bulk of their development tasks are more easily envisioned and acted on here within the Class View window as opposed to the Solution Explorer window. The available actions among the two are virtually identical, and the Class View window provides a much more code-focused perspective of your projects. Developers can spelunk through inheritance trees and see, at a glance, the various members implemented on each defined type within their project. The con to using the Class View is that source code control information is not visually surfaced here. The members pane also exposes a context menu that has invaluable tools for browsing and editing code. For one, you can directly apply the Rename refactoring to a selected member. Other capabilities exposed here include the ability to immediately view the definition code for a member, to find every code location where the selected member is referenced, and to launch the Object Browser with the primary node for the member already selected for you. The ability to alter the filter and display settings is also presented here. Figure 5.5 illustrates all of the available commands on this menu. Figure 5.5. The members pane context menu.
|