Go to type declaration for collections and "var"

Answered

Hello,

Suppose I have the following Java 10+ code:

var element = getElement();   // type is Element

I can go to the type declaration of "element" by control-clicking the "var". But how to go to the declaration in statements like:

var elements = getElements();  // type is List<Element>

Here, control-clicking the "var" leads to the definition of the container, e.g. a List, and I like to go to the definition of the "element". How to do it in a quick manner?

 

Thank you in advance for the help.

0
1 comment

Hello Robert,

Currently, there is no way to go to the definition of the elements for the "var" keyword. I’ve created a feature request: IDEA-234230

Feel free to vote up the issue in order to speed up the discussion/implementation process.

0

Please sign in to leave a comment.