Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

In the Settings dialog, select

span
classshortcut
Project Settings
span
classshortcut
Code
span
classshortcut
Scala
Imports
span
classshortcut
Wiki Markup
{span:class=shortcut}Project Settings{span}
Wiki Markup
{span:class=shortcut}Code{span}
Wiki Markup
{span:class=shortcut}Scala{span}
Wiki Markup
{span:class=shortcut}Imports{span}
.

  • Class count to use import with '_' - in this text field, specify the number of classes to be imported from a single package until all statements importing a single class are substituted with a statement importing an entire package.

...

In the Settings dialog, select

span
classshortcut
IDE Settings
span
classshortcut
Editor
Auto Import
span
classshortcut
Wiki Markup
{span:class=shortcut}IDE Settings{span}
Wiki Markup
{span:class=shortcut}Editor{span}
Wiki Markup
{span:class=shortcut}Auto Import{span}
.

 You can select the following options:

...

  • Optimize imports on the fly - select this check box to have the Optimize Imports operation automatically performed for your files. If you clear this check box, you can manually optimize your imports selecting
    span
    classshortcut
    Code
     →Optimize Imports
    span
    classshortcut
    Wiki Markup
    {span:class=shortcut}Code{span}
     →
    Wiki Markup
    {span:class=shortcut}Optimize Imports{span}
    .
  • Add unambiguous imports on the fly - select this check box to have IntelliJ IDEA automatically add imports that can be added without user intervention.

...

You can optimize imports selecting

span
classshortcut
Code
 →Optimize Imports
span
classshortcut
Wiki Markup
{span:class=shortcut}Code{span}
 →
Wiki Markup
{span:class=shortcut}Optimize Imports{span}
command.

In this dialog box, specify from where you want IntelliJ IDEA to remove unused import statements, in order to optimize the import procedure.

...

In the Class to Import suggestion list, click

span
classshortcut
Alt
+ Enter
span
classshortcut
Wiki Markup
{span:class=shortcut}Alt{span}
+
Wiki Markup
{span:class=shortcut}Enter{span}
, and click the right arrow to reveal the nested list of intention actions. IntelliJ IDEA suggests you to exclude specific class or the whole containing package.

...