Scala plugin automatically inserts import statements for the class names you are using.

When you type a class name, the editor automatically suggests the fully qualified name and offers you to press Alt+Enter to insert an appropriate import statement.

Auto import settings can be adjusted in the Settings Dialog:

  1. Press Ctrl+Alt+S to open the Settings Dialog
  2. Expand Code Style and click Scala
  3. Select Imports tab.

Scala language gives you a number of ways to use import statements:

Scala plugin provides the support for all these language features:

Starting from compiler version 2.8, packages from parent packages are not implicitly imported, and you need to import them manually, or to use nested packages feature (in Scala 2.8). So, if you are using Scala version 2.7 or lower, then you will always get fully qualified imports after using this feature.