IntelliJ IDEA 2020.1 Help

Java

Parameter hints

Parameters with names that are contained in the method name

Controls whether parameter hints should appear for methods that take a single argument when the expected argument is clear from the method name, for example: void setName(String name) or void addMessage(StringBuilder message).

Non-literals in case of multiple parameters with the same type

Controls whether parameter hints should appear for methods that take more than one parameter of the same type, for example, void printSomething(String s1, String s2) when you pass non-literal values to them, for example: a.printSomething(args[0], args[1]).

Builder-like methods

Toggles the visibility of parameter hints for methods that return an instance of the enclosing class, for example:

class DuckPond{ private DuckPond(){}; public DuckPond newPond(){ return new DuckPond(); } }

Methods with same-named numbered parameters

Toggles the visibility of parameter hints for methods that take multiple parameters, whose names consist of one letter followed by a number, for example:
public void print(String s1, String s2, String s3)

Enum constants

Toggles the visibility of parameter hints at enum constant declarations, for example:

enum Language{ ENGLISH("Hi"), SPANISH("Hola"), FINNISH("Hei"); String greeting; Language(String greeting){ this.greeting = greeting; } }

'New' expressions

Toggles the visibility of parameter hints for parametrized constructor calls, for example: new Person("Taka", 29)

Complex expressions: binary, functional, array access and other

Controls whether parameter hints should appear where a complex expression is used as a parameter, for example, a Java 13 switch statement:

a.printSomething(switch (i) { case 1: yield "Apples"; case 2: yield "Bananas"; default: yield "Apples and bananas"; });

Black list

Allows you to specify classes for which inlay hints will not be displayed.

Method chains

Method chain hints provide you with the information on the return type of each method in a method chain. The Minimal unique type count to show hints option controls the minimum number of calls required for method chain hints to appear. Hints are only displayed when methods are called at separate lines.

String id = accountManager .getAccounts() // returns ArrayList .get(i) // returns Account .getId() // returns UUID .toString(); // returns String

Only unique return types count. This means that hints will not be displayed for straightforward chains such as:

new StringBuilder("J") .append("a") .append("v") .append("a")

Annotations

Inferred annotations

Toggles the visibility of inlay hints for inferred annotations.

External annotations

Toggles the visibility of inlay hints for external annotations.

Code Vision

Usages

Toggles the visibility of usage counters near class, interface, field, and method declarations.

Inheritors

Toggles the visibility of implementation counters near class, interface, and method declarations.

Last modified: 15 April 2020