[Lazarus] how to check if the same identifier appear in more than 1 unit of the project?

Michael Van Canneyt michael at freepascal.org
Wed Apr 20 10:43:09 CEST 2016



On Wed, 20 Apr 2016, Graeme Geldenhuys wrote:

> On 2016-04-20 08:32, Dennis wrote:
>> Is there any tool to find out ?
>
> Multiple options:
>
> * Do a "Find in Files" search.
>
> * In Lazarus, place the edit cursor inside the identifier. Right Click
>  and select "Find declaration of <xyz>". Do that in a few units where
>  the identifier is used, and see if the same declaration is shown.

IMHO you can better use the code browser for this.

Set scope to Project,  'with required packages' scans recursively.

after Show Identifiers type the identifier.

It just misses 'whole words only'...

I find it easier than the find in files:
Till project groups finally work and find in files is extended to use
'project group' scope, the code browser seems the best tool.

Michael.




More information about the Lazarus mailing list