Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Synchronized model instance and text editor(s)(One model instance, several views)
Synchronized model instance and text editor(s) [message #901849] Tue, 14 August 2012 18:40
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 6
Registered: July 2010
Junior Member
Hello,

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!

Kind Regards.
Previous Topic:(Fully)?QualifiedName
Next Topic:parsing DSL in a Java application
Goto Forum:
  


Current Time: Fri Jul 10 06:44:05 GMT 2020

Powered by FUDForum. Page generated in 0.01856 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top