[英]How to generate java code from MoDisco java model within eclipse?
I started looking into MoDisco . 我开始研究MoDisco 。 So far I can discover a java model from an existing java project and write transformations using ATL to modify my java model.
到目前为止,我可以从现有的Java项目中发现一个Java模型,并使用ATL编写修改我的Java模型的转换。 However I was unable to generate java code for that modified java model.
但是,我无法为该修改后的Java模型生成Java代码。 In this demo there is java code generated from a modified model.
在这个演示中,有一个从修改后的模型生成的Java代码。 An Acceleo launch configuration called
JPAProject_Regeneration
is used for that as can be seen in this screenshot: 在此屏幕快照中可以看到一个称为
JPAProject_Regeneration
的Acceleo启动配置:
Does anyone know how that launch configuration looks like? 有人知道启动配置的样子吗? Is there a tutorial that explains the creation of this launch configuration?
有没有教程说明此启动配置的创建?
The mentioned launch configuration can be found in the eclipse svn . 提到的启动配置可以在eclipse svn中找到 。 However it isn't that helpful, because it heavily depends on a very specific local setup that includes hard coded absolute paths.
但是,它没有帮助,因为它在很大程度上取决于一个非常特定的本地设置,其中包括硬编码的绝对路径。
MoDisco also provides a discoverer in the plugin org.eclipse.gmt.modisco.java.generation
. MoDisco还在
org.eclipse.gmt.modisco.java.generation
插件中提供了发现程序。 However this discoverer is registered under the wrong extension point and therefore unavailable from within the UI. 但是,此发现程序注册在错误的扩展点下,因此在UI内不可用。 See the filed bug .
参见提起的错误 。
Also note that once the discoverer is registered correctly it is only applicable if the java model is within a file ending with .javaxmi
. 还要注意,一旦发现程序正确注册,它仅在java模型位于以
.javaxmi
结尾的文件中时才适用。
EDIT: 编辑:
The whole plugin org.eclipse.gmt.modisco.java.generation
seems deprecated, because there is a new API for discovery. 整个插件
org.eclipse.gmt.modisco.java.generation
似乎已被弃用,因为有一个新的发现API。 I built a new plugin that does the same as the mentioned MoDisco plugin based on the new API. 我基于新API构建了一个新插件,其功能与上述MoDisco插件相同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.