禁用的IntelliJ加星标(包装)进口? [英] Disable IntelliJ Starred (Package) Imports?

查看:147
本文介绍了禁用的IntelliJ加星标(包装)进口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个迁移的Eclipse IDE用户,并在学习的路上轮的IntelliJ IDEA 9。

I'm a migrating Eclipse IDE user and am learning my way round IntelliJ IDEA 9.

在默认情况下,直到您从同一个包导入99类的Eclipse IDE将不使用进口出演,所以它几乎从未发生。

By default Eclipse IDE won't use a starred import until you import 99 classes from the same package, so it practically never happens.

但IntelliJ IDEA的似乎只是太热衷于这样做,我不能工作了如何禁用它。

But IntelliJ IDEA seems only too keen to do it, and I can't work out how to disable it.

例如,键入后 JList的然后<大骨节病> ALT + <大骨节病> ENTER 自动导入,整个的javax.swing 包进口,而不只是我指定的类。

For example, after typing JList then ALT + ENTER to auto-import, the whole javax.swing package is imported instead of just the class I specify.

我试图排除自动完成的javax.swing ,但这只是停止的任何的被建议Swing类,这是反生产力。

I tried excluding javax.swing from the auto-completion, but that just stops any Swing classes from being suggested, which is counter-productive.

推荐答案

您可以在此设置此设置。

You can set this setting here.

IDEA 14 +顺序是:

设置> 编辑> code风格> 的Java > 进口> 类指望用进口与'*'

Settings > Editor > Code Style > Java > Imports > Class count to use import with '*'

在旧版本的想法:

设置 - > 的Java - > code风格 - > 进口 - > 类计数使用进口与'*'

Settings -> Java -> Code Style -> Imports -> Class count to use import with '*'

该功能不能被禁用。您需要将其设置为较高的值,例如99。

The feature can not be disabled. You need to set it to a high value, e.g. 99.

在2016年1月1日版
你也应该删除在包线使用导入与'*'
例如进口的javax。*;

In 2016.1.1 version You should also remove the lines under Packages to Use Import with '*', e.g. import javax.*;

这篇关于禁用的IntelliJ加星标(包装)进口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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