在Intellij Idea中混合常规导入和静态导入 [英] Mix regular imports and static imports in Intellij Idea

查看:359
本文介绍了在Intellij Idea中混合常规导入和静态导入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认情况下,Intellij Idea将常规导入和静态导入分开.喜欢

By default, Intellij Idea separates regular imports and static imports. Like

 import com.a;
 import com.b;

 import static com.a.C.foo;

我要把它放在一起.喜欢

What I want is placing it together. Like

 import com.a;
 import static com.a.C.foo;
 import com.b;

如何配置这种布局?

推荐答案

您可以在设置/代码样式/Java/导入选项卡"中找到一个Layout static imports separately选项(您可能需要为此水平滚动选项卡).

You can find a Layout static imports separately option in Settings/Code Style/Java/Import Tab (you might have to scroll tabs horizontally for this).

这篇关于在Intellij Idea中混合常规导入和静态导入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆