Prefer moving caret line to minimize editor scrolling Click this option to choose moving the caret. One can remove unused import statements in the entire project or in the current file only. None — no import statements will be added, you won't be asked about unresolved references. Typically, you have to stop what you are doing, scroll to the head of the file, find the unused imports, and remove them. All the affected code fragments are highlighted and change as you type.
Keeping the caret in place and scrolling the editor canvas can be helpful in course of. However, you can optimize imports in a larger scope as described below. Press Alt+Enter to accept the suggestion. The checkbox is selected by default. To disable import popup, use Java settings Refer to the same options in the settings for Java.
As you step through the lines of code, the editor canvas scrolls, while the line at caret is always in the center of the screen. You can change the settings to import entire packages instead. Ask — you will be prompted to select which classes, methods and fields you want to import. It is rather easy to forget to remove imports when you remove usages. This helps you avoid unused, excessive and duplicating imports in your project.
You can also optimize your imports and exclude classes from auto-import in the editor. Refactorings Enable in-place mode Select or clear this checkbox to enable or disable in-place refactorings for Java. You can exclude redundant entries from automatic import so that the list of suggestions contains only relevant items. This feature works only if the option is enabled. The horizontal scroll bar is not normally shown when this option is enabled. Typically, you have to stop what you are doing, scroll to the head of the file, find the unused imports, and remove them.
Add unambiguous imports on the fly This option enables automatic insertion of import statements if there's only one source of import. Typically, you have to stop what you are doing, scroll to the head of the file, find the unused imports, and remove them. When you step through the lines of code during the , the caret moves down, and the editor canvas doesn't scroll until the caret line reaches the bottom of the screen. To change the background color for import popups, press Ctrl+Alt+S and go to Editor Color Scheme General Popups and Hints Question hints. To view the list of suggestions, click this icon or press Alt+Enter and select Import class.
However, if I never want to use wildcard imports can I turn this functionality off? Limits Maximum number of contents to keep in clipboard In this text box, specify how many code blocks can be kept in clipboard. If you skip an import suggested in the Ask mode or choose the None mode, the non-imported classes will be red-highlighted and an import pop-up window will appear to help you create import statements using the Shift+Enter keyboard shortcut. Show soft wrap indicators for current line only If this checkbox is selected, the soft wrap characters will be shown in the active logical line only. If appropriate, additional refactoring options are selected in corresponding option boxes. The in-place in connection with the refactorings means specifying all or most of the information necessary for the refactoring by typing, right in the editor. When the checkbox is cleared, you can invoke import generation only be pressing Alt+Enter. Suppress with SuppressWarnings for 5.
None — no import statements will be added, you won't be asked about unresolved references. Use original line's indent for wrapped parts Select this checkbox to use custom indentation for soft wraps on resizing the editor or console. Use the checkboxes below to choose when import generation will be invoked. Select or clear this option as required. Note that you can override this option if you select Copy as Plain Text from the context menu in your editor and vice versa, using the Copy as Rich Text option from the context menu overrides the unselected checkbox in the editor settings.
The reason is that each tab character shows in the editor as a set of 'virtual' space characters. If checkbox is not selected, the symbol being renamed is not selected. It makes it easier for people to figure out exactly where classes you're using come from. Is there a way to tell IntelliJ never to use wildcard imports? Enable Drag'n'Drop functionality in editor If this checkbox is selected, you can code fragments in the editor. Specify the indent value in the Additional shift text field on the right. You can also select whether you want to exclude items from the current project or from all projects.