简体   繁体   English

我可以在没有相对路径的情况下在 project.ecore 中引用 java.ecore 吗? 但改用模块引用?

[英]Can I reference java.ecore in project.ecore without relative path? but use module references instead?

In our Project we are using Acceleo to generate Java code from our eCore Models.在我们的项目中,我们使用 Acceleo 从我们的 eCore 模型生成 Java 代码。

We have created a file called "java.ecore" which contains java standards that we are using (eg java.io.Closeable)我们创建了一个名为“java.ecore”的文件,其中包含我们正在使用的 Java 标准(例如 java.io.Closeable)

Now if I want to create a Class in the project specific "project.ecore" which implements Closeable, I can reference the "java.ecore" like so:现在,如果我想在实现 Closeable 的项目特定的“project.ecore”中创建一个类,我可以像这样引用“java.ecore”:

<eClassifiers xsi:type="ecore:EClass" name="ProjectClass" eSuperTypes="relative/path/to/java.ecore#//io/Closeable" />

The part relative/path/to/ gives me a headache. relative/path/to/这部分让我很头疼。

As we are using the "java.ecore" in different places in our multi-module project, I would like to avoid using a relative path and instead place the "java.ecore" in a separate module and reference this module through some dependency defined in the Acceleo plugin (or similar).由于我们在多模块项目的不同位置使用“java.ecore”,我想避免使用相对路径,而是将“java.ecore”放在单独的模块中,并通过定义的某些依赖项引用该模块在 Acceleo 插件(或类似插件)中。

Is this possible?这可能吗?

您希望将 URI 与 platform:/resource 和/或 platform:/plugin 方案一起使用。

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

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