Eclipseのプラグインでカスタムのエディタを作成しました。ツリーエディタ(ツリービューア)形式のXMLをいくつかの属性とともに表示します。残りの属性を表示するために、私はそれを "Properties View"と結びつけようとしていますが、実際に進めることはできません。カスタムXMLエディタへのプロパティビューのアタッチ
How to handle property sheet from customized editor in eclipse plugin development?私はあなたの視聴者がワークベンチ選択に貢献し、エディタで選択されたオブジェクトにIPropertySourceを実装することについて話しています。
私の場合、以下のようにtreeviewer入力で直接ドキュメントオブジェクトを設定しています。
IFileEditorInput editorInput = (IFileEditorInput) getEditorInput();
IFile inputIFile = editorInput.getFile();
File f = new File(inputIFile.getLocation().toString());
try {
doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(f);
}
catch (SAXException | IOException | ParserConfigurationException e) {
e.printStackTrace();
}
//setting root element of doc as input
treeViewer.setInput(doc.getDocumentElement());
ここで、プロパティに貢献するIPropertySourceインターフェイスを実装するオブジェクトは何ですか?
私が正しい方向に行っているか、何かを見逃しているか、それとも完全に間違っているかを教えてください。
これは意味があると思います!
エディタの選択プロバイダとして何を設定していますか? –
私は選択プロバイダーとして 'treeViewer'を設定しています - 'getSite()。setSelectionProvider(treeViewer);' – Hitesh