简体   繁体   中英

XText Ecore Model to XText Code

The more I figure out how XText works and what it does the more I like it. I'm using it in several areas of my development and have a feature I'd like to build where I want to programmatically construct an ecore model based on the generated Xtext model for my DSL and then reverse engineer that model back into DSL code. I suppose I could build a code generator for doing this unique to each DSL but it would be great if XText had a generic feature allowing me to take an in memory model of my DSL and generate the DSL code like it nicely does from code to ecore model. Can't find much online and wondering if anyone might be able to help. Thanks! - Duncan Krebs

Please have a look at the chapter on serialization in the reference documentation. It describes exactly what you are looking for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM