[Lazarus] Procedure List + CodeTools not showing nested procedures

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Jul 14 09:49:16 CEST 2016


On Wed, 13 Jul 2016 16:53:58 +0100
Graeme Geldenhuys <mailinglists at geldenhuys.co.uk> wrote:

> Hi,
> 
> See the attached screenshots showing a comparative Procedure List result
> for the same unit with the same search term. The one screenshot is of
> Maximus IDE, and the other is from Lazarus IDE.
> 
> Lazarus IDE’s Procedure List uses CodeTools to find and populate the
> ListView, but it doesn’t find any nested procedures or functions.
> 
> eg:
> 
>   TMainForm.SomeMethod;
>   var
>     x,y: integer;
> 
>     procedure LocalProc;
>     begin
>       // some code here
>     end;
> 
>   begin
>     // some code here.
>   end;
> 
> Lazarus’s Procedure List will not find the LocalProc procedure. The code
> to populate the ListView is here…
> 
>   procedure TProcedureListForm.PopulateListview;
> 
> in the <laz>/ide/procedurelist.pas unit.
> 
> Anybody with more CodeTools knowledge than I know what should be changed
> to find such nested procedures or functions?

It iterated with 'NextBrother'. I changed it to 'Next'.

I also changed it to prepend the parent proc names. For example instead
of 'LocalProc' it shows 'TMainForm.SomeMethod.LocalProc'.
If you don't like that feel free to change it.

Mattias


More information about the Lazarus mailing list