2010年1月22日

Eclipse Plugin Developement Tutorial - Phase 1

基於Eclipse plugin開發,eclipse架構提供了Extensions and Extension Points 兩種定義,
將Extension Points比喻成插座, Extensions就像是功能.
藉由設定Extensions可以將自己所開發的功能插入Eclipse Platform中。
開發Eclipse Plugin的方式可以利用現有Plugin提供的功能, 也就是目前Eclipse 所提供的 Extension Points.

在Eclipse 2.x之後, 開發者導入了OSGI的功能, 將所有Plugin的架構改成OSGI的模式,
因此在設定Plugin的部分有了些許的改變.
Eclipse 2.x之後所有的export and import的設定被改變位置到 MAINFEST.MF中,
Extensions and Extension Points則依然在plugin.xml檔案中設定.
但是eclipse 2.x 之前的方式目前依然是support的.

Eclipse提供了開發Plugin的Perspective可以使用.
學習的階段可以參考ResourceBundler Editor的Plugin Project(sourceforge.net)來作學習,
因這個Project的功能簡單, 唯獨這個Plugin已經許久無更新, 所以目前他的開發方式依然是舊版的開發方法.

下面是幾個有用的reference site:
1. ResourceBundler Editor: http://sourceforge.net/projects/eclipse-rbe/
2. Extension Points List: http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_ui_handlers.html
3. Eclipse Javadoc: http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/index.html
4. Eclipse Plugin Development Tutorial: http://www.eclipsepluginsite.com/#