自动补全参数:列出静态字段,而无需键入ClassName :: [英] autocompletion of parameter : list static fields without typing a ClassName::

查看:75
本文介绍了自动补全参数:列出静态字段,而无需键入ClassName ::的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在某个函数的参数插槽中 ctrl + space 时,使自动完成列表列出具有适当变量类型的某个类的所有(静态)字段?

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?

我尝试在下面的代码中 ctrl + space :-

I tried to ctrl+space in the below code :-

(作为文本的代码是此处.)

问题:如何显示E_1 E_2 E_3?
如果我真的需要一个插件,我不介意.

Question: How to make it show E_1 E_2 E_3?
I don't mind another plugin if I really need one.

当前有效,但仅适用于枚举:-

在实践中,要获得聪明的提示,我必须输入更多(PrototypeList::):-

In practice, to get smart clue, I have to type more (PrototypeList::) :-

以下是当前答案的结果( citizenmatt ):-

Here is the result of the current answer (citizenmatt's):-

它是不同的,但仍不显示E_1 E_2 E_3.

It is different, but still not show E_1 E_2 E_3.

推荐答案

实际上,ReSharper确实在这里为您提供帮助.所有E_1E_2E_3都在完成列表中,但不在其顶部-它们被分配较低的分数,因为它们需要附加的限定符.也就是说,评分仍然存在问题:

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_2E_3也在列表中,但它们未与E_1一起显示.我们将对此进行调查( RSCPP-19501 ).

E_2 and E_3 are in the list too, but they are not shown alongside E_1. We'll investigate this (RSCPP-19501).

这篇关于自动补全参数:列出静态字段,而无需键入ClassName ::的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆