Finding Units (Delphi)

From RAD Studio
Jump to: navigation, search

Go Up to Refactoring Procedures Index


Editing Delphi code in the Code Editor, you can use the Find Unit refactoring dialog box to locate and add units to your code.

The Find Unit dialog appears when you select an identifier in the Code Editor and select the Refactor > Find Unit menu command. The operation attempts to find the appropriate unit containing the definition of the selected identifier, and then adds the selected unit to the uses clause. You can select multiple units to add to the uses clause.

To find and add a unit to the uses clause:

  1. In the Code Editor, click an identifier whose unit you want to add to the uses clause.
  2. Choose the Refactor > Find Unit menu command. The Find Unit dialog box displays a selection list of applicable Delphi units.
  3. Select the unit that you want to add to the uses clause in the current scope. You can select as many units as you want.
  4. Choose where to insert the reference, either in the interface section or in the implementation section.
  5. Click OK. The uses clause is updated with the selected units.

See Also