文章出處

方法一:
 
1.Eclipse中,選擇Help->Software Updates->Find and Install
 
2.選擇 Search for new features to install 選擇Next
 
3.選擇 New Remote Site
 
4.輸入更新地址
http://eclipse-cs.sourceforge.net/update
 
5. 安裝后重啟即可
 
方法二:
 
1.下載eclipse插件
 
 
下載后,把里面的兩個文件夾plugins和 features下面的文件分別拷貝到eclipse目錄下面對應的plugins和features目錄
 
2.如果你就這樣直接啟動eclipse 可能會出現ClassNotFoundExceptions 等錯誤,所以必須在啟動eclipse的時候加上一個參數 -clean. 這樣eclipse就可以更新它當前安裝的許多插件信息
比如你得eclipse在d盤 那么就是 d:\eclipse\eclipse.exe -clean 
 
checkStyle 使用
 
選中工程,右鍵選擇checkstyle->check code with checkstyle,檢查錯誤即可
 
Checkstyle的結果輸出
 
序號      輸出內容意義
1 Type is missing a javadoc commentClass  缺少類型說明
2“{” should be on the previous line “{” 應該位于前一行
3Methos is missing a javadoc comment方法前面缺少javadoc注釋
4Expected @throws tag for “Exception”在注釋中希望有@throws的說明
5“.” Is preceeded with whitespace “.” 前面不能有空格
6“.” Is followed by whitespace“.” 后面不能有空格
7“=” is not preceeded with whitespace“=” 前面缺少空格
8“=” is not followed with whitespace“=” 后面缺少空格
9“}” should be on the same line“}” 應該與下條語句位于同一行
10Unused @param tag for “unused”沒有參數“unused”,不需注釋
11Variable “CA” missing javadoc變量“CA”缺少javadoc注釋
12Line longer than 80characters行長度超過80
13Line contains a tab character行含有”tab” 字符
14Redundant “Public” modifier冗余的“public” modifier
15Final modifier out of order with the JSL suggestionFinal modifier的順序錯誤
16Avoid using the “.*” form of importImport格式避免使用“.*”
17Redundant import from the same package從同一個包中Import內容
18Unused import-java.util.listImport進來的java.util.list沒有被使用
19Duplicate import to line 13重復Import同一個內容
20Import from illegal package從非法包中 Import內容
21“while” construct must use “{}”“while” 語句缺少“{}”
22Variable “sTest1” must be private and have accessor method變量“sTest1”應該是private的,并且有調用它的方法
23Variable “ABC” must match pattern “^[a-z][a-zA-Z0-9]*$”變量“ABC”不符合命名規則“^[a-z][a-zA-Z0-9]*$”
24“(” is followed by whitespace“(” 后面不能有空格 25“)” is proceeded by whitespace“)” 前面不能有空格
 
相關文章:

文章列表


不含病毒。www.avast.com
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 大師兄 的頭像
    大師兄

    IT工程師數位筆記本

    大師兄 發表在 痞客邦 留言(0) 人氣()