dot/arrow completion helpers
I'm a long time Visual Assist X user who codes has now switched to Resharper C++.
One feature difference that keeps tripping me up is the dot/arrow completion feature described here:
https://www.jetbrains.com/help/resharper/Coding_Assistance_in_CPP.html#dotCompletion
If I have code like:
struct S { int member; };
S *s;
the completion support in VAX automatically converts the “.” to “→” immediately after typing the dot in “s.”. I've gotten used to this functionality and pretty much never type “→” while editing in the IDE.
For Resharper C++, a similar conversion is performed if and only if I auto complete the member. i.e., if I type “s.m" and select “member” for auto-complete, then this expands to “s→member”. But if I type “member” without auto-complete, the text remains “s.member”.
Is there a good reason for the Resharper behavior here? The Visual Assist version of the functionality makes more sense to me.
Thanks,
Pat
Please sign in to leave a comment.
Hello Pat,
To understand that `s.` should be replaced to `s→` R++ has to parse the file and build a syntax tree. R++ works similar to a compiler, and similarly parsing a file might take some time. We don't want to block the editor and wait for parsing to finish after `.` is typed. VAX uses an imprecise parser, but it is much faster.
We'll consider what improvements we can make to this scenario. But please note that you don't necessarily need to select the member from the completion list, you can just press Tab to complete the top item from the list, and R++ will still apply the associated auto-replace.
Thanks for the feedback!
Pat,
Could you please try changing completion behavior for members to “Display and preselect” and see if that helps? We're considering making it the default to help with this issue.
Igor, thanks for the feedback. I can see where you'd be reluctant to introduce possible stuttering to the editor while waiting for the parser to handle incomplete code.
I experimented with “DIsplay and preselect” as you recommended and the experience didn't seem much different either way. I assume that this option is only expected to subtly change how auto-completion works but wouldn't change the constraint that you only convert “.” to “→” if one of the several options for auto-completion are triggered.
Thanks,
Pat
Pat Brown With “Display and preselect” the top option in auto-completion should be triggered automatically, even if you don't manually accept it.