更新时间:2022-05-06 00:41:23
根据IDEA版本:是的,
Depending on the IDEA version: Yes.
在7.0.5使用的菜单文件 - >设置
选 code完成
然后从导入并完成排除
并添加包或类你不想在你的建议。
In 7.0.5 use menu File -> Settings
choose Code Completion
and then Exclude from Import and Completion
and add the package or class that you don't want to have in your suggestions.
在版本8和9版本菜单使用文件 - >设置
键入自动进口到搜索框,并使用从导入和完成
盒子里排除。
In version 8 and version 9 use menu File -> Settings
type "Auto import" into the search box and use the Exclude from Import and Completion
box there.
在第9版您也可直接从导入建议上下文菜单中添加类和包的排除列表的选择:
In version 9 you also have the option of adding Classes and Packages to the exclude-list directly from the import suggestions context-menu: