如果使用“ var”实例化了STS(Spring工具套件),它们不会自动完成方法参数

我当前正在使用启用了“内容辅助”的STS 4.6.1.RELEASE和JDK 11.0.7。

I can reference attributes with var, e.g. in the code var customer = new Customer(); I can begin typing "cus..." and press Ctrl+Enter, it will show me "customer" as an option.

在这种情况下,我无法引用相同的属性:

var customer = new Customer();
var customerGroup = new CustomerGroup();

customer.setGroup(<autocomplete here does not work>);

It won't show me customerGroup as an option. Only when I use the class instead of var: CustomerGroup customerGroup = new CustomerGroup();.

STS不支持吗?我可以配置它是否支持此功能?

评论