简体   繁体   English

XText Ecore模型到XText代码

[英]XText Ecore Model to XText Code

The more I figure out how XText works and what it does the more I like it. 我越了解XText的工作原理和作用,我就越喜欢它。 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. 我在开发的多个领域中都使用了它,并具有一个我想构建的功能,该功能可以基于为我的DSL生成的Xtext模型以编程方式构造一个ecore模型,然后将该模型反向工程回DSL代码。 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. 我想我可以构建一个代码生成器来完成每个DSL所独有的工作,但是如果XText具有通用功能允许我采用自己的DSL内存模型并生成DSL代码,就像从代码到ecore所做的那样,那将很棒。模型。 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. 它准确地描述了您要寻找的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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