IntelliJ IDEA - Disable wildcard imports to always import single classes


IntelliJ IDEA Documentation:

In the Settings/Preferences dialog ⌘,, select Editor | Code Style | Java | Imports.

  • Make sure that the Use single class import option is enabled.
  • In the Class count to use import with '' and Names count to use static import with '' fields, specify values that definitely exceed the number of classes in a package and the number of names in a class (for example, 999 ).

It is possible to change a wildcard import:

To replace an import statement with single class imports in a file without changing the settings, place the caret at the import statement, press ⌥⏎ (or use the intention action the Intention action icon icon), and select Replace with single class imports.

Go to the linked site

Tags: #gradle #spock #geb #grails #groovy #java #wordpress #woocommerce #micronaut
Jul 2021, 20.


My next events:
🗓 Jul 20 09:00 Workshop Security in the Micronaut Framework
🗓 Sep 20 09:00 JCON Online 2022 - Getting Started with the Micronaut Framework
🗓 Sep 23 09:00 JCON Online 2022 - Micronaut® Framework and Microstream Java-native persistence engine