Reputation: 6425
How to make auto-completion list all (static) fields of a certain class that has appropriate variable-type when ctrl+space at a slot of parameter in a certain function?
I tried to ctrl+space in the below code :-
(Code as text is here.)
Question: How to make it show E_1
E_2
E_3
?
I don't mind another plugin if I really need one.
It currently works but only for enum :-
In practice, to get smart clue, I have to type more (PrototypeList::
) :-
Here is the result of the current answer (citizenmatt's):-
It is different, but still not show E_1
E_2
E_3
.
Upvotes: 2
Views: 187
Reputation: 1930
In fact, ReSharper does help you here. All of E_1
, E_2
and E_3
are in the completion list, but not on the top of it - they are assigned lower scores because they need an additional qualifier. That said, looks like there is still an issue with scoring:
E_2
and E_3
are in the list too, but they are not shown alongside E_1
. We'll investigate this (RSCPP-19501).
Upvotes: 1
Reputation: 18583
Have you tried Smart Completion? This feature will only show completion items that are valid for the current context. I think it works in C++, too.
Upvotes: 2