Bug 316374 - enhancement request: quick fix to add symbol
Summary: enhancement request: quick fix to add symbol
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 6.0.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-09 16:12 EDT by Mike Kucera CLA
Modified: 2020-09-04 15:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kucera CLA 2010-06-09 16:12:33 EDT
Often while I'm coding I run across inactive code blocks that I would like to make active. To do that I have to go to the project properties, navigate to paths and symbols and add the symbol manually. Kind of inconvenient.

I'm thinking this could be done as a quick fix. Just put the cursor on the #ifdef, hit ctrl-1, and pick "enable symbol" or something like that.

That would need to trigger the indexer. The file where the quick fix is invoked should be the first to be reindexed so that it appears as though the quick fix has an immediate effect.
Comment 1 Nathan Ridge CLA 2017-01-05 22:55:07 EST
Interesting request.

What should happen if the block was '#ifndef SYMBOL', and it was inactive because SYMBOL was already defined?

Should it also work for '#if defined(SYMBOL)'? For '#if defined(FOO) && defined(BAR)'? For '#if GNU_VERSION >= 4'?