intellij-idealambdafully-qualified-naming

Can IntelliJ show me the fully-qualified name of the parameter in a lambda?


In code with a lambda, such as this event listener in a Vaadin web app:

someWidget.addValueChangeListener( 
    event -> {
        …
    } 
);

…I want to know the exact type, the fully-qualified class name, of the parameter/argument event.

If I click on that word event, IntelliJ provides a light-bulb icon with a menu with a menu item offering to “Expand parameter types”. This results in event being changed to AbstractField.ComponentValueChangeEvent < Checkbox, Boolean > event:

someWidget.addValueChangeListener( 
    AbstractField.ComponentValueChangeEvent < Checkbox, Boolean > event -> {
        …
    } 
);

But I do not want to permanently change the source code. I just want some kind of tooltip or heads-up display to temporarily inform me of the full class name.

➥ Can IntelliJ be made to briefly display the fully-qualified class name of a lambda parameter?


Solution

    1. Click in the parameter (such as your event)
    2. Choose View > Quick documentation

    enter image description here

    I did have to click on the classname in the popup to get the full package though.