|
|
Re: Editing XText DSL code from GUI? [message #1711573 is a reply to message #1711560] |
Sat, 17 October 2015 16:04 |
|
Hi Larry,
you can programatically parse an Xtext model, query/modify the AST and save it again. The AST is basically just Java Beans, so any GUI technology will work.
The fact that the AST is EMF-based is only important if you integrate with other EMF-based technologies like Sirius graphical editors or EMF forms.
Cheers,
Stefan
|
|
|
|
Re: Editing XText DSL code from GUI? [message #1711617 is a reply to message #1711585] |
Sun, 18 October 2015 12:28 |
|
Hi Larry,
why would you want to edit the file from two applications at the same time? Why not have your special (form based?) editor inside the IDE? If you edit from two applications, then of course they will go out of synch.
The AST is serialized as text that conforms to your grammar.
There is a nice, short blog post showing how to parse files in a standalone application. The second paragraph is the more interesting.
Apart from that you should just start coding a little, that will make things much clearer and will allow us to answer more concrete questions.
Cheers,
Stefan
|
|
|
|
Re: Editing XText DSL code from GUI? [message #1711665 is a reply to message #1711634] |
Mon, 19 October 2015 07:32 |
|
Quote: I'm still wondering if there XText artifacts offer an API for this.
You use the load/save methods of the Xtext resource. The parser/serializer do all the work for you. Your form just changes the AST like it were simple Java Beans.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05007 seconds