模式更改后重新生成ecore
我在 xsd 文件中有一个架构。 偶尔会创建新版本的架构,我需要更新我的 .ecore (和 .genmodel)。 如何更新它们,而不删除它们并重新生成它们。 我对ecore做了一些手动修改,我想保留这些修改。
我愿意。
I have a schema in xsd file. once in a while a new version of the schema is created, and I need to update my .ecore (and .genmodel).
How do I update them, without deleting them and re-generate them. I have made some manual modification to the ecore, and i want to keep this modifications.
Ido.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以使用上下文菜单选项重新生成。 保留您的修改:
所有其他内容应合并。 继续实验——这就是版本控制的用途......
You can regenerate using the context menu options. To preserve your modifications:
All other content should be merged. Go ahead and experiment -- that's what version control is for....
对 *.genmodel 使用“重新加载...”操作,根据新版本的 *.xsd 更新 *.ecore。
Use the Reload... action on the *.genmodel to update the *.ecore based on the new version of the *.xsd.
并且不要直接更改 .ecore。 在架构中使用ecore: 注释。 http://www.eclipse.org/modeling/emf/docs/概述/XMLSchemaToEcoreMapping.pdf
And don't change the .ecore directly. Using ecore: annotations in the schema. http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchemaToEcoreMapping.pdf
我从来没有尝试过这个,但是 XSD FAQ 说:
如果我是你,我会尝试一些实验来看看这个过程的效果如何,以及实际的限制是什么。
I've never tried this, but the XSD FAQ says this:
If I were you, I'd try some experiments to see how well this process works, and what the practical limitations are.