Recent

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

440bx

  • Hero Member
  • *****
  • Posts: 6026
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.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

Thaddy

  • Hero Member
  • *****
  • Posts: 18703
  • To Europe: simply sell USA bonds: dollar collapses
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 »
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

dsiders

  • Hero Member
  • *****
  • Posts: 1509
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.

440bx

  • Hero Member
  • *****
  • Posts: 6026
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.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018