You can write class name without import statements, when editor shows you that this reference is unresolved, you can just press Alt+Enter, and plugin insert essential import statement automatically.
Options for this feature: File -> Settings -> Code Style -> Scala -> Imports
Scala language gives you flexible ways to use import statements. You can import not full qualified name or use import statemnt in any code block. Also you can collect few imports in one import statemet without using placeholder. All of these Scala language features we tried to reflect in plugin:
- As result of auto-import feature, shortest qualified name used for new import statement (you may choose option to use full qualified name). If any short or full qualified name can't be inserted, root qualifier added automatically.
- All import statements from one package collected in one statement automatically. If classes from one peckage exceed option, which you set, it replaced by placeholder. You can remove option to collect imports
- If class name have only one candidate for importing, it can be imported on the fly, without pressing Alt+Enter. You need to choose appropriate option.
- Also we want to provide option to insert import statemnts not only in file header. Local imports can be useful.