我可以通过将 ECore 模型导入其他模型来重用它们吗?

发布于 2025-01-07 10:01:05 字数 149 浏览 2 评论 0原文

我有多个用于不同目的的 Ecore 文件。我现在正在开发一个使用多个模型的工具。

我可以开发引用其他模型的 ECore 模型吗?例如,当我有 A.Ecore 和 B.Ecore 时,如何创建 C.Ecore,其中我具有 A.Ecore 或 B.Ecore 类型的属性?

I have multiple Ecore files for different purposes. I am now developing a tool which uses multiple models.

Can I develop an ECore model which references other models? For example when I have A.Ecore and B.Ecore, how can I create a C.Ecore, in which I have attributes with types from A.Ecore or B.Ecore?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

小猫一只 2025-01-14 10:01:05

要从一个 Ecore 模型引用另一个模型:

  1. 在 Ecore 模型编辑器中打开需要添加引用的模型。在您的示例中,打开文件 C.ecore
  2. 右键单击编辑器中的顶部项目。在下面的示例中,您将单击
    platform:/resource.../webpage.ecore item.Sample Ecore model
  3. 选择“加载” Resource”,然后浏览工作区以查找要包含的 Ecore 文件。在您的示例中,打开文件 A.ecoreB.ecore

To reference one Ecore model from another:

  1. Open the model needing the added reference in the Ecore model editor. In your example, open the file C.ecore.
  2. Right click on the top item in the editor. In the below example, you would click on the
    platform:/resource.../webpage.ecore item.Sample Ecore model
  3. Select "Load Resource", then browse the workspace to find the Ecore file you want to include. In your example, open the file A.ecore or B.ecore.
傲影 2025-01-14 10:01:05

在 ECore 编辑器中加载资源可以让您导入其他模型。加载后,其他模型中的类型可以在第一个模型中使用。

Loading a resource in the ECore editor lets you import other models. Once loaded, the types from other model can be used in the first model.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文