Search code examples
delphireferenceautocompletedelphi-2010delphi-units

Any tool to suggest unit reference automatically for Delphi 2010?


MS Visual Studio has a great feature: it automatically suggests the units to add in using clause when you typing the code with refrences to absent standard classes.

Is there any 3-rd party tool to implement similar feature for Delphi?

I'm tired to add all those SysUtils, Windows, Messages etc in each new unit.


Solution

  • If the unit which contains the reference is not yet in the uses list, this is how I save many manual steps:

    • right-click on the underlined (error-insighted) text
    • choose “Refactoring | Find Unit…“.

    A dialog will present the available unit which contains the unknown type or symbol, and a mouse click adds the selected unit to the uses list of the current file.