IDEA中导入多个包自动合并为星号

  IDEA中导入同一个包下的几个class会自动合并为星号,如下图。可以通过设置让其不自动合并为星号。

 

1、选择File→Settings→Editor→Code style→Java,再点击右边的Imports,将Class count to use import with '*'的数量调高即可。

还可以设置一些规则:

Names count to use static import with '*':导入静态类时根据设定的数量自动合并为*。

Packages to Use Import with '*':在列表中的包,无论导入多少个都会自动合并为*。

 

设置后效果如下:

 

posted @ 2019-01-14 18:30  PC君  阅读(12071)  评论(0编辑  收藏  举报