Disable IntelliJ Starred (Package) Imports?

前端 未结 3 1856
野性不改
野性不改 2021-01-29 19:30

I\'m a migrating Eclipse IDE user and am learning my way round IntelliJ IDEA 9.

By default Eclipse IDE won\'t use a starred import until you import 99 classes from the s

3条回答
  •  灰色年华
    2021-01-29 20:17

    You can set this setting here.

    In IDEA 14+ the sequence is:

    Settings > Editor > Code Style > Java > Imports > Class count to use import with '*'

    In older version of IDEA:

    Settings -> Java -> Code Style -> Imports -> Class count to use import with '*'

    The feature can not be disabled. You need to set it to a high value, e.g. 99.

    In 2016.1.1 version You should also remove the lines under Packages to Use Import with '*', e.g. import javax.*;

提交回复
热议问题