Theoretical Question [message #713925] |
Tue, 09 August 2011 08:01  |
Eclipse User |
|
|
|
Hi! Sorry for this very theoretical question - the reason for asking it is not relevant and would take too much room here. Maybe it is sufficient to say, I am trying to understand whether Xtext uses the generated Ecore-models, or if they are just a helpful byproduct.
Xtext creates an Ecore-Model when generating artefacts from the defined DSL. Does Xtext internally use this Ecore model for anything directly e.g. for the editor's syntax highlighting etc. or does it use another AST representation?
Thanks!
|
|
|
|
Re: Theoretical Question [message #713949 is a reply to message #713925] |
Tue, 09 August 2011 09:24  |
Eclipse User |
|
|
|
Hi,
Xtext uses the produced model internally, too. E.g. validation errors or
broken cross links are propagated from the so called semantic model
(a.k.a. Ecore model) to the offsets and position in the input document.
Other services like the outline directly show the state of the model (at
least in the default implementation).
Christian is right, the node model is another in-memory representation
of the input document that is used, too. This one contains other
information and works basically as a trace from the text to the semantic
model.
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
On 09.08.11 14:01, mm wrote:
> Hi! Sorry for this very theoretical question - the reason for asking it
> is not relevant and would take too much room here. Maybe it is
> sufficient to say, I am trying to understand whether Xtext uses the
> generated Ecore-models, or if they are just a helpful byproduct.
> Xtext creates an Ecore-Model when generating artefacts from the defined
> DSL. Does Xtext internally use this Ecore model for anything directly
> e.g. for the editor's syntax highlighting etc. or does it use another
> AST representation? Thanks!
>
|
|
|
Powered by
FUDForum. Page generated in 0.03501 seconds