简体   繁体   中英

Resharper : subtituate macro with multi-line code

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, eg those with __LINE__ )

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

目前尚不可能,但是您始终可以在宏替换后选择结果代码,然后调用“重新格式化代码”( Ctrl+Alt+Enter )以使其可读。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM