加速插件

发布于 2024-10-15 08:07:28 字数 104 浏览 5 评论 0原文

我需要做一个 Eclipse 插件,在其中,我将使用我自己制作的 Acceleo 生成器。 如何在 Eclipse 插件中使用 acceleo 生成器? 有相关的文档吗?

谢谢。

I need to do an Eclipse plug-in and,inside of it, I will use an Acceleo generator made by my self.
How I can use an acceleo generator inside an Eclipse plug-in?
Is there any documentation about it?

Thank you.

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

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

发布评论

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

评论(1

你穿错了嫁妆 2024-10-22 08:07:28

最简单的方法是简单地创建一个新的 Acceleo 项目(文件 > 新建 > 其他... > Acceleo 模型到文本 > Acceleo 项目),因为这些项目已经是插件项目。当您在此项目中编写自己的 Acceleo 模块(mtl 文件)时,您会注意到在它们旁边生成了“java”文件。这些 Java 文件是启动 Acceleo 各代的入口点。

然后,您可以选择如何启动生成:从 Java 文件(实例化生成器,然后从 Eclipse 右键单击​​操作调用其“doGenerate”方法...)。

您可以使用“文件 > 新建 > 其他... > Acceleo 模型到文本 > Acceleo UI 启动器项目”向导来获取启动 Acceleo 模块的右键单击操作的代码示例。

在线文档包含有关这些方面。

The easiest way would be to simply create a new Acceleo project (File > New > Other... > Acceleo Model To Text > Acceleo Project) as these projects are already plug-in projects. As you write your own Acceleo modules (mtl files) within this project, you'll notice that "java" files are generated beside them. These Java files are your entry point in order to launch Acceleo generations.

It is up to you, then, to choose how to launch the generation : from a Java file (instantiate the generator, then call its "doGenerate" method, from an Eclipse right-click action ...).

You can use the "File > New > Other... > Acceleo Model To Text > Acceleo UI Launcher Project" wizard in order to get a code example for a right-click action launching an Acceleo module.

The online documentation contains some information on these aspects.

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