1.自動import
在IDEA中,打開 IDEA 的設(shè)置,找到 Editor -> General -> Auto Import。勾選上
- Add unambiguous imports on the fly
- Optimize imports on the fly (for current project)
2.gitee 提交格式化
設(shè)置方法如下:
1.打開設(shè)置
2.找到版本控制(Version Control),點擊提交(Commit)
3.勾選Before Commit下的Reform code
3.高效插件Save Actions
文章來源:http://www.zghlxwxcb.cn/news/detail-606050.html
文章來源地址http://www.zghlxwxcb.cn/news/detail-606050.html
- activate save actions on save – 在保存的時候激活save actions
- optimize imports – 自動刪除沒有引用的imports
- reformat file – 自動格式化代碼
- add missing @Override – 在save actions激活的時候直接提添加override
- add a serialVersionUID – 自動添加序列化id
到了這里,關(guān)于IDEA代碼自動格式化工具的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!