


The Optimize Imports feature helps you remove unused imports and organize import statements in the current file or in all files in a directory at once according to the rules specified in Settings | Editor | Code Style | | Imports. The automatic insertion of import statements is disabled. If you want to completely disable auto-import, make sure that: Hover the mouse over the inspection widget in the top-right corner of the editor, click, and disable the Show Auto-Import Tooltip option. To view the list of suggestions, click this icon (or press Alt+Enter) and select Import class. When tooltips are disabled, unresolved references are underlined and marked with the red bulb icon. Select one of the Preferred import style options to define the way an import statement to be generated. Select Show import popup to automatically display an import popup when tying the name of a class that lacks an import statement. In the Python section, configure automatic imports: Press Ctrl+Alt+S to open the IDE settings and select Editor | General | Auto Import.

You can configure the IDE to automatically add import statements if there are no options to choose from. When you type a tag with an unbound namespace, the import assistant suggests creating a namespace and offers a list of appropriate choices. The same possibility applies to XML files. Using Import Assistant is the preferred way to handle imports in P圜harm because import optimizations are not supported via command line.

This feature is known as the Import Assistant. The import statement is added to the imports section, but the caret does not move from the current position, and your current editing session does not suspend. You can import a single class or an entire package, depending on your settings. When you reference a class that has not been imported, P圜harm helps you locate this file and add it to the list of imports.
