

When I select the one I want and hit enter, IDEA will automatically add the import statement. Notice the fully qualified names to the right.

Use code completion and select the particular class you want: You can also add classes and packages to exclude from auto importing to make a class you use heavily, that clashes with other classes of the same name, unambiguous.įor classes that are ambiguous (or is you prefer to have the "Add unambiguous imports on the fly" option turned off), just type the name of the class (just the name is OK, no need to fully qualify). If you enable the "Add unambiguous imports on the fly" in Settings > Editor > General > Auto Import, IntelliJ IDEA will add them as you type without the need for any shortcuts. Rather it has the ability to do such as you type.

IntelliJ IDEA does not have an action to add imports.
