3

現在、DOT-Graphs を表示する Eclipse プラグインを開発しています。この目的のために、私はこのプラグインを利用します。しかし、作成したグラフを実際に表示する方法がわかりません。Eclipseウィンドウの真ん中にエディタとして表示したいです。

これを行うために、プラグインによって提供される DotGraphView を利用するために、 createPartControl(Composite) コードにコードを必要とするカスタム Editor クラスを作成しました。

問題は、この DotGraphView をどのように表示できるかということです。私のエディタのコードは次のようになります。

@Override
public void createPartControl(Composite container) {
    DotImport importer = new DotImport(TEST_GRAPH);
    Graph graph = importer.newGraphInstance();
    DotGraphView dotGraphView = new DotGraphView();
    dotGraphView.setGraph(graph);

    // add dotGraphView as a child to container and display it
    // What todo here?
}
4

1 に答える 1