下面的三个设置主要是为了统一文件编码和代码风格,还有就是提高代码的可读性,可以按以下步骤设置。([color=red]两个模板文件codetemplates.xml和formatter.xml在附件中,rar压缩格式[/color])
[b]1.由菜单Window ->Preference打开Eclipse配置界面[/b]
[b]2.设置 导入代码模板codetemplates.xml[/b]
[img]http://dl.iteye.com/upload/attachment/441013/9f2d3aa5-066c-331b-bf3d-26b7707c95bc.jpg[/img]
[b]3.导入附件的格式化模板formatter.xml并选择longtitude作为当前配置[/b]
[img]http://dl.iteye.com/upload/attachment/441015/162e08ae-cb3c-3687-a024-29d9ce709183.jpg[/img]
[b]4.设置保存时自动格式化代码[/b]
[img]http://dl.iteye.com/upload/attachment/441017/5f070cbb-9741-32f3-bc84-50078cbd9a13.jpg[/img]
[b]5.UTF-8编码[/b]
[img]http://dl.iteye.com/upload/attachment/441019/f2826555-33d8-334d-99eb-55630425e79f.jpg[/img]
[b]1.由菜单Window ->Preference打开Eclipse配置界面[/b]
[b]2.设置 导入代码模板codetemplates.xml[/b]
[img]http://dl.iteye.com/upload/attachment/441013/9f2d3aa5-066c-331b-bf3d-26b7707c95bc.jpg[/img]
[b]3.导入附件的格式化模板formatter.xml并选择longtitude作为当前配置[/b]
[img]http://dl.iteye.com/upload/attachment/441015/162e08ae-cb3c-3687-a024-29d9ce709183.jpg[/img]
[b]4.设置保存时自动格式化代码[/b]
[img]http://dl.iteye.com/upload/attachment/441017/5f070cbb-9741-32f3-bc84-50078cbd9a13.jpg[/img]
[b]5.UTF-8编码[/b]
[img]http://dl.iteye.com/upload/attachment/441019/f2826555-33d8-334d-99eb-55630425e79f.jpg[/img]