Recent

Author Topic: [Solved] Find declaration option  (Read 886 times)

Graham1

  • Jr. Member
  • **
  • Posts: 57
[Solved] Find declaration option
« on: February 06, 2023, 03:37:57 am »
I have a unit with a procedure:

Code: Pascal  [Select][+][-]
  1. unit myUnit;
  2.  
  3. uses  <something>;
  4.  
  5. interface
  6.  
  7. // A
  8. procedure myProc;
  9.  
  10. implementation
  11.  
  12. // B
  13. procedure myProc;
  14. begin
  15.    // some code
  16. end;
  17.  
  18. end.

In my main program I use this unit and make a call to myProc. Now if I highlight that call in the source I can right-click and select 'Find declaration of myProc'.

But that takes me to point A in the unit. Is there an option that will take me to point B instead? The Codetools popup already shows me what A says so most of the time I really want to look at the code in the procedure.

Thanks.

« Last Edit: February 06, 2023, 04:57:03 am by Graham1 »
Windows 10/11 Home 64-bit (and Linux because I have to)
Lazarus 2.0.12 / FPC 3.2.0 (because libQt5pas 1.2.6)
Linux Mint 20 (because GLIBC_2.31)

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: Find declaration option
« Reply #1 on: February 06, 2023, 03:44:43 am »
menu: Tools -> Options ... -> treeitems Codetools -> General -> checkbox "Jump directly to method body"
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Graham1

  • Jr. Member
  • **
  • Posts: 57
Re: Find declaration option
« Reply #2 on: February 06, 2023, 04:56:44 am »
Exactly what I wanted! Thank you.
Windows 10/11 Home 64-bit (and Linux because I have to)
Lazarus 2.0.12 / FPC 3.2.0 (because libQt5pas 1.2.6)
Linux Mint 20 (because GLIBC_2.31)

 

TinyPortal © 2005-2018