Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsUpdate the node model (INode) xText
https://www.eclipse.org/forums/index.php/mv/msg/1092757/1785311/#msg_1785311
I have a question about updating the node model (INode) xText after adding the object in the embedded editor.
However, the findActualNodeFor method returns null because the INode for Parameter1 is not yet created. When I close the Sirius editor and open again, the findActualNodeFor method returns INode.
If I add the same object directly in the xText editor and save the editor, findActualNodeFor also returns INode.
Do you need to update node model the xText after close the embedded editor?
Thanks for every advice.
Martin]]>Martin Jedlicka2018-04-12T10:43:30-00:00Re: Update the node model (INode) xText
https://www.eclipse.org/forums/index.php/mv/msg/1092757/1785419/#msg_1785419
If you make a change on the Xtext side, until it is saved it only exist in the memory of the Xtext editor and Sirius can not know about it. When you save the Xtext file, if Sirius has an opened session with that file loaded it will detect the file has changed on disk and automatically reload it so the change is visible inside the session (if you have Sirius representations opened at the time of reload, they will be refreshed automatically, at least when using the default settings).
If you make a model change in the context of Sirius, the change will only be visible on disk after the session is saved. Whether or not the file change is seen by your Xtext editor is more of an Xtext question.]]>Pierre-Charles David2018-04-13T15:24:17-00:00Re: Update the node model (INode) xText
https://www.eclipse.org/forums/index.php/mv/msg/1092757/1785426/#msg_1785426
Conventional editors tend to be quite good these days at listening to the platform resource changed notifications to reload on change. An embedded editor is more specialized so it may be that the equivalent external observation/response has not been registered. It could work. Use a debugger to see how an Xtext editor updates, then see where the change notification gets lost for your embedded editor.
Regards
Ed Willink
Ed Willink]]>Ed Willink2018-04-13T16:33:20-00:00