问题
In a project I am working on at the moment I have a lot of functions interleaved with blocks of #ifdef
'd code. In this particular case it would be much more readable if that code was subtly highlighted to show it as being separate from the main code. I've had a look in the theme options but couldn't see any way to do this.
I'd just remove the symbol from the project and have eclipse highlight it as being disabled, but then I can't work on it easily (limited / no hover or f3 functionality).
I've read several posts (specifically How can I get Eclipse to index code inside #ifdef .... #endif and How to make the color theme inside #ifdef more readable in Eclipse? ), but they're not quite what I'm looking for - it all seems to be about undefining the symbol then living with the fact you lose functionality.
Am I missing something, or does this feature not exist in Eclipse?
Cheers
来源:https://stackoverflow.com/questions/19039874/can-i-have-eclipse-highlight-an-ifdef-block-of-code-regardless-of-whether-the-s