码迷,mamicode.com
首页 > 系统相关 > 详细

Eclipse 保存文件时自动格式化代码

时间:2017-05-13 14:26:05      阅读:341      评论:0      收藏:0      [点我收藏+]

标签:windows   lips   技术分享   reference   时间   --   cte   方法   form   

很多同学不知道Eclipse有个很有用的功能,就是自动格式源代码的功能,一般大家都是直接Ctrl+Shift+F手动格式化,多浪费时间。 

其实Eclipse里已经带有自动格式化功能了,默认是没有代开该功能的。 
具体方法:windows-->Preferences-->Java --> Editor-->Save Actions, 看到右边的选项了吧,勾选“Perform the selected actions on save”,其他选项根据需要自己选择或者配置就可以了。 

呵呵  别忘了,最后Apply和Ok一下。 

技术分享

Eclipse 保存文件时自动格式化代码

标签:windows   lips   技术分享   reference   时间   --   cte   方法   form   

原文地址:http://www.cnblogs.com/gaopengpy/p/6848729.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!