Module Import

Using module import in IntelliJ IDEA.

Java 25 introduces module imports. When adding a module import, use Jump Down to see the contents of the module. When using Optimized Imports, IntelliJ IDEA will automatically remove any imports that are added by the module import. If you prefer to use single class imports, invoke Context Actions ⌥⏎ (macOS) / Alt+Enter (Windows/Linux) and select Replace with single class imports.

If desired, it is possible to delete unused module imports when using Optimized Imports. To configure this option, open Settings | Editor | Code Style | Java and go to the Imports tab. Select the option Delete unused module imports. When this option is selected, Optimized Imports will remove unused module imports.

Delete unused module imports


Related Resources

Presentation Assistant
Presentation Assistant
Use Presentation Assistant to display shortcuts being used.
Commit Changes
Commit Changes
Commit your changes to VCS as you go.
Disable Usages
Disable Usages
Disable the inlay hint for Usages if it's distracting you.