Recent

Author Topic: How to automatically open all include files ?  (Read 1614 times)

440bx

  • Hero Member
  • *****
  • Posts: 4898
How to automatically open all include files ?
« on: May 19, 2024, 06:52:36 am »
Hello,

When a program has include files scattered in the code, it would be nice to have the option of telling the IDE to automatically open them all.  That way there would be a visible tab for each file which would give an idea of how many there are (particularly when viewed in the "Source Editor Manager" window.

That's my question: is there a way to tell the IDE to automatically open all include files in the project ?

Thank you for your help.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 16387
  • Censorship about opinions does not belong here.
Re: How to automatically open all include files ?
« Reply #1 on: May 19, 2024, 07:02:10 am »
Not automatically open them, but things improve when all includes are added to the project explicitly.
If they are part of the project sources, the IDE may jump into the include...
Not tested.
« Last Edit: May 19, 2024, 07:08:35 am by Thaddy »
There is nothing wrong with being blunt. At a minimum it is also honest.

dsiders

  • Hero Member
  • *****
  • Posts: 1324
Re: How to automatically open all include files ?
« Reply #2 on: May 19, 2024, 10:00:18 am »
Hello,

When a program has include files scattered in the code, it would be nice to have the option of telling the IDE to automatically open them all.  That way there would be a visible tab for each file which would give an idea of how many there are (particularly when viewed in the "Source Editor Manager" window.

That's my question: is there a way to tell the IDE to automatically open all include files in the project ?

Thank you for your help.

Interesting question. It's not what you asked for, and it  also doesn't appear to work at the moment, but the IDE has an option:

Search > Goto Include Directive.

Not sure why it doesn't do anything. Maybe I'll get some time to poke at it tomorrow.
Preview the next Lazarus documentation release at: https://dsiders.gitlab.io/lazdocsnext

440bx

  • Hero Member
  • *****
  • Posts: 4898
Re: How to automatically open all include files ?
« Reply #3 on: May 19, 2024, 10:07:20 am »
Interesting question. It's not what you asked for, and it  also doesn't appear to work at the moment, but the IDE has an option:

Search > Goto Include Directive.

Not sure why it doesn't do anything. Maybe I'll get some time to poke at it tomorrow.
I just tried that "Search -> Goto Include Directive" command you suggested and it is afflicted by the codetools bug related to a variable named "Static" appearing after an enumeration.  IOW, I got the same error from codetools as when attempting to jump to an identifier's definition.

This is kind of stuff that reveals how much codetools is involved in implementing some IDE functions.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018