从Eclipse的组织导入中排除软件包 [英] Exclude packages from Eclipse's organize imports

查看:152
本文介绍了从Eclipse的组织导入中排除软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一些类,例如 Closeable 文件容器,那些在我不太可能使用的模糊包中的doppelgänger类。通常,这不是一个问题,但是当我整理导入时,我必须手动选择要导入的正确类型。有没有办法从组织导入工具中排除特定的包?

There are certain classes, such as Closeable, File and Container, that have doppelgänger classes in obscure packages that I am extremely unlikely to ever use. Normally, that wouldn't be an issue, but when I Organize Imports I have to manually select the correct type to import. Is there any way to exclude specific packages from the Organize Imports tool?

Eclipse版本:

版本:3.7.1

构建ID:M20110909-1335

Eclipse Version:
Version: 3.7.1
Build id: M20110909-1335

推荐答案

我没有看到,例如com.sun。*。当我使用ContentAssist或组织导入时,可以在你的例子中关闭。我想你想要配置的是在首选项> Java>外观>类型过滤器中。但是,我没有com.sun。*列在我的过滤器列表中。也许这是隐藏禁止引用选项。

I don't see, for example, the com.sun.*.Closeable in your example when I use ContentAssist or Organize Imports. I think where you want to configure it is in Preferences > Java > Appearance > Type Filters. However, I don't have com.sun.* listed in my filter list. Maybe it's the "Hide forbidden references" option.

>

这篇关于从Eclipse的组织导入中排除软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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