摘 要
Eclipse是IBM向開放源碼社區(qū)捐贈的開發(fā)框架,一個基于Java的可擴展開發(fā)平臺,這個平臺本身是由多個子系統(tǒng)構成的,而每個子系統(tǒng)又是由一個或多個建立在平臺運行庫(Platform Runtime)之上的插件實現的。
Eclipse是一個優(yōu)秀的集成開發(fā)環(huán)境,它的插件擴展機制更是它的特點和優(yōu)勢所在。Eclipse本身提供了一個用于開發(fā)插件的框架,本論文目的就在于從了解Eclipse的平臺體系結構開始,逐步深入到它的插件擴展機制以及插件的工作原理,并在Eclipse提供的插件開發(fā)環(huán)境中開發(fā)一個小型插件。
論文的主要工作在于熟練掌握插件擴展點的運用,同時設計并實現一個具有靈敏輔助提示的java源文件編輯器和提供搜索功能的插件,通過實現特定的擴展點與Eclipse平臺實現無縫集成。本論文所做的具有探索性和創(chuàng)新性的工作可為讀者更快更好地熟悉Eclipse插件開發(fā)提供一個實際的、可視化的參考,與讀者共享在Eclipse平臺上開發(fā)的樂趣所在。
關鍵字: Eclipse,插件,編輯器,內容靈敏提示,搜索
IDE Design of memory assistant based
on Eclipse platform
Abstract
Eclipse is a development frame which IBM donated to the open source community and an expansive platform based on Java. Many subsystems constitute the platform, but each sub-
system also is realized by one or more plugins which are based on platform runtime.As an int-
egrated development environment Eclipse is extremely outstanding without doubt, but the ex-
pansive mechanism of plug-in is the very characteristic and superiority of it. Eclipse itself provided a frame to develop plug-in. And this paper is aimed to penetrate into its ex-pansive mechanism of plugin gradually from the beginning of understanding the platform architecture of Eclipse, and then develop a small plug-in under plug-in development environment (PDE) provided by Eclipse.
The major work of this paper is to grasp the key of expansive mechanism of plug-in- setting of extension-point, design and realize a java source code editor providing sensitive assistant and loacal document search , then integrate with Eclipse platform seamlessly by extension-point. The explo-ration and innovation work this paper does, can provide the reader an actual and visible reference to get familiar with Eclipse plug-in development sooner and better, and share the pleasure experiences of development in the Eclipse platform with the readers.
Keywords: Eclipse, Plug-in, editor, content sensitive assistant, search
目 錄
基于Eclipse平臺“編輯助手”插件開發(fā)與實現 I
摘 要 I
1. 緒論 1
1.1 課題背景 1
1.2 論文結構及主要內容 1
1.3 ECLISPE平臺簡介 2
1.4 ECLISPE插件開發(fā)概述 3
1.4.1 插件開發(fā)簡介 3
1.4.2 插件開發(fā)的優(yōu)勢和不足 4
2. ECLLPSE平臺及插件擴展機制 5
2.1 ECLIPSE平臺技術概述 5
2.1.1平臺體系結構 5
2.1.2平臺組件層次 7
2.2 ECLIPSE平臺插件擴展機制的實現 7
2.2.1適配器模式簡介 7
2.2.2 IAdaptable接口 8
3. 編輯助手插件的需求與設計 10
3.1 需求概述 10
3.1.1 運行環(huán)境 10
3.1.2 功能需求 10
3.2 結構設計 10
4. 編輯助手插件的開發(fā)與實現 12
4.1前置條件 12
4.1.1 開發(fā)環(huán)境 12
4.1.2 插件開發(fā)引用的開源項目 12
4.1.3 圖形界面開發(fā)包 13
4.2 在ECLIPSE中進行插件開發(fā) 14
4.2.1 插件建立 14
4.2.2 擴展設置 15
4.2.3 插件實現 17
4.2.4 插件成品 27
4.2.5 插件發(fā)布 30
5. 開發(fā)難點與解決途徑 31
5.1 JAVA源文件的解析 31
5.2插件的依賴性和使用第三方JAR文件 32
5.3WORD文檔的內容提取 33
5.4 PDF文檔的內容提取 34
5.5 資料問題如何解決 34
結 論 36
致 謝 37
參考文獻 38
附 錄 40
1.1. 附錄A :引用 40
1.2. 附錄B :ECLISPE插件的安裝及卸載 40
1.2.1. ECLIPSE插件的安裝 40
1.2.2. ECLIPSE插件的卸載 41
1.3. 附錄C:相關資源 41