我有一个 metamodel.ecore
,我从 genmodel
文件生成它的 Model Code(右键单击 metamodel.genmodel
==> 选择生成模型代码);
但是,一些附加文件(plugin.xml
、plugin.properties
和 build.properties
)是在代码生成期间创建的。由于我只需要模型代码用于我的特殊用途(例如,我不想将我当前的项目转换为插件项目),我想阻止生成这些文件。
有什么简单的方法吗?
最佳答案
打开 properties View ,选择 genmodel 中的根元素。您需要在您的 genmodel 中进行以下更改:
- 将 All/Bundle Manifest 设置为
false
。它将阻止生成 MANIFEST.MF。 - 将模型/模型插件 ID 设置为空字符串或使用属性 View 右上角名为“恢复默认值”的按钮将其设置为
null
。它将阻止生成文件plugin.xml
、plugin.properties
和build.properties
。 - 将 Template & Merge/Update Classpath 设置为
false
。这是可选的,但对于您的用例,您可能希望 EMF 停止弄乱您的.classpath
文件。
关于eclipse-emf-ecore - 自定义 genmodel 不创建 plugin.xml、plugin.propeties 和 build.properties,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29767823/