匿名用户157
Eclipse 代码格式化

Google的代码风格 1、下载eclipse java google style.xml https://github.com/google/styleguide 2、 导入方法: Eclipse window preferences Java Code Style Formatter Import 选择eclipse java google style.xml文件 点击apply,ok就行了。 3、这样就可以选中代码进行格式化(默认快捷键是Ctrl+Shift+F),用以保持代码风格一致。 //默认的缩

匿名用户157
eclipse 开发项目必要设置(一)

设置编码: Window Preferences — General — Content Types — Text — Java Source File 下面的 Default encoding设置为UTF 8 点击Update Window Preferences — General — Workspace 中Text File encoding 选择other下拉框中选择UTF 8 Window Preferences — Web — JSP Files 中Encoding 下拉框中选择UTF 8 注释