Code Intelligence
Building the Code Intelligence DatabaseBefore using Komodo Code Intelligence tools, you must populate the Code Intelligence database. The Code Intelligence database contains the information regarding code constructs in source files and language installations. Information in the database is used by the Code Browser, Object Browser, and Python AutoComplete and CallTips. Komodo automatically updates the database as files are opened in Komodo. However, in order to use the Object Browser to view constructs in files that have not been opened, use the following wizards: Scan language installations and Scan custom directories. To build the database to include all desired language installations, run the Scan language installations wizard (located under Edit|Preferences|Code Intelligence). If you use custom directories to store code components (functions, modules, etc.) outside of a language installation, run the Scan custom directories wizard (located under Edit|Preferences|Code Intelligence) to configure the Code Intelligence database. See Code Intelligence Preferences for more information on building a database. Code BrowserUse the Code Browser to view the general program structure of all source files open in the editor. For each source file, the Code Browser displays a tree of symbol nodes, including: modules, classes, functions, interfaces, namespaces, imports and variables. In Python, instance attributes are also displayed. Each node in the tree hierarchy can be expanded to display further detail, acting as an index to your source code. Symbols can be sorted, filtered, and the current scope of a symbol can be located. The lower part of the Code Browser displays code descriptions (when available) on various program components. The Code Browser supports the following languages: Python, Perl, PHP, Tcl and JavaScript. Use the Code Browser to:
Context MenuRight-click in the Code Browser Pane to access code searching options. The following options are available:
SortingUse the Sort By Locating Current ScopeUse the Locate Current Scope
Using the Scope IndicatorThe Komodo status bar displays a Scope Indicator when a file written in a supported language is open in the Editor Pane. Place the cursor over the Scope Indicator to display the current scope name and type (class, function, etc). Double-click the Scope Indicator to open the Code Browser and locate the current scope within the tree hierarchy. Filtering SymbolsThe Filter Symbols
Viewing Code DescriptionsUse the Code Description pane to view additional
information on a method, class, variable, etc. Code documentation is only
displayed when the documentation itself is included within the source file.
To open the Code Description pane, click the Show/Hide Description
The Code Description pane displays the following information, when available:
Code Description limitations: There are limitations in how the Code Intelligence system matches internal documentation to declared symbols. These limitations only affect whether associated documentation is shown in the Code Browser's Description pane. Specifically, nearby comments are typically not associated with declarations (function, variable, class, etc). Further, POD documentation in Perl files is not mapped to associated modules and subs. However, the following properly display in the Code Description pane: PHP block comments immediately preceding classes and functions, and Python modules, classes, and def docstrings. Object BrowserThe Object Browser is a graphical browsing tool that searches the Code Intelligence database for specified code symbols and modules. To open the Object Browser, select Tools|Object Browser. Alternatively, invoke the Object Browser from the Code Browser context menu. When searching source files by symbol, module, or a combination of both, the Matches pane displays a tree of symbol nodes that outline the general program structure of found search criteria. Each node in the tree hierarchy can be expanded to display further detail. Select a node to view the symbol code in the Preview pane. Double-clicking a symbol opens the file in the editor at the position where that symbol is declared. SearchingSearch by symbol, module or a combination of both to locate all instances where a component is used. To search:
Alternatively, select the desired symbol or module in the Editor Pane, and then click Code|Find Symbol in Object Browser. The Object Browser is invoked (if not already launched) and displays the search results for the selected symbol or module. Use the Matches pane to sort the symbols that match the search criteria. Sorting options are:
|