Searching Source Code for Usages

From RAD Studio
Jump to: navigation, search

Go Up to Locating Model Elements

The IDE enables you to track how an element or member is used in a Delphi source code project. The Search for Usages dialog box provides a flexible tool to find usages of classes, methods, variables, and overriding methods, derived classes and implemented interfaces.

The Search for Usages command is available:

Note that Search for Usages is not available for design projects.

To search source code for element usages

  1. Either select an element and click Search > Search for usages or right-click an element and choose Search for Usages on the context menu. The Search for Usages dialog box opens with the selected element shown in the Element to search for field.
  2. In the Search for Usages dialog box, check the following options, as required:
    • Usages of the Element
    • Usages of Members
    • Implementations
    • Usages of Derived Classes and Full Inheritance Depth
    • Overriding
    • Include Uses
    • Skip self
  3. Select Scope.
  4. Click Search.

The search results are displayed in the Search for Usages window as a tree view. Each node shows all usages of an element in a certain class.

Note that each new search adds its own tab to the Search for Usages window.

The Search for Usages window provides a toolbar with the buttons that enable you to expand or collapse the tree view nodes and repeat the search in the active tab with the same settings.

The context menu of the Search Result tabs provides the following commands:

Command Description


Close the active tab.

Close All

Close all tabs

Close All Other Tabs

Close all tabs except the currently active tab.

See Also