* * *

Author Topic: [Solved] Find the callings of a procedure.  (Read 791 times)

Edson

  • Hero Member
  • *****
  • Posts: 764
[Solved] Find the callings of a procedure.
« on: April 08, 2017, 11:48:36 pm »
Is there a way to see (using Lazarus) in which points of the code a procedure or method is called ?

I, frequently, want to see the effects of modify a method, and I don't want to search in all the files of the project.


Thanks.
« Last Edit: April 09, 2017, 06:12:39 am by Edson »
Lazarus 1.6 - FPC 3.0.0 - x86_64-win64 on  Windows 7

howardpc

  • Hero Member
  • *****
  • Posts: 2251
Re: Find the callings of a procedure.
« Reply #1 on: April 09, 2017, 12:47:01 am »
I don't want to search in all the files of the project.

Why not?
If you click on the method name and then Search->Find in Files... and click the radiobutton "search all files in project" you get an instant list which includes all the places at which that method is called. The list is persistent, and you can jump to any of the listed locations with a single click.

Edson

  • Hero Member
  • *****
  • Posts: 764
Re: Find the callings of a procedure.
« Reply #2 on: April 09, 2017, 01:55:41 am »
If you click on the method name and then Search->Find in Files... and click the radiobutton "search all files in project" you get an instant list which includes all the places at which that method is called. The list is persistent, and you can jump to any of the listed locations with a single click.

Yes. But it's like using Find in Files ... It just compares strings, it will find any string including comments, or methods of another object with the same name.

I want to find just the points of the code where a specific method of a specific class is called.
Lazarus 1.6 - FPC 3.0.0 - x86_64-win64 on  Windows 7

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4323
    • wiki
Re: Find the callings of a procedure.
« Reply #3 on: April 09, 2017, 04:37:59 am »
Use "Find identifier references" (you can find it in the context menu).
http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools#Find_Identifier_References

Edson

  • Hero Member
  • *****
  • Posts: 764
Re: Find the callings of a procedure.
« Reply #4 on: April 09, 2017, 04:55:42 am »
Thanks Martin, it works OK, but I see, it still marks the references in comments.

EDIT: I see there is an option to deactivate find in comments.  :D.

« Last Edit: April 09, 2017, 06:12:19 am by Edson »
Lazarus 1.6 - FPC 3.0.0 - x86_64-win64 on  Windows 7

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus