2008年3月31日月曜日

RCPにError Logビューを表示する

RCPに標準のError Logビューを表示するには、IPerspectiveFactoryの実装クラスのcreateInitialLayout()メソッドで次のようにする。
Error Logビューはorg.eclipse.pde.runtimeプラグインで定義されているため、プラグインの依存関係にorg.eclipse.pde.runtimeを追加すること。

public class Perspective implements IPerspectiveFactory {
public void createInitialLayout(IPageLayout layout) {
// Error Logビューをパースペクティブに追加する
layout.addView("org.eclipse.pde.runtime.LogView", IPageLayout.BOTTOM, IPageLayout.DEFAULT_VIEW_RATIO, IPageLayout.ID_EDITOR_AREA);
}
}

0 件のコメント: