Page 1 of 1
No Autocomplete - Include in module
Posted: Thu Feb 07, 2019 4:55 pm
by macros
Autocomplete does not trigger when an include is used in a module declaration
(Compiling works fine)
Example
Save as include.pbi
Save as main.pb
Code: Select all
Module testAutocomplete
Declare.i dummy()
EndModule
DeclareModule testAutocomplete
IncludeFile "include.pbi"
Procedure dummy()
autocom
EndProcedure
EndDeclareModule
Type the "p" after "autocom".
Expected behaviour: Autocomplete is offered if options in the preferences are set accordingly.
Observed behaviour: No autocomplete window opens.
Re: No Autocomplete - Include in module
Posted: Thu Feb 07, 2019 10:51 pm
by Justin
It is by design, the autocomplete does not parse include files, only project files. And inside a module you have to convert the include to module, include it outside the module, add it to the project and 'usemodule' for the autocomplete to trigger.
It was requested among other things to improve modules but not implemented.
Re: No Autocomplete - Include in module
Posted: Thu Feb 07, 2019 11:04 pm
by macros
The include file is parsed for autocomplete if I place it outside a DeclareModule.
For now I used the workaround of copying the relevant declarations into the Module Header till I have finished writing it.
I cannot convert the include to a module, it contains numerous constant and prototype declarations and no executed code.
Well I could do it, but it would be silly, having a empty DeclareModule body. For now my workaround works too.
This should be an easy fix as includes in normal code work, so I hope it is implemented soon.
Re: No Autocomplete - Include in module
Posted: Wed Mar 13, 2019 3:34 pm
by macros
Because this currently drives me crazy I am placing a bug bounty of 30€ on this.
Will donate it as soon as I get my hands on a PB version where this works.
Feel free to message me when one is available.
Re: No Autocomplete - Include in module
Posted: Sun Jul 07, 2019 6:10 am
by Rinzwind
This is a big oversight... autocomplete must parse include files too. Otherwise it becomes quite bothersome to split code in multiple files... We're all used to autocomplete.