| Store | Cart

ActiveState Docs

Komodo 5.0 Documentation


Code Intelligence

Komodo's Code Intelligence system is a set of tools that makes browsing, searching, and programming complex code easier and more accessible. Use the Code Browser to view the hierarchical code structure within a program file or project. The Code Intelligence system includes support for Python, Perl, Tcl, PHP, Ruby, and JavaScript. Code Intelligence is comprised of the following tools:

  • Code Browser: A sidebar in the left pane that displays a hierarchical view of all code constructs (for example, variables, methods, imports) in all open files. In the Code Browser, symbols can be sorted and filtered; the current scope of a symbol can be located. To access the Code Browser, click View|Tabs & Sidebars|Code Browser.

  • AutoComplete and CallTips: The Code Intelligence system is used to drive autocomplete and calltip functionality for Perl, Python, Tcl, Ruby, JavaScript, XSLT, CSS, and XML (including HTML and DTD).
The Python Tutorial demonstrates the Code Browser and other Code Intelligence tools. See the Python Tutorial to explore a Python program in Komodo.

Code Browser Komodo IDE only

Use the Code Browser to view the general program structure of all source files open in the Editor Pane. 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 Code Browser supports the following languages: Python, Perl, PHP, Ruby, Tcl, and JavaScript.

Use the Code Browser to:

  • View program structure.
  • Browse from a listed namespace, command, or variable definition and jump to the actual source code where it is declared.
  • Locate all variables used within a file.
  • View a symbol definition signature.
  • Find all defined symbols matching a pattern.

Context Menu

Right-click in the Code Browser Pane to access code searching options. The following options are available:

  • Go to Definition: Jumps to the definition of the associated symbol in the editor. Alternatively, double-click the symbol name in the Code Browser tree. Objects defined within the file, in user-defined modules, and in the site library are accessible in this way; objects defined in a language's standard library are not. (See also Editor: Navigating within Files)
  • Copy: Copies the symbol name to the clipboard.
  • Sort By File Order: Sorts all symbols in the tree by file order.
  • Sort Alphabetically: Sorts all symbols in the tree alphabetically.


Use the Sort By button to organize all Code Browser symbols by file order or alphabetically. To sort all symbols by file order, click Sort By, and then select Sort By File Order from the drop-down list. To sort all symbols alphabetically, click Sort By, and then select Sort Alphabetically from the drop-down list. Alternatively, use the context menu (right-click in the Code Browser) to access sorting options.

Locating Current Scope

Use the Locate Current Scope button to find the scope of a symbol (for example, namespace, command, or variable definition). To view the scope of a symbol, place the cursor on the desired symbol in the source code and then click the Locate Current Scope button. The Code Browser tree opens to the associated scope. Alternatively, click Code|Locate Current Scope in Code Browser to open the Code Browser tree to the associated scope.

Filtering Symbols

The Filter Symbols text box limits the Code Browser display to matching symbols. To filter symbols in the Code Browser, enter the desired symbol name, or partial name, in the text box. The filter supports regular expressions (Python syntax). If there is an error in the pattern, the text is highlighted and a tooltip describes the error.

Press 'Tab' to switch focus between the Filter text box and the Code Browser tree. Press 'Esc' to clear the current filter pattern.

Object Browser Komodo IDE only

The Object Browser is currently being re-implemented with Komodo's new Code Intelligence backend and is not available in this release.