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
相關文章
相關標籤/搜索