简体   繁体   English

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

[英]Eclipse RCP: Target platform - Eclipse vs. Equinox?

I'm just starting with OSGi and Eclipse RCP. 我刚开始使用OSGi和Eclipse RCP。 Could someone explain to me the difference between "Eclipse" and "Equinox" as the target platform, when creating a new eclipse plugin project? 在创建新的eclipse插件项目时,有人可以向我解释“Eclipse”和“Equinox”作为目标平台之间的区别吗?
I still know that Equinox is Eclipse's implementation of OSGi. 我仍然知道Equinox是Eclipse的OSGi实现。
I read in some articles that eclipse rcp is also based on Equinox. 我在一些文章中读到eclipse rcp也是基于Equinox。 So where is the difference between the target platform you have to choose in a new Eclipse Plugin Project? 那么您必须在新的Eclipse插件项目中选择目标平台之间的区别在哪里?

Best regards 最好的祝福

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

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 选择Eclipse版本:单击下一步后,向导将为您提供“此插件将为UI做出贡献”复选框,并允许您创建富客户端应用程序

Without any other options an Eclipse plugin will have org.eclipse.core.runtime as a required plugin. 没有任何其他选项,Eclipse插件将org.eclipse.core.runtime作为必需的插件。 If you say the plug-in will make contributions to the UI then org.eclipse.ui is added to required plug-ins. 如果您说插件将为UI做出贡献,那么org.eclipse.ui将添加到所需的插件中。 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. 如果您没有选择UI选项,那么您的Activator将扩展插件,如果您选择了UI选项,则您将扩展AbstractUIPlugin。

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. 以任何一种方式创建的bundle都没有什么不同,向导只为您设置一些默认的必需插件/导入的包。 Of course as VonC pointed out some of the dependencies setup by the Eclipse route may not be compatible with other OSGi implementations. 当然,正如VonC所指出的,Eclipse路由设置的某些依赖项可能与其他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 . Eclipse Equinox是Eclipse IDE和Eclipse RCP应用程序所基于的运行时环境
In Eclipse the smallest unit of modularization is a plugin. 在Eclipse中,最小的模块化单元是一个插件。 The terms plugin and bundle are (almost) interchangable. 术语插件和捆绑(几乎)可互换。 An Eclipse plugin is also an OSGi bundle and vice versa. Eclipse插件也是OSGi包,反之亦然。

替代文字

  • bundle for OSGi, able to run in the Equinox framework (within or outside of Eclipse) 用于OSGi的bundle,能够在Equinox框架中运行(在Eclipse内部或外部)
  • plugin for Eclipse, to run within an Eclipse-based application. Eclipse的插件,在基于Eclipse的应用程序中运行。

See Equinox Quick Start Guide : 请参阅Equinox快速入门指南

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. Equinox OSGi框架实现构成了Eclipse RCP和IDE平台的基础,但它实际上是一个完全独立的OSGi实现。

You can run a bundle independently from Eclipse: 您可以独立于Eclipse运行捆绑包:

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

Once this is running you will see an osgi> prompt. 一旦运行,您将看到一个osgi>提示符。 This is the OSGi console waiting for you to type commands 这是OSGi控制台,等待您键入命令

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM