Feature Showcase: Find Code Constructs


Use the Object Browser to search for code constructs (variable, namespace, method, etc.), and locate all instances of that construct in an open project.

Before you start: Open the preprocess.kpf project, located under <komodo-installdir>\samples\python_tutorials\. Be sure that line numbers are enabled in Komodo (View|View Line Numbers).

Open the preprocess.kpf project. View the project in the Projects tab.




From the Tools menu, select Object Browser.




In the Symbol text box, enter contenttype. Select Show imports. Click Go.




The Object Browser searches the Code Intelligence database and finds all symbols (including imports) matching contenttype.




The Matches pane displays a tree of symbol nodes that outline the general program structure of found search criteria.




In the Matches pane, scroll down to the getContentType node. Click the getContentType node. The Preview pane displays the file where getContentType is declared.




In the Matches pane, double-click the getContentType node. The file contenttype.py opens in the Editor Pane at the position (line 85) where getContentType is declared.