Auto Import
for Windows and Linux
for OS X
Ctrl+Alt+S
XML
Show import pop-up | Automatically display an import pop-up dialog box when typing the name of an unbound namespace. |
Java
Insert imports on paste | Use this drop-down list to define how IntelliJ IDEA will insert imports for pasted blocks of
code, if they contain references to classes that are not imported into the target class.
The available options are:
|
Show import pop-up | Automatically display import pop-up dialog box when typing the name of a symbol that lacks import statement. |
Optimize imports on the fly | Select this check box to have have the Optimize Imports operation automatically performed for your files. |
Add unambiguous imports on the fly | Select this check box to have IntelliJ IDEA automatically add imports that can be added without user intervention. |
Exclude from Import and Completion | In this area, create a list of packages and classes that should not be automatically included in
the import statements.
Note that you can exclude packages and classes both on the project level and on the IDE level. This can be done in the cells of the Scope column: Use: |
TypeScript
Show import pop-up | Automatically display import pop-up dialog box when typing the name of a symbol that lacks import statement. |
JSP
Add unambiguous imports on-the-fly | Select this check box to have IntelliJ IDEA automatically add imports that can be added without user intervention. |
Scala
Insert imports on page | Use this drop-down list to define how IntelliJ IDEA will insert imports for pasted blocks of code, if they contain references to
classes that are not imported into the target class. The available options are:
|
To disable import import pop-up, use Java settings | Refer to the same options in the settings for Java. |
Add unambiguous imports on the fly | Select this check box to have IntelliJ IDEA automatically add imports that can be added without user intervention. |
Optimize imports on the fly | Select this check box to have have the Optimize Imports operation automatically performed for your files. |
PHP
Enable auto-import in file scope | Select this check box to have IntelliJ IDEA automatically import PHP namespaces, add use statements, and complete short class names on the fly, when you are typing in a class or file that does not belong to any specific namespace. By default, the check box is cleared. |
Enable auto-import in namespace scope | Select this check box to have IntelliJ IDEA automatically import PHP namespaces, add use statements, and complete short class names on the fly when you are typing in a class or file that belongs to a certain namespace. The check box is selected by default. |
See Also
Getting Started:
Last modified: 13 July 2016