如何从eclipse中的MoDisco java模型生成java代码? [英] How to generate java code from MoDisco java model within eclipse?

查看:264
本文介绍了如何从eclipse中的MoDisco java模型生成java代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始研究中找到。但是这并不有用,因为它很大程度上取决于一个非常具体的本地设置,包括硬编码的绝对路径。



MoDisco还在插件中提供了一个发现者 org.eclipse.gmt.modisco.java.generation 。但是,这个发现者注册在错误的扩展点上,因此在UI中不可用。请参阅提交的错误



另请注意,一旦发现者注册正确,仅适用于Java模型在以 .javaxmi 结尾的文件中。



编辑:

整个插件 org.eclipse.gmt.modisco.java.generation 似乎不推荐使用,因为有一个新的API用于发现。我建立了一个新的插件,这个插件基于新的API,与所提到的MoDisco插件一样。


I started looking into MoDisco. So far I can discover a java model from an existing java project and write transformations using ATL to modify my java model. However I was unable to generate java code for that modified java model. In this demo there is java code generated from a modified model. An Acceleo launch configuration called JPAProject_Regeneration is used for that as can be seen in this screenshot:

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. 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. However this discoverer is registered under the wrong extension point and therefore unavailable from within the 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.

EDIT:
The whole plugin org.eclipse.gmt.modisco.java.generation seems deprecated, because there is a new API for discovery. I built a new plugin that does the same as the mentioned MoDisco plugin based on the new API.

这篇关于如何从eclipse中的MoDisco java模型生成java代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆