天天看點

介紹兩個Eclipse插件: Implementors & Call Hierarchy

本文介紹兩個在Eclipse調試與跟蹤過程中的兩個實用插件 他們都可以在 http://eclipse-tools.sourceforge.net/ ?下載下傳 該網址還包含了另外兩個項目,以及一份Eclipse的 reference card.

------------------------------------------------------------------

一: Implementors

插件功能:在eclipse中查找并定位類時,可以選擇直接定位到接口或者定位到接口的實作。

使用方法:選擇類(接口)或者類(接口)的方法,單擊右鍵,選擇Open Interface,直接定位到接口;選擇Open Implementation,直接定位到實作類,如果有多個實作類就會出現一個選擇框,選擇具體的某個實作類。

插件介紹:

The Implementors plugins add the possibility to jump to the implementation of of an interface. Alternatively, you can jump to the interface of an implementation.

The jumping to implementation/interface works for plain Java files. In addition, when associating EJB deployment descriptors with a project, the plugin is made aware of the connection between the EJB interfaces and the implementation class, something which is not specified in the implementation class itself.

該插件是一個非常實用的插件。下面給出一個介紹如何使用它的連結: http://dev2dev.bea.com.cn/bbsdoc/20060124188.html

ps. Eclipse右鍵菜單中有兩個選項,Open Type Hierarchy / Quick Type Hierarchy,? 功能與這個插件類似, 看來這個功能已經被內建到Eclipse中了。

------------------------------------------------------------------

二: Call Hierarchy

Call Hierarchy插件: 顯示一個方法的調用層次,可以從中看到它被哪些方法調用了,以及它調用了哪些方法,是代碼追蹤比較實用的工具。Eclipse 3.1中也已經內建有這個功能了。

繼續閱讀