IntelliJ:永远不要使用通配符导入 - IntelliJ: Never use wildcard imports

问题:

Is there a way to tell IntelliJ never to use wildcard imports? 有没有办法告诉IntelliJ永远不要使用通配符导入? Under 'Settings > Code Style > Imports', I can see that you can specify the 'class count' prior to IntelliJ using wildcard imports. 在“设置>代码样式>导入”下,我能够看到您能够在IntelliJ以前使用通配符导入来指定“类计数”。 However, if I never want to use wildcard imports can I turn this functionality off? 可是,若是我永远不想使用通配符导入,能够关闭此功能吗? this

I have tried putting -1 or leaving the field blank but that just tells IntelliJ to always use wildcard imports. 我尝试过将-1或将该字段留空,但这只是告诉IntelliJ始终使用通配符导入。 Obviously a not-so-nice solution would be to put a ridiculously high number so that you never encounter wildcard imports but I was hoping there was a nicer way to just turn it off. 显然,一个不太好的解决方案是设置一个高得离谱的数字,这样您就不会遇到通配符导入,可是我但愿有一种更好的方法将其关闭。 spa


解决方案:

参考一: https://stackoom.com/question/E3BA/IntelliJ-永远不要使用通配符导入
参考二: https://oldbug.net/q/E3BA/IntelliJ-Never-use-wildcard-imports
相关文章
相关标签/搜索