| "Show In Design" action from SSE XML Editor [message #767751] |
Sun, 18 December 2011 16:15  |
Roded Bahat Messages: 152 Registered: August 2011 |
Senior Member |
|
|
Hi,
I'm working on a "Show In Design" action via the Web Tools SSE right click menu.
The plan is to set the focus on a certain Sapphire ModelElement node in the tree when user the user right clicks an XML node in the document source and clicks the action.
I was wondering if there was an simple way to find a certain ModelElement in the Sapphire editor from the XML's org.w3c.dom.Node object.
Hoping to avoid traversing trees and searching for nodes manually if possible.
Thanks,
Roded
|
|
|
|
|
|
|
| Re: "Show In Design" action from SSE XML Editor [message #771240 is a reply to message #771175] |
Mon, 26 December 2011 13:46   |
Roded Bahat Messages: 152 Registered: August 2011 |
Senior Member |
|
|
Very cool.
Though when running the following, null is returned as the resourceStore.
Anything else I should know?
ReportEditor editor = (ReportEditor)page.getActiveEditor();
final MasterDetailsEditorPage reportDesignFormPage = (MasterDetailsEditorPage)editor.getPage("Design");
final MasterDetailsContentOutline content = reportDesignFormPage.getContentTree();
IReport reportModelElement = (IReport)content.getRoot().getModelElement();
XmlEditorResourceStore resourceStore = reportModelElement.adapt(XmlEditorResourceStore.class);
Thanks a lot
[Updated on: Tue, 27 December 2011 06:30] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02214 seconds