Resharper : subtituate macro with multi-line code

心已入冬 提交于 2019-12-25 09:45:10

问题


Is it possible to make Resharper Substituate macro call in separate-lines mode?

Example

I have this code :-

#define TEST(T) int T=5;  \
T++;

TEST(apple);

If I click Substituate macro call and all nested calls like this :-

The line TEST(apple); will become :-

int apple=5; apple++;;

I hope there is an option to make the result be 2 separate lines :-

int apple=5; 
apple++;;

Other notes

I know that macro with \ is finally interpreted as a single line,
but it would be nice if there is an option to show it as many lines for eye-candy.
(Even it may break the macro behavior, e.g. those with __LINE__ )

It would be useful for debugging for a 10+ lines macro.


回答1:


It's not possible at the moment, but you can always select the resulting code after a macro substitution and invoke "Reformat Code" (Ctrl+Alt+Enter) to make it readable.



来源:https://stackoverflow.com/questions/44149003/resharper-subtituate-macro-with-multi-line-code

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