Eclipse RCP:目标平台 - Eclipse 与 Equinox?

发布于 2024-09-18 14:34:15 字数 234 浏览 7 评论 0原文

我刚刚开始使用 OSGi 和 Eclipse RCP。 在创建新的 Eclipse 插件项目时,有人可以向我解释一下作为目标平台的“Eclipse”和“Equinox”之间的区别吗?
我仍然知道 Equinox 是 Eclipse 对 OSGi 的实现。
我在一些文章中看到eclipse rcp也是基于Equinox的。那么,您在新的 Eclipse 插件项目中必须选择的目标平台之间的区别在哪里?

最诚挚的问候

I'm just starting with OSGi and Eclipse RCP.
Could someone explain to me the difference between "Eclipse" and "Equinox" as the target platform, when creating a new eclipse plugin project?
I still know that Equinox is Eclipse's implementation of OSGi.
I read in some articles that eclipse rcp is also based on Equinox. So where is the difference between the target platform you have to choose in a new Eclipse Plugin Project?

Best regards

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

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

发布评论

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

评论(2

檐上三寸雪 2024-09-25 14:34:15

选择“OSGi 框架”:
这只是创建一个新的包,没有必需的插件或导入的包(除非您选择激活器,在这种情况下 org.osgi.framework 包显示在导入的包下)。

选择 Eclipse 版本:
单击“下一步”后,向导会显示“此插件将为 UI 做出贡献”复选框,并允许您创建富客户端应用程序,

无需任何其他选项,Eclipse 插件将 org.eclipse.core.runtime 作为必需插件。如果您说该插件将对 UI 做出贡献,那么 org.eclipse.ui 将被添加到所需的插件中。如果您想创建一个富客户端应用程序,则最终屏幕上的模板会有所不同,您必须选择一个来完成。此外,如果您没有选择 UI 选项,您的 Activator 将扩展 Plugin;如果您选择了 UI 选项,您的 Activator 将扩展 AbstractUIPlugin。

以这两种方式创建的捆绑包没有什么不同,向导只是为您设置一些默认所需的插件/导入的包。当然,正如 VonC 指出的,Eclipse 路径设置的一些依赖项可能与其他 OSGi 实现不兼容。

Choosing "an OSGi framework":
This simply creates a new bundle with no required plug-ins or imported packages (unless you choose an activator in which case the org.osgi.framework package shows up under imported packages).

Choosing Eclipse version:
After clicking next the wizard gives you the checkbox "This plug-in will make contributions to the UI" and allows you to create a rich client application

Without any other options an Eclipse plugin will have org.eclipse.core.runtime as a required plugin. If you say the plug-in will make contributions to the UI then org.eclipse.ui is added to required plug-ins. By saying you want to create a rich client application the Templates are different on the final screen and you are forced to choose one to finish. Also your Activator will extend Plugin if you did not choose the UI option and AbstractUIPlugin if you did choose the UI option.

There is nothing different about the bundles that are created in either manner, the wizard just sets up some default required plug-ins/imported packages for you. Of course as VonC pointed out some of the dependencies setup by the Eclipse route may not be compatible with other OSGi implementations.

决绝 2024-09-25 14:34:15

它与您要创建的模块的运行环境有关:请参阅

Eclipse Equinox 是 Eclipse IDE 和 Eclipse RCP 应用程序所基于的运行时环境
在 Eclipse 中,模块化的最小单元是插件。术语“插件”和“捆绑包”(几乎)可以互换。 Eclipse 插件也是一个 OSGi 包,反之亦然。

alt text

  • OSGi 捆绑包,能够在 Equinox 框架(Eclipse 内部或外部)中运行
  • Eclipse 插件,可运行在基于 Eclipse 的应用程序中。

请参阅 Equinox 快速入门指南

Equinox OSGi 框架实现构成了 Eclipse RCP 和 IDE 平台的基础,但它实际上是一个完全独立的 OSGi 实现。

您可以独立于 Eclipse 运行捆绑包:

java -jar org.eclipse.osgi_3.2.0.jar -console

一旦运行,您将看到一个osgi>提示。这是等待您输入命令的 OSGi 控制台

It is about the environement in which the module you will be creating will run: see this

Eclipse Equinox is the runtime environment on which the Eclipse IDE and Eclipse RCP application are based.
In Eclipse the smallest unit of modularization is a plugin. The terms plugin and bundle are (almost) interchangable. An Eclipse plugin is also an OSGi bundle and vice versa.

alt text

  • bundle for OSGi, able to run in the Equinox framework (within or outside of Eclipse)
  • plugin for Eclipse, to run within an Eclipse-based application.

See Equinox Quick Start Guide:

The Equinox OSGi framework implementation forms the underpinnings of the Eclipse RCP and IDE platforms but it is in fact a fully standalone OSGi implementation.

You can run a bundle independently from Eclipse:

java -jar org.eclipse.osgi_3.2.0.jar -console

Once this is running you will see an osgi> prompt. This is the OSGi console waiting for you to type commands

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