Loi
Loi

Reputation: 96

How to automatically add the scope name to the delphi library unit?

I have a Delphi 6 source code, and I'm migrating it to Delphi 10.2.

In Delphi 6, the delphi library unit name (declared at the uses clause), there is no unit scope name like on Delphi 10.2. Therefore, I need to add unit scope name.

Example:

// In Delphi 6
uses Windows, SysUtils, Dialogs;

// In Delphi 10.2
uses Winapi.Windows, System.SysUtils, Vcl.Dialogs;

How to add unit scope name automatically for all project source files?

I tried the GExperts -> Uses Clause Manager function, it works well, but works only on one file.

GExpert -> Uses Clause Manager

I expect to add unit scope name automatically to all project source files.

Upvotes: 1

Views: 1440

Answers (1)

wesson
wesson

Reputation: 21

You can add scopes on a per-project basis under the menu Project->Options, select "Delphi Compiler" then "Unit scope names" in the right pane.

Upvotes: 1

Related Questions