如何在Netbeans中配置Java导入的组织 [英] How to configure organizing of Java imports in Netbeans
本文介绍了如何在Netbeans中配置Java导入的组织的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有什么方法可以这样做吗?
$ b
- 点击工具→选项点击编辑图标。 。
- 将语言设置为:
Java
。 - :
Imports
。 - 根据需要更改设置。
- 点击确定或应用保存所做的更改。
b
$ b点击工具→选项,即可保存汇入: 。
单击编辑图标。 li> - 选中删除未使用的导入。
- 选中组织
- 点击确定或应用保存更改。
Currently Netbeans (I'm using version 7.3.1) has an in-built ability to organize imports in Java files via menu Source » Organize Imports. But I need to change the default order of imports. (For example, when working in a shared environment, software developers must use the same import settings.)
Is there any way to do so?
解决方案
Try:
- Click Tools → Options.
- Click the Editor icon.
- Click the Formatting tab.
- Set Language to:
Java
. - Set Category to:
Imports
. - Change the settings as desired.
- Click OK or Apply to save the changes.
To organize the imports on save:
- Click Tools → Options.
- Click the Editor icon.
- Click the On Save tab.
- Check Remove Unused Imports.
- Check Organize Imports.
- Click OK or Apply to save the changes.
这篇关于如何在Netbeans中配置Java导入的组织的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文