我對Eclipse RCP平臺完全陌生。有沒有例子如何使用比較編輯器?比較編輯器的示例
我已經創建了一個視圖,現在我想添加比較編輯器來比較文本數據。
public class MyView extends ViewPart {
public static final String ID = "rcp.views.myview";
private TreeViewer treeViewer;
public MyView() {
super();
}
@Override
public void createPartControl(Composite parent) {
CompareViewerPane pane = new CompareViewerPane(parent, SWT.BORDER | SWT.FLAT);
//?????????????????
}
@Override
public void setFocus() {
}
}
另請看這裏:http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/guide/compare_beyond.htm。最後,您可能希望使用資源(文件)作爲對象進行比較,因爲這是比較資料用於處理的內容。有關於使用資源的一節:http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/guide/resInt.htm –
感謝您提供有用的信息。 –