Hello,
This problem comes and goes, seems to fix itself under unknown circumstances, and seems to be getting more frequent the more code I put in this project. It happens if I add a new define or structure outside of main. For an example here is my struct definition of which I have added the last variable "tailLengthInTicks".
Notice the color (black) when I try and use it without autocomplete:
When I try and use autocomplete the new variable is not an option:
Yet, this code happily complies.
In the future sometime, this will no longer be an issue as it will resolve itself. It's just a pain until I accidentally do something and the issue goes away. This issue persists through saves and complies. Anyone have any idea whats going on?
Any thoughts are much appreciated,
Andrei
Solved! Go to Solution.
The Autocompletion function is provided by the built-in Indexer and does not use the compiler.
To rebuild the index, right-click on the project and select Index->Rebuild from the menu. This should allow your new variable to be recognised and thus allow it to be auto-completed. You do not need to rebuild the project. Note that rebuilding the project automatically runs the indexer...
Hello Felipe,
Thanks for the reply. This issue happens across saves of the projects and builds. Successful builds! One thing I'm embarrassed to not have noticed before is that this seems to happen when I add variables or #defines to files that are in a library within my workspace. Since my original post two #defines from my library are miraculously visible to autocomplete in my project. However, the example from my post remains an issue despite building without error.
Thank you,
Andrei
Hi Andrei,
I understand that you do not present any building errors. However, you need to build the project once you have added the new variable of the struct. If you do this, you will now be able to see the variable when you try to autocomplete the code.
Regards,
Felipe
The Autocompletion function is provided by the built-in Indexer and does not use the compiler.
To rebuild the index, right-click on the project and select Index->Rebuild from the menu. This should allow your new variable to be recognised and thus allow it to be auto-completed. You do not need to rebuild the project. Note that rebuilding the project automatically runs the indexer...
Hello,
Excellent, that was it! In hindsight, I wonder what I was doing that every so often this would be resolved. Regardless, I now know how to fix the issue. Thanks again.
Much appreciated,
Andrei
Hi Andrei,
What you need to do in order to see the new variable of the struct when you use autocomplete is building the project.
By doing this the IDE can know there is a new variable that needs to be shown when you execute the autocompletion command.
Have a great day,
Felipe
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------