设置Myeclipse中的代码格式化、及保存时自动格式化

1.保存时自动格式化代码:

打开eclipse/myeclipse 选择 window-->Preferences-->JAVA-->Editor-->Save Actions 右边选中:

Perform the selected actions on save

       Format source code

          Format all lines

      Organize imports

保存后重启Myeclipse即可。

 

2.在jsp、xml、html中格式化代码

右击--->Sourse-->Format  即可,

 

posted @ 2016-10-26 22:52  从你的世界路过潘  阅读(2531)  评论(0编辑  收藏  举报