|Re: IXtextDocument.modify consumes all preceding white space [message #893388 is a reply to message #893057]
||Tue, 03 July 2012 19:28
| Alexander Nittka
Registered: July 2009
internally there is the semantic model and the node model. Usually you are interested in the semantic model as it holds the typed model elements with its features. In that model information about hidden terminals (white spaces, comments etc.) is lost.
The node model contains the entire textual model file in a structured form, so that serialising the model again will result something that looks like what you started out with (in particular after changes in the model not caused by simple typing, like refactorings or application of quick fixes).
The semantic and the node model have a tight connection and the contract is that hidden terminals (e.g. white spaces) are associated with the semantic model element immediately following them.
So if you have the greetings example
the line break and space after foo! are already "part" of the second greeting.
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to email@example.com
[Updated on: Tue, 03 July 2012 19:29]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02808 seconds