Can I have Eclipse highlight an #ifdef block of code regardless of whether the symbol is defined?

别来无恙 提交于 2020-01-04 06:04:23

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!