Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
The QtCreator editor is currently capable of:
1. using build environment to detemine which #if statements will pass the preprocessor.
2. collapsing arbitrary sets of code blocks, to include for-loops, while-loops, #if-blocks, #ifdef-blocks, and so on.
This suggestion is to introduce an optional new mode to the editor, in which all preprocessor blocks that will not be compiled will automatically be collapsed.
Seems like there would be some awkwardness when a user has that mode enabled, while typing in new conditional blocks. However, the parser seems to keep track of which #if has not yet been closed with a #endif. I would think that while the user is editing any part of the conditional block (and maybe, for a while after it's fully implemented) that it would remain un-collapsed.
The mode could possibly be called "Auto collapse unreachable code".
Attachments
Issue Links
- depends on
-
QTCREATORBUG-2 Do code folding for preprocessor directives
- Open