I'm currently using STS 4.6.1.RELEASE and JDK 11.0.7 with Content Assist enabled.

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.

I cannot reference the same attribute in this case:

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();.

Is it unsupported by STS? Can I configure it do support this feature?

  • Please add links to the features that you believe should be available in this specific tool. This will give context to your question. – dmcgill50 Apr 24 at 14:58
  • I'll try to find it in the official docs. It's already existing, though, for types explicitly defined. – rsb2097 Apr 24 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.