Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse RCP: Target platform - Eclipse vs. Equinox?

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

like image 261
Marc-Christian Schulze Avatar asked Sep 12 '10 15:09

Marc-Christian Schulze


People also ask

What is Eclipse target platform?

The target platform refers to the Eclipse product (for example, Eclipse RCP, Lotus Notes®, or Lotus® Expeditor Client) against which the plug-in you are developing will be compiled and tested. By default the target platform is Rational® SDP itself, therefore no configuration is necessary for Eclipse RCP.

What is org Eclipse Equinox?

In computing, Equinox is a sub-project of the Eclipse project that provides a certified implementation of the OSGi R4. x core framework specification. It is a module runtime that allows developers to implement an application as a set of "bundles" using the common services infrastructure.

Where is target in Eclipse?

Using a target platform. You can activate and switch the target platform in the Eclipse Preferences. Select Window Preferences Plug-in Development Target Platform.

How do I reload target platform in Eclipse?

Window > Preferences... > Plug-in Development > Target Platform preference page allows you to manage a set of target definitions and select one as the active target platform.


2 Answers

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.

like image 125
rancidfishbreath Avatar answered Sep 22 '22 12:09

rancidfishbreath


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

  • Vogalla's RCP Tutorial
  • Vogella's OSGi with Eclipse Equinox

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

like image 22
VonC Avatar answered Sep 20 '22 12:09

VonC