2

I have a complete EMF-Metamodell (ecore) created. Now I want to try Code-Generation with Xtext2, because I found somewhere that xtext2 is better for code generation than xpand.

I created a new Project with Eclipse and imported my existing ecore-model. I use the new Project with Xtend to do the code-generation.

  1. I dont like the default convertion to xtext. To many curly braces and other stuff. Can I define somehow how I want it converted?
  2. When I change my Meta-Model (ecore) how can I enforce an update of the xtext file?
  3. Is there a better way to achieve my goals?
4

1 回答 1

0

如果您选择 xtext 作为您的模型到测试生成技术,为什么不使用它也从 ecore 模型生成 xtext 源?这是一种标准的模板方法。

至于在您的分数源更改时强制重新生成,请创建一个 Eclipse 构建器并配置您的 ecore 项目以在项目中的任何资源更改时调用构建。

于 2013-04-19T14:15:18.667 回答