【问题标题】:Is it possible to prevent Intellij from automatically importing an entire package of classes? [duplicate]是否可以防止 Intellij 自动导入整个类包? [复制]
【发布时间】:2019-12-03 17:50:34
【问题描述】:

我正在使用Intellij Ultimate 2019.1,并且经常当我点击alt+enter 添加一个导入某个类some.package.SomeClass 时,它会添加import some.package.* 而不是import some.package.SomeClass

我想知道是否可以选择让 Intellij 添加单个类导入。

感谢您的关注。

【问题讨论】:

    标签: intellij-idea


    【解决方案1】:

    如果您打开 Preferences | Editor | Code Style | Java | Imports 并将像 9999999 这样的值设置为 Class count to import with "*"Names count to use static import with '*' 选项,这是可能的。

    【讨论】:

      猜你喜欢
      • 2013-02-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-25
      • 1970-01-01
      • 2013-03-20
      • 2013-08-01
      相关资源
      最近更新 更多