如何使用 Eclipse 安装之外的工作空间调用无头 EMF 生成器?

发布于 2024-08-02 06:54:42 字数 654 浏览 3 评论 0原文

我正在尝试使用批处理文件和无头命令生成 EMF Genmodel 的编辑和编辑器代码。

这是我的批处理代码:

cd\
cd C:\eclipse

eclipsec -noSplash -data "C:\Dokumente und Einstellungen\milan\Desktop\SHK\workspaceGalileoTRUNK" -application org.eclipse.emf.codegen.ecore.Generator -edit -editor foo.bar.xy/model/Petrinet.genmodel -forceOverwrite

参考 EMF Book 和之前的尝试,这应该是正确的命令。但是当我尝试执行该命令时,我收到 FileNotFound 异常,因为他正在以下路径中搜索 genmodel 文件:

C:\eclipse\foo.bar.xy\model\Petrinet.genmodel

似乎 eclipse 或 emf 生成器忽略了我的工作空间的路径。我不明白这一点,也无法解决它。

有人知道如何正确调用这一代吗?我应该从哪里开始寻找错误?或者这可能是新 emf 版本的错误?

(我确信这个命令以前有效)

谢谢!

I am trying to generate the edit and the editor code of a EMF Genmodel using a batch file and the headless command.

Here is my batch code:

cd\
cd C:\eclipse

eclipsec -noSplash -data "C:\Dokumente und Einstellungen\milan\Desktop\SHK\workspaceGalileoTRUNK" -application org.eclipse.emf.codegen.ecore.Generator -edit -editor foo.bar.xy/model/Petrinet.genmodel -forceOverwrite

Referring to the EMF Book and previous trys, this should be the correct command. But when i am trying to execute the command, i get a FileNotFound Exception because he is searching the genmodel file in the following path:

C:\eclipse\foo.bar.xy\model\Petrinet.genmodel

It seems eclipse or the emf generator ignore the path to my workspace. I don't understand this and i cannot get it fixed.

Does anybody got a clue how to invoke this generation correctly? Where should i start to look for errors? Or may this be a bug of the newer emf version?

(I am sure that this command worked before)

Thank you!

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

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

发布评论

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

评论(1

沦落红尘 2024-08-09 06:54:42

好吧,这很奇怪。当我使用模型的绝对路径时,它可以工作。

eclipsec -noSplash -data "C:\Dokumente und Einstellungen\milan\Desktop\SHK\workspaceGalileoTRUNK" -application org.eclipse.emf.codegen.ecore.Generator -edit -editor "C:\Dokumente und Einstellungen\milan\Desktop\SHK\workspaceGalileoTRUNK\foo.bar.xy\model\Petrinet.genmodel" -forceOverwrite

不知何故,EMF 的文档是错误的。仍在寻找逻辑解释。

Okay, this is strange. When I use an absolute path to the model it works.

eclipsec -noSplash -data "C:\Dokumente und Einstellungen\milan\Desktop\SHK\workspaceGalileoTRUNK" -application org.eclipse.emf.codegen.ecore.Generator -edit -editor "C:\Dokumente und Einstellungen\milan\Desktop\SHK\workspaceGalileoTRUNK\foo.bar.xy\model\Petrinet.genmodel" -forceOverwrite

Somehow the documentation of the EMF is wrong. Still looking for a logic explanation.

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