Dashboard > 江南白衣博物馆 > ... > Code Quality > Eclipse code setting
  江南白衣博物馆 Log In | Sign Up   View a printable version of the current page.  
  Eclipse code setting
Added by Calvin, last edited by Calvin on 2008-10-08  (view change)
Labels: 
(None)

1.导入

在 Windows->Preferences->Java Code Style的Formatter 和 Cleanup 中导入springsidd3.0/tools/configures/eclipse/cleanup-profile.xml 和formatter.xml。

修改Windows->Preferences->XML->XML Files->Editor  与 ,增加到118字符

2.Formatter的修改记录

在Eclipse built-in 的基础上做出如下修改

  • 每行增至118字符 (Line wrapping)
  • 取消三个 Comment Format (Comments) --因为Eclipse的Formatter不能自由换行,老把注释搞成一行的缘故

3.Cleanup的修改记录

2.1 默认Cleanup

Change non static accesses to static members using declaring type
Change indirect accesses to static members to direct accesses (accesses through subtypes)
Remove unused imports
Add missing '@Override' annotations
Add missing '@Deprecated' annotations
Remove unnecessary casts
Remove unnecessary '$NON-NLS$' tags

2.2 SpringSide 增加cleanup

Remove 'this' qualifier for non static field accesses (Member Accesses)
Remove 'this' qualifier for non static method accesses (Member Accesses)
Remove blocks containing a single return or throw statement (Code Style)
Convert for loops to enhanced for loops (Code Style)
Add missing serial version ID (generated) (Missing Code)
Organize imports (Code Organizing)
Format source code (Code Organizing)
Remove trailing whitespaces on non empty lines(Code Organizing)

 3. Java->Compiler->Warining

Site powered by a free Open Source Project / Non-profit License (more) of Confluence - the Enterprise wiki.
Learn more or evaluate Confluence for your organisation.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.9 Build:#527 2006-09-07) - Bug/feature request - Contact Administrators