In many sources I have ‘inactive’ code: source code which is disabled by some macros or defines. Eclipse is great to ‘gray’ out the inactive parts using its Indexer, but they still need screen real estate:
To hide these sections of ‘inactive’ code, I can use the built-in source folding feature. The setting is under Window > Preferences > C/C++ > Editor > Folding:
With initially folding ‘Inactive Preprocessor Branches’ the inactive parts are now folded by default. They still need one line, and I can unfold the sections if needed:
Happy Hiding π
great ! Thanks
LikeLike
Thank you for the advice.
LikeLike
You are welcome π
LikeLike
Sometimes it’s these little things that make work so much more productive and fun. I also love many of the sophisticated editing key shortcuts Eclipse offers. Very handy!
Thanks for sharing!
LikeLike
How many time did I spend for scrolling up and down my code without finding what I search ! Now is quick and easy. Great feature. Thank you, you make my day Eric ! π
LikeLike
Hi Max,
yes, I feel like you on that topic π
LikeLike