Abstract: | 一套高品質的編輯環境應該提供給標的語言各式各樣的編輯輔助,進而幫助使用者縮短編輯過程,並能有效避免或降低輸入錯誤。在以往,此種編輯環境並不易開發,因此除了具廣大用戶的通用語言如C, Java, HTML之外,大多數特定領域語言(DSL)並未見有高功能的專屬編輯器。然而此種狀況正在改變之中,因為隨著開放、可擴充式的工具整合平台如Eclipse、Netbeans的出現,開發者可以利用這些平台提供的人機互動與編輯功能框架與預先實做,因此不再需要重頭打造編輯環境。即使如此,實際的使用經驗告訴我們,由於此類框架的複雜難學,要一般的開發者利用這些框架實做高品質編輯環境,依然是困難重重。基於此種因素,我們早在2006年即提出一套稱做EGOE的編輯環境生成系統,可以使開發者避開框架細節,而以更高階抽象的標的語言定義為輸入,系統則利用模型驅動的技術,自動生成出可以在Eclipse平台上執行的高品質多頁面編輯環境。EGOE所產生的編輯環境能同時為標的語言提供結構化與純文字等不同的編輯頁面,並且於文字編輯時提供醒目提示、內容輔助與文字喜好設定等編輯相關的輔助功能。隨後的EGOE II除改善原有架構之外,更大大的增加原有的功能,提供的功能有: 程式碼摺疊、美化、錯誤標記、範本精靈,程式碼自動補全以及變數宣告與引用之自動連結等。本計畫希望能延續我們這三年來,在EGOE (II)系統上已經擁有的成果,而繼續精進發展第三代EGOE III。除了重構原有系統之外,我們將集中在知識密集相關功能輔助的開發上。所謂知識密集功能輔助意指使用者在編輯時僅示簡單動作,系統即可從使用者編輯所需的龐大相關資訊來源中,找出精確、即時,以及與後續動作相關的輔助訊息與建議,從而幫助使用者快速輸入正確內容。另外,為了提供測試能力,我們也著手進行如何在語言定義上加入(執行)語意描述,從而使我們的系統得以結合Elcipse平台的偵錯系統,產生可在平台上執行的標的語言模擬與偵錯環境。 A high-quality editing environment should provide versatile editing aids for the users of the target language so that the editing process can be shortened significantly and possible editing errors avoided or reduced effectively. In the past, however, because of the complication of such systems, it is not easy to construct a high-quality editing environment, as witnessed by the fact that almost all high-quality editing environments were constructed for most popular languages such as C, Java or HTML. As the release of open and extensible tool integration platforms, such as Eclipse and NetBeans, the situation is changing since now it is no longer necessary to construct an editing environment from scratch but, on the contrary, we can reuse the GUI and editing framework and many built-ins provided in these platforms. Even so, however, practical experience manifests that it is still rather difficult for an average developer to construct a high-quality editor using these frameworks mainly due to the huge codebase and complicated usage of these frameworks. After an understanding of such difficulty, we had proposed in 2006 a generating system called EGOE, which, after accepting the specification of a target language, can generate an editing environment for the language on the Eclipse platform. The generated editor has multiple views, each possessing either structured or textual editing capability. In addition to basic functionalities, the editor generated by EGOE has the text-editing features of syntax highlight, content assist and preferences setting etc. for the target language. By using EGOE, the developer need only prepare the specification of a language to generate an editor. Compared with previous programming approach, our method is more abstract, more succinct, and more declarative, can prevent the developer from programming details and can help the developer generate an editor much more rapidly. In the following two years, we continued to refine and enhance EGOE, and resulted in a new EGOE II version, which provides additional features found in only high-quality editing environments including code folding, code formatting, error markers, new wizard, code completion and variable use/declaration connection. This project is the continuation of our previous unfunded works on developing EGOE & EGOE II. We plan to continue to refine and enhance EGOE II to generate EGOE III. As to the addition of new features, we plan to focus on the addition of knowledge intensive editing aids, which can enable the user to get accurate, instant and context sensitive help messages/suggestions from a tremendous source of background information required to perform editing. Finally, in order for our generated system to have test capability after editing, we also begin to consider the enhancement of adding in our language specification a section about the operational execution semantics of a target language so that the system can make use of eclipse debugging framework and generate as well a corresponding simulator and debugger accordingly. |