piaoyi's blog - 站在煩惱裡仰望幸福

Main | Next day (May 30, 2008) »

http://www.javaworld.com.tw/roller/piaoyi/date/20080529 Thursday May 29, 2008

Useful Eclipse Plugins

記錄一下我常用的 Eclipse Plugin,好在換新版 Eclipse 時,還記得要裝哪些 Plugin。
我都直接抓Eclipse+WTP SDK,所以 WTP 和 GEF plugin 就不寫了。

因為還在整理,已忘了有裝哪些,所以會再持續更新。

我必用的 Plugin

Subclipse
Update Site: http://subclipse.tigris.org/update_1.2.x
Description: Subversion 版本控制工具。
Properties Editor (Resource Bundle Editor)
Update Site: http://propedit.sourceforge.jp/eclipse/updates/
Description: 編輯I18N .properties 用的Editor,編輯時可以用你的字元集(假設是zh_TW,即你在看和編輯時,都是中文呈現),存檔時他會自動轉成 unicode \uxxxx,但編輯時不會看起來是 \uxxxx (native2ascii)。
我習慣用這個。
JInto (Resource Bundle Editor)
Update Site: http://www.guh-software.de/eclipse/
Description: 編輯I18N .properties 用的Editor,一個頁面含全部語系的 .properties ,以 Table 方式呈現來填入,編輯時看起來一樣是對應的字元集,不會是 \uxxxx (native2ascii)。
這個功能較強大,所以我也裝,也因我裝了二個處理 .properties 的plugin,所以這個我都用 open with 方式來選擇用這個 plugin 開啟 .properties。
Implementors
Update Site: http://eclipse-tools.sourceforge.net/updates/
Description: 讓 Eclipse 可以追蹤 Concrete class method 的工具。
java editor 上,你可以點一個 class or method name,然後按右鍵選 Open Declaration 跳去看他的內容,但如果這個 class or method 是 interface,你跳過去看就沒意義,這個 plugin 就是讓你可以跳到實作 interface 的 concreate class 來觀看,只要點了之後,按右鍵選 Open Implementation 即可。
Lifesting
Download URL: http://www.blogjava.net/lifesting/archive/2008/04/11/192250.html
Description: 讓你可以將文件的原本編碼A轉成編碼B。
這在變更 Eclipse 工作區 charset encoding時很有用,可能原本是 MS950,在透過變更 Eclipse Preferences 後把 encoding 改 UTF-8,會讓原本有中文的檔都變亂碼。
用這個工具,你可以在未將工作區從 MS950 變更為 UTF-8 前,先用 Lifesting 來將文件轉成 UFT-8,再將工作區變更為 UTF-8 即可。
Maven2
Update Site: http://m2eclipse.sonatype.org/update/
Description: Maven - A software project management and comprehension tool。
比 Ant 強大的 framework,應該不能直接比,但ant 的功能,maven 都辦的到,而且很多 opensource 的 project 目前也都從 ant 改用 maven 來建置與管理。
而這個是 Maven Plugin for eclipse,讓我們可以不用下 command 的方式執行。
SpringIDE
Update Site: http://springide.org/updatesite/
Description: SpringIDE,讓你可以在 Eclipse 中以樹狀圖形來觀察 spring xml config 中的 bean reference 關係,且在 xml 中提供 auto complete 功能與檢查 xml 中設定 class 是否存在。
TestNG
Update Site: http://beust.com/eclipse
Description: TestNG。一個比 JUnit 強的Test Framework。可以用 Java Annotations 來設定,也可以用來跑 JUnit。
Mylyn
Update Site: http://download.eclipse.org/tools/mylyn/update/e3.3
Description: Mylyn,一個 Task Focus Development Tool。除了 local repository,也可和某些 Issue System 結合使用,如 JIRA,Bugzilla,Trac。
Mylyn Extras
Update Site: http://download.eclipse.org/tools/mylyn/update/extras
Description: Mylyn Extras:JIRA,Trac Connector 要從這裝。
CheckStyle
Update Site: http://eclipse-cs.sourceforge.net/update
Description: 編碼標準分析。
讓開發自動化:用 Eclipse 插件提高代碼質量
Coverlipse
Update Site: http://coverlipse.sf.net/update
Description: 測試代碼覆蓋率。
讓開發自動化:用 Eclipse 插件提高代碼質量
CPD
Update Site: http://pmd.sourceforge.net/eclipse
Description: 複製/粘貼檢驗。
讓開發自動化:用 Eclipse 插件提高代碼質量
JDepend
Update Site: http://andrei.gmxhome.de/eclipse
Description: 包依賴項分析。
讓開發自動化:用 Eclipse 插件提高代碼質量
此 update site 同時還有其他有用的 plugin,如下:
FileSync plugin
Extended VS Presentation plugin
Bytecode Outline plugin
AnyEdit plugin
http://andrei.gmxhome.de/eclipse.html
Metrics
Update Site: http://metrics.sourceforge.net/update
Description: 複雜度監控。
讓開發自動化:用 Eclipse 插件提高代碼質量
FindBugs
Update Site: http://findbugs.cs.umd.edu/eclipse
Description: FindBugs。
FindBugs:提高代碼質量
Fat Jar
Update Site: http://kurucz-grafika.de/fatjar
Description: 一個幫你把所有的 class 和引用的 jar 匯出成一個 jar 的工具。
http://fjep.sourceforge.net/
Eclipse HTTP Client (Http4E)
Update Site: http://http4e.roussev.org/install/
Description: 一個一個可以製造 HTTP Calls 的 Eclipse GUI,對 Web Development, Web Services and Rest Services 好用的工具。
http://http4e.roussev.org/

我選用的 Plugin

Keytool
Update Site: http://keytool.sourceforge.net/update/
Description: Keytool is an Eclipse plugin that maintains keystores and certificates。
Groovy
Update Site: http://dist.codehaus.org/groovy/distributions/update/
Description: Plugin for compile and run groovy。
Android
Update Site: https://dl-ssl.google.com/android/eclipse/
Description: 開發 Google Phone 用的 Toolkit。
EclipseMe
Update Site: http://www.eclipseme.org/updates/
Description: 開發 Java ME 用的 Toolkit。
Visual Editor
Download URL: http://eclipse.org/vep
Description: Eclipse Visual Editor,一個視覺化的 AWT, Swing, SWT 編輯工具。
聽說 Netbeans 的 VE 比較強比較好用,不過我已習慣直接寫Swing Code 而沒用 VE,所以我也懶的試 Netbeans,也不想要開發過程一下子用 Netbeans 一下子用 Eclipse,不過 Eclipse VE 覺的小~~容易當,我都拿它來拉簡單的畫面測試用而已。
SQL Explorer
Update Site: http://eclipsesql.sourceforge.net/
Description: 可在 Eclipse 中連 DB 的 Tool。
AntView
Download URL: http://r2tech-eclipse.sourceforge.net/
Description: 可把 ant build file 圖形化顯示。
Eclipse Version Tree Plugin for CVS
Download URL: http://versiontree.sourceforge.net/
Description: 把CVS上文件的各版本以樹狀連結顯示變化。
QOLdap
Download URL: http://qoldap.sourceforge.net/
Description: Eclipse 中的 LDAP Browser。(尚未測試)
Apache Directory Studio
Update Site: http://directory.apache.org/studio/update/1.x/
Description: Eclipse 中的 LDAP Browser 和 Editor。(尚未測試)
Jode Decompiler
Update Site: http://www.technoetic.com/eclipse/update
Description: Eclipse下的Java decompiler。試用jdk1.5一直反組譯失敗,可能只能 jdk1.4 以前版本。
JavaFX
Update Site: http://download.java.net/general/openjfx/plugins/eclipse/site.xml
Description: JavaFX
Eclipse Regular Expression Tester
Update Site: http://brosinski.com/regex/update
Description: Regular Expression Tester,裝了沒測,不確定好不好用。
QuickREx
Download URL: http://sourceforge.net/projects/quickrex/
Description: 也是一種 Regular Expression Tester
QuickREx Doc
UniMod
Download URL: http://unimod.sourceforge.net/
Description: UniMod 是一個 Executable UML 的 Implement,不過我還沒時間試用。
Eclipse wiki Editor
Update Site: http://www.stateofflow.com/UpdateSite
Description: A powerful project documentation tool linking documentation to eclipse resources, web sites, bug tracking tools and other Wikis。(尚未測試)
http://eclipsewiki.sourceforge.net


Eclipse Preferences FAQ

因為常常會設定 Eclipse 工作區的 Preferences,尤其是在建新工作區時,想要調某些設定,卻一下子找不到在哪設,所以還是把一些常用的設定路徑放上來好了,方便查表。

雖然 Eclipse 可以匯入/匯出 Preferences,但不知為何,就是有的設定不會匯到,無力!!

  • 取消 eclipse 主控台(Console) 輸出的字數限制
    1. [Windows]->[Preferences]->[Run/Debug]->[Console],取消選取[Limit console output]。
  • 變更 Editor 編碼(encoding)
    1. [Windows]->[Preferences]->[General]->[Workspace],變更[Text file Encoding]為想要的 charset。
    2. [Windows]->[Preferences]->[Web and XML]->[CSS Files],變更[Encoding]為想要的 charset。
    3. [Windows]->[Preferences]->[Web and XML]->[HTML Files],變更[Encoding]為想要的 charset。
    4. [Windows]->[Preferences]->[Web and XML]->[JSP Files],變更[Encoding]為想要的 charset。
    5. [Windows]->[Preferences]->[Web and XML]->[XML Files],變更[Encoding]為想要的 charset。
    6. [Windows]->[Preferences]->[General]->[Content Types],這裡好像可以調全部的 charset,但我沒試過。
  • Show Source of Selected Element Only
    1. [Windows]->[Customize Perspective]->[Commands]->[Available command groups],選取[Editor Presentation]。
  • 變更 Content Assist 快速鍵為 Ctrl + L (原本為 Alt + /)
    1. [Windows]->[Preferences]->[General]->[Keys],選取[Content Assist]項修改(在 Editor 類別內)。
  • 修改 ${user} 值
    1. 修改 eclipse.ini,加入 -Duser.name=my user name
  • 修改操作介面語系 (Hey!Hey!避免看到有些 plugin 的 menu 有很怪的中文)
    1. 修改 eclipse.ini,加入 -Duser.language=en
  • 自動移除編輯時,每行程式中最後面多餘的空白
    1. [Windows]->[Preferences]->[General]->[Editors]->[AnyEdit Tools]->[Auto - Convert] 頁籤,勾選 [Remove Trailing whitespace]。(這個要安裝 AnyEdit plugin,參考我另一篇 plugin 文章中的 JDepend plugin update site)
待續...



Main | Next day (May 30, 2008) »