Wing IDE Reference Manual
   
Wing IDE Reference Manual

Version 1.1.10


next up previous contents
Next: 6. Debugger Up: Reference Manual Wing IDE Previous: 4. Source Code Editor


Subsections


5. Source Code Browser

This chapter describes the source code browser, which is available only in Wing IDE Standard and higher. The browser acts as an index to your source code, supporting inspection of collections of Python source code from either a module-oriented or class hierarchy-oriented standpoint.

The source code browser is divided into three panels: (1) a hierarchical list view, (2) a panel of display filter options, and (3) an embedded information display area. These panels can be resized by dragging on the seperator handles between them.

5.1 Display Choices

The source code browser offers three ways in which to look at your body of source code. These are selected using the radio buttons along the top edge of the class browser window.

5.1.1 Viewing by Module

Viewing by module shows all files that you have placed into your project file within the top major panel of the source code browser window. This module list is a hierarchical expandable tree view that shows all modules, directories, and packages at the top level in alphabetical order. These major units are defined as follows:

Within each top-level package, directory, or module, the browser will display all sub-modules, sub-directories, modules, and any Python constructs. These are all labeled by generic type, including the following types:

5.1.2 Class Hierarchy

When viewing by class hierachy, the browser replaces the hierarchical tree view with a list of all top-level classes found in analyzed code, in alphabetical order.

In this display mode, the structure on disk of your packages, directories, and modules is completely hidden from view. Instead, the hierarchy of your classes is displayed, starting at base classes and working downward to derived classes.

Within each class, in addition to a list of derived classes, the methods and attributes for the class are shown.

5.1.3 All Classes

In order to find classes by name more easily, the browser can be asked to display a list that includes all found Python classes. In this case, all classes (and not just base classes) are displayed at the top-level of the hierarchical viewer.

This view is otherwise identical to the Class Hierarchy view.

5.1.4 Keyboard Navigation

Once it has the focus, the browser tree view is navigable with the keyboard, using the up/down arrow keys, page up and page down, home/end, and by using the right arrow key on a parent to expand it, or the left arrow key to collapse a parent. Holding down the shift key while pressing the right arrow will expand recursively below the expansion point. Recursive expansion is capped at five additional levels for each operation to avoid difficult-to-detect infinite recursions. Whenever a tree row is selected, pressing enter or return will open the source view for the selected symbol in a seperate window, selecting the point of definition for that symbol.


  

The source code analyzer will run in the background from the time that you open a project until all files have been analyzed. You may notice this overhead during the first 5 to 30 seconds after you have opened your project, depending on the size of your source base. Until analysis is complete, the class-oriented view within the browser window will only include those classes that have been analyzed. This list is updated as more code is analyzed.


5.2 Display Filters

A number of options are available for filtering the constructs that are presented by the source code browser. These filters are organized into two major groups: (1) construct scope and source, and (2) construct type.

5.2.1 Construct Scope and Source

The following distinctions are made. Constructs in each category can be shown or hidden as a group:

5.2.2 Construct Type

Constructs in the source code browser window can also be shown or hidden on the basis of their basic type within the language:

5.3 Sorting

In all the display views, the ordering of constructs within a module or class can be controlled by the radio buttons labeled 'Sort'.

Sorting doesn't affect the top-level of the hierarchical list view, which is alphabetic in all cases.

5.4 Embedded Information Display

The tabbed area at the bottom of the source code browser can be used to view information about items selected in the hierarchical list view above.

5.4.1 Documentation

When the Documentation tab is selected, the source code browser will display any available Python 'doc string' information for the construct selected in the hierarchical list view above.

This only contains information when a doc string is defined and only works for packages, modules, classes, functions, and methods (and never for variables or attributes).

5.4.2 Source Display

When the Source tab is selected, the source code browser will display the source at point of definition of the selected construct.

The source view is a fully functional source code editor. If you make changes here, any additional view of that source will be updated.


  

You may be asked to save changes if you navigate to another source file after making an edit, since the source files are closed if there isn't another view to them open in another window.


You can disable tracking of your selection in the hierarchical list area by unchecking the 'Follow Selection' check box that is displayed under this tab. Otherwise, the source code view will scroll to position as you change your selection above.

5.5 Navigating to Source

A number of options are available for navigating around source from the browser window:

5.6 Preferences

The following preferences are available for control source code analysis and the source browser:

You need to quit and restart Wing before any changes in these preferences take effect.


next up previous contents
Next: 6. Debugger Up: Reference Manual Wing IDE Previous: 4. Source Code Editor   Contents



2003-08-28