|Synchronized model instance and text editor(s) [message #901849]
||Tue, 14 August 2012 18:40
| Missing name Mising name
Registered: July 2010
I have to admit I am quite new to Xtext, I have a problem with generating an XText editor from (parts of) an already existing ecore model.
Let me explain the problem using an example:
We have an ecore meta-model 'library.ecore' and a corresponding (standard) tree-editor that is used to edit model instances such as 'mylib1.library'.
Now we would like to offer an additional text editor that allows to work on a "view" of 'mylib1.library'.
In other words, the underlying grammar of the text editor captures only a part of the original ecore meta-model.
Thus, we would like to have two files
'mylib1.library' (<- editing with tree-editor)
'view_on_mylib1.librarydsl' (<- editing with text editor)
These two files should be synchronized, i.e., changes in one file should be visible (after saving) in the other file.
I created an XText grammar using the existing ecore model and adapted the grammar accordingly. However, I don't know how to achieve having the mentioned two representations of one model instance and a synchronization among them.
Thank you very much for your help!
Powered by FUDForum
. Page generated in 0.01856 seconds