原创 How should I use a Progress Monitor

在package org.eclipse.core.runtime;Always start the progress monitor and do

原创 editor

editor的屬性: extensions:文件擴展名,逗號分隔;class實現org.eclipse.ui.IeditorPart的類名;laun

原创 Message Bundles(國際化)

Eclipse NLS class based (New method, recommended) Overview In this method, each plug-in maintains one Messages cla

原创 插件國際化

分兩類: 1)插件清單國際化,也就是擴展點的label進行國際化,往往針對的是菜單界面。 2)類文件國際化,針對的是運行中出現的界面、提示等國際化

原创 org.eclipse.ui.actionSets擴展點

用於添加菜單、菜單項、工具欄按鈕。包含menu和action元素。 menu元素的label若爲中文,添加快捷方式爲"文件(&F)"括號內位快捷鍵;

原创 org.eclipse.ui.PartInitException: 無法打開編輯器,

org.eclipse.ui.PartInitException: 無法打開編輯器,編輯器標識未知錯誤解決: Eclipse3.2M6以後,Edit

原创 view、editor上下文菜單

org.eclipse.ui.popupMenus 允許添加到其它視圖和編輯器的彈出菜單,可以創建viewerContribution和objectContribution。 viewerContribution:導致菜單出現在視圖或編輯

原创 如何拷貝一個現有插件

File > Import Select Plugin Development and Plugins and Fragments wizard, and press Next On the right you can see EVE

原创 利用擴展點爲view和editor添加菜單或工具

org.eclipse.ui.viewActions 建立viewContribution元素,用於爲視圖添加菜單或工具,其targetID爲需要服務的view的id。ViewContribution下可以新建元素action或menu,

原创 視圖開發-排序

1 視圖排序,點擊表頭實現排序自定義的排序器如下public class AddressViewerSorter extends ViewerSorter {private class SortInfo {

原创 視圖開發-快捷鍵、狀態欄、監聽其它workbench

1快捷鍵,以Delete爲例viewer.getControl().addKeyListener(new KeyAdapter() { public void keyReleased(KeyEvent

原创 錯誤The activator * Activator for bundle * is invalid

RCp開發中遇到該錯誤解決辦法:ok, after talking to paul webster on IRC, I found the solution, which was that on the b

原创 Java事件機制

事件源負責產生事件 事件類:定義事件的特徵; 監聽器接口:定義監聽器應該實現的功能; 監聽器:實現監聽器接口,監聽事件的發生並作出響應; 所有的事件類必須繼承Java事件基類,即java.util.

原创 Layout

composite.setLayout(layout); shell.layout();//通知容器開始佈局 1 AbsoluteLayout(默認),必須用setBounds()指定位 2FillL

原创 JFace Viewer

組成:1)模型和元素,模型爲元素的集合;2)內容提供者與標籤提供者;3)控件 ;4)查看器(負責協調前面三個部分)。模型維護的是元素集合,需要自己開發,當模型內容改變時應向外界發出一個"屬性改變"的事件。通