| how to change the DOM of a StructuredTextEditor [message #644572] |
Mon, 13 December 2010 05:29  |
Alain Messages: 20 Registered: March 2010 |
Junior Member |
|
|
I created a graphical editor with a StructuredTextEditor.
the thing is that i want to change the SSE model managed by the StructuredTextEditor
I can acess the model via :
...
IDocument doc = sourcePage.getDocumentProvider().getDocument(
getEditorInput());
if (doc instanceof IStructuredDocument) {
IStructuredModel model = StructuredModelManager.getModelManager()
.getExistingModelForEdit(doc);
if (model == null) {
model = StructuredModelManager.getModelManager()
.getModelForEdit((IStructuredDocument) doc);
...
My question is how to change this SSE model in order to be able to edit the DOM of another IFILE. so my StructuredTextEditor will not edit the DOM related to the graphical editor. it will edit a new IDOMModel of another IFILE.
I hope my question is clear.
Thanks
|
|
|
| Re: how to change the DOM of a StructuredTextEditor [message #644686 is a reply to message #644572] |
Mon, 13 December 2010 13:58   |
Nick Sandonato Messages: 117 Registered: July 2009 |
Senior Member |
|
|
I'm not sure if I fully understand your question.
The way I'm interpreting it is that you have file A open in your editor, but you want modifications done to the editor to affect file B and not file A. Is that correct?
We don't have any API available to accomplish this, as the model is bound to the editor via doSetInput(). I could see possibly using INodeAdapters to accomplish editing a different DOM, but even then it would require manipulating the file A backing your graphical editor in order to affect file B's DOM.
[Updated on: Mon, 13 December 2010 14:10] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01615 seconds