[Lazarus] Maybe using CodeTools to modify source code

Mattias Gaertner nc-gaertnma at netcologne.de
Wed May 8 14:37:28 CEST 2013


> Graeme Geldenhuys <graeme at geldenhuys.co.uk> hat am 8. Mai 2013 um 13:38
> geschrieben:
>[...]
> For example:
>
> Before:
> =======
> procedure TMainForm.Button1Clicked(...)
> begin
> // do something here
> end;
>
>
> After:
> ======
> procedure TMainForm.Button1Clicked(...)
> begin
> SendMethodEnter('TMainForm.Button1Clicked');
>
> // do something here
>
> SendMethodExit('TMainForm.Button1Clicked');
> end;
>
>
> I ask Michael van Canneyt if fcl-passrc could possible be used to do
> something like this, but he said no.
>
> Is there code in Lazarus (maybe CodeTools) that could be modified to do
> this?

Codetools has functions to locate methods and insert/delete code.
I'm not aware of a simple tool that you could use as start.
Maybe I can write an example command line utility.


> My idea is that you can add trace calls, and continue coding as normal,
> fix bugs etc. Then when done, uncheck all methods, and trace calls are
> removed.
>
> With my current implementation "continue coding as normal" is rather
> hard with garbled units. :(


Mattias




More information about the Lazarus mailing list