具有多个插件的 Eclipse 3.7 RCP 应用程序

发布于 2025-01-07 21:18:01 字数 1171 浏览 2 评论 0原文

制作“为插件做好准备”的 RCP 应用程序的正确方法是什么?我一直在努力实现这个基本概念,并试图在 Eclipse 3.7(最新的 3.x 版本)中实现这一点。

第 1 步

我想通过使用 3 个 Eclipse 插件项目来探索这一点: •HelloWorldRCP •HelloWorldPluginA • HelloWorldPluginB

用所有常见的东西制作HelloWorldRCP 是否有意义,例如带有编辑菜单(包括剪切、复制和粘贴菜单项)的菜单栏? HelloWorldPluginA 可以添加一个名为“Alpha”的附加菜单项,HelloWorldPluginB 可以添加另一个名为“Beta”的菜单项吗?但是,剪切、复制和粘贴功能仍然可以在插件 A 和 B 中使用吗?

第 2 步

接下来,我如何将其部署为“产品”?我已经创建了一个新的产品配置,并定义了所创建的默认运行时配置的依赖项。我确实注意到其中包含很多依赖项 jar,但我认为我没有使用它们。例如,据我所知,我没有使用数据绑定,但它不断作为必需的依赖项出现。

我去出口| Eclipse 产品和可执行环境在我想要的文件夹中创建。但是,当我将其复制到另一台计算机时,它似乎一直引用原始计算机的 Java 安装位置。如何解决这个问题?

我尝试将 jre 与产品导出捆绑在一起,但没有创建任何内容。我也刚刚尝试将 jre6 复制为 jre 文件夹。这似乎确实有效。

下一个问题是 32/64 位 Java 执行环境。这里有什么建议?我的目标是只在 32 位上构建,然后希望它能在 32 或 64 位平台上运行。这是正确的吗?

第 3 步

我现在需要通过网络启动此操作。使用startup.jar 启动Eclipse 3.5 应用程序的旧方法已经改变。我现在使用 equinox 启动器并在 jnlp 而不是startup.jar 中引用它。但是,我不断收到一个似乎与 32/64 位春分 win32_64 jar 有关的异常。我注意到导出写入的是一个文件夹而不是一个 jar。我在某处读到这是一个“聪明的技巧”,可以兼容 32 位和 64 位运行时环境。

这里的问题是我需要一个 jar 而不是文件夹,以便我可以签署所需的 jar 并进行相应的部署。

有人有 Eclipse 3.7 RCP 应用程序的 Java Web-start 示例吗?或者有什么建议吗?

What is the right way to make an RCP application that is “ready for plugins”? I have struggled to do this basic concept and am trying to accomplish this in Eclipse 3.7 (latest 3.x version).

Step 1

I would like to explore this by using 3 eclipse plugin projects:
• HelloWorldRCP
• HelloWorldPluginA
• HelloWorldPluginB

Would it make sense to make HelloWorldRCP with all the common things such as a menu-bar with an Edit menu including cut, copy and paste menu items? The HelloWorldPluginA could add an additional menu-item called “Alpha” and HelloWorldPluginB could add yet another menu-item called “Beta”? However, the cut, copy and paste functionality could still work within Plugin A and B?

Step 2

Next, how do I deploy this as a “product”? I have made a new product configuration and defined the dependencies from the default runtime configuration that was made. I do notice that there are a lot of dependency jars that are included, but I don’t think I use them. For example, I don’t use data-binding to my knowledge, but it keeps coming up as a required dependency.

I go to Export | Eclipse Product and an executable environment is created in my desired folder. However, when I copy this to another machine it seems to keep referencing the original machines Java installation location. How does one get around this?

I have tried to bundle a jre with the Product Export but nothing is created. I have also just tried copying my jre6 as a jre folder. This does seem to work.

Next problem here is the 32/64 bit Java execution environments. What is advised here? I have been aiming to build on 32 bit only and then hopefully that will run on 32 or 64bit platforms. Is this correct?

Step 3

I need to web-start this now. The old way of initiating an Eclipse 3.5 application, using a startup.jar has changed. I now use the equinox launcher and reference it in the jnlp instead of the startup.jar. However, I keep getting an exception which seems related to the 32/64 bit equinox win32_64 jar. I notice that the export writes a folder and not a jar. I read somewhere that this is a “clever trick” to allow compatibility for both 32 and 64bit runtime environments.

The problem here is that I need a jar and not a folder so that I can sign the jars required and deploy accordingly.

Does anyone have a Java Web-start example for and Eclipse 3.7 RCP application? Or any advice?

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

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

发布评论

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

评论(1

痴情 2025-01-14 21:18:01

您将需要大量时间来学习您在这里询问的所有内容。

这是最好的起点之一... http://www.vogella.com/eclipse.html

该网站涵盖了很多基础知识。但你需要的不仅仅是基础知识。

具有您需要的一些功能的工作 RCP 产品的最佳示例可以在... http ://max-server.myftp.org/trac/mp3m

这个人 (Kai) 通过 SVN 提供所有源代码,并且他的应用程序中包含一些非常高级的内容。他还有一个很好的博客,其中包含一些高级 RCP 提示和技巧。 http://www.toedter.com/blog/

您需要调查的另一件事是第谷。我意识到您没有提到任何有关构建应用程序的内容,但我发现使用 Tycho 进行构建使我最近尝试的 Eclipse RCP 比我之前完成的 RCP 工作好 100 倍。所以,我的建议是,了解第谷。 http://wiki.eclipse.org/Tycho/Reference_Card

Eclipse RCP 的学习曲线有点陡峭,但我认为这是值得的。

祝你好运!

You are going to need a lot of time to learn everything you've asked about here.

Here is one of the best places to start... http://www.vogella.com/eclipse.html

That site covers a lot of basics. But you need a little more than basics.

The best example of a working RCP product with some of the features you require can be found at ... http://max-server.myftp.org/trac/mp3m

This guy (Kai) makes all of the source code available via SVN, and he has some very advanced stuff going on in his application. He also has a good blog with some advanced RCP tips and tricks. http://www.toedter.com/blog/

Another thing you'll want to investigate is Tycho. I realize that you didn't mention anything about building your application, but I've found that using Tycho for building has made my most recent foray into Eclipse RCP 100 times better than the other times I've done RCP work. So, my advice, get to know Tycho. http://wiki.eclipse.org/Tycho/Reference_Card

The learning curve of Eclipse RCP is somewhat steep, but I think it's worth the effort.

Good Luck!

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