Using multiple build configurations
I had the same problem (I think) that you’re describing and found a solution.
This is an Eclipse configuration issue and not one with the AC6 extensions.
I was able to resolve it by changing one of the indexer options, which you can get to by navigating to:
Window -> Preferences -> C/C++ -> Indexer
Look for the option “Use active build configuration” (it’s towards the bottom of the dialog) and make sure it’s selected.
Project-specific indexer settings are disabled by default when a new project is created, so while it would be possible to get the indexer to properly highlight/de-highlight #if’ed code sections based on build configuration selected without changing the global setting (which is what you’re doing if you change the setting I mentioned above) it’s more work, and something you need to remember to change every time you start a new project.
Just in case you want to use project-specific indexer settings, you can change these by navigating to:
Project -> Properties -> C/C++ General -> Indexer
Then tick on the “Use project specific settings” checkbox and select the “Use active build configuration” radio button.
The Eclipse syntax highlighting system and symbol indexer are smart enough to recognize preprocessor symbol definitions that are made based on build configuration, but it does not handle this correctly by default. It took me some time to figure out how to get this to work