Access to xtext semantic model [message #1453726] |
Mon, 27 October 2014 11:35 |
Eclipse User |
|
|
|
Hi all,
As I understand xtext always has two models:
1) syntax model - grammar
2) semantic model - derived model from syntax
In my application I want to give an access to modify semantic model from different editors (properties view, custom editors, etc). All this changes should be applied on the text as well.
Here I see two ways:
1) Write transformator from semantic model to syntax (grammar model). And after each modification generate new text presentation. (how to save formatting user?)
2) Build all editors on syntax model (apply modifications on syntax) and use semantic only for view.
I think this case is very common. How everyone solves this?
---
Thanks,
Igor
|
|
|
|
Re: Access to xtext semantic model [message #1454248 is a reply to message #1454052] |
Tue, 28 October 2014 06:07 |
Eclipse User |
|
|
|
Thanks for reply.
I will check org.eclipse.xtext.ui.editor.model.IXtextDocument.modify. But package looks strange for me, xtextDocument will be accessible only with opened editor? Because I want modify model without xtext editor.
|
|
|
Powered by
FUDForum. Page generated in 0.02233 seconds