Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable IntelliJ kotlin starred Imports?

in java i have star import disabled and it works correctly. but in kotlin when i import UUID it adds import java.util.* instead of import java.util.UUID. there is no <alt>+enter option to change it, i see no option in settings to change it. any idea how to change this behavior?

IntelliJ IDEA 2017.3.4 (Community Edition) Build #IC-173.4548.28, built on January 30, 2018

like image 319
piotrek Avatar asked Feb 12 '18 20:02

piotrek


People also ask

How do I disable Star imports in IntelliJ?

Disable wildcard importsIn the Settings/Preferences dialog ( Ctrl+Alt+S ), select Editor | Code Style | Java | Imports. Make sure that the Use single class import option is enabled.

How do I stop auto import in IntelliJ?

You can disable auto-import on completion and use quick-fixes instead: In the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Editor | General | Auto Import. On the Auto Import page that opens, use the checkboxes in the TypeScript/JavaScript area to enable or disable import generation on code completion.

How do I disable optimize imports in IntelliJ?

5 Answers. Show activity on this post. Disable File | Settings | Editor | General | Auto Import | Optimize imports on the fly. Normally you don't need to add imports manually, IDEA does it for you.

How do I manage imports in IntelliJ?

In Eclipse, you press CTRL + SHIFT + O “Organize Imports” to import packages automatically. For IntelliJ IDEA, if you press CTRL + ALT + O “Optimize Imports”, it just removes some unused imports, never imports any package.


1 Answers

You can configure this in the settings. Go to Editor -> Code Style -> Kotlin -> Imports in the preferences dialog. The java.util package is probably listed in Packages to Use Import with '*'.

enter image description here

like image 80
s1m0nw1 Avatar answered Oct 29 '22 10:10

s1m0nw1