IntelliJ 2017 has a nice feature where it labels the arguments/parameters being passed using the variable’s name from the method declaration. But IntelliJ seems to do this only for textual (String
) arguments.
In this example, notice how the first there arguments go unlabeled ( a pair Instant
objects and a UUID
), while the 4th & 5th arguments of String literals are labeled summary:
& detail:
.
➠ Why only some arguments rather than all arguments? The logic escapes me.
➠ Is there someway to make IntelliJ display labels for all the arguments?
Parameter hints are configurable in Settings
(Preferences
on Mac) | Editor
| General
| Appearance
, Show parameter name hints -> Configure:
They are intentionally disabled for some basic methods where they will only pollute the editor (like getters, setters, equals, printing and logging):
For your specific case enable the Show for non-literals in case of multiple params with the same type option.
Go to:
Editor > General > Appearance > Show parameter name hints
Click Configure
then tick:
Show for non-literals in case of multiple params with the same type
And you'll see hints for the repeated usages of UUID
and Instance
, here's an example screenshot:
In answer to your specific questions:
Why only some arguments rather than all arguments? The logic escapes me.
IntelliJ is suppressing hints for the for the repeated usages of UUID
and Instance
.
Is there someway to make IntelliJ display labels for all the arguments?
You can control how IntelliJ hints by using Editor > General > Appearance > Show parameter name hints > Configure
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With