Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Expand/Extract Preprocessor Macro(s)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jay.carlton
Ketchup Master

USA
65 Posts

Posted - Feb 20 2014 :  09:47:02 AM  Show Profile  Reply with Quote
Hi,

Occasionally I'll come across a preprocessor macros or symbol that I'd rather not use anymore, and it would be nice to have a refactoring option to replace either individual occurrences or all occurrences of it with the expanded source code. Presumably VA is doing the heavy lifting to parse these macros already, and this capability might also be a good troubleshooting aid if anyone runs into problems with particular macros.

A related operation would be "Extract Preprocessor Macro/Constant" that could work like Extract Method or Extract Literal, except you'd probably eventually want support for the # and ## notions.
In almost every case I'd tend to use C++ constants and typedefs rather than #defines, but for completeness I suppose there cases where one might want this (C code, for example).

Thanks,
Jay

feline
Whole Tomato Software

United Kingdom
18940 Posts

Posted - Feb 25 2014 :  11:38:57 PM  Show Profile  Reply with Quote
An interesting idea, we are considering adding a command to expand / inline a macro:

case=5160

As you say, there are some edge cases that we need to watch out for. Simple macros are safer than some of the more complex ones.

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000