[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Users of Import-Package: org.eclipse.core.runtime

If you have a plug-in which uses the OSGi manifest header Import-Package to access the package org.eclipse.core.runtime (i.e. Import-Package: org.eclipse.core.runtime) then read on.  Otherwise you can disregard this note.  Note that most plug-ins in Eclipse use Require-Bundle instead of Import-Package.  Require-Bundle users can disregard this note.

During the 3.2 development cycle the runtime team has been hard at work splitting up the org.eclipse.core.runtime plug-in into separate plug-ins.  This has resulted in the org.eclipse.core.runtime package being split across three plug-ins (org.eclipse.equinox.common, org.eclipse.equinox.registry and org.eclipse.core.runtime).  As a result if you have a plug-in which simply uses the header "Import-Package: org.eclipse.core.runtime" then you may get wired to any one of the three exporters.  

To remedy this the runtime team has updated the exporters of the split package with a mandatory directive.   The mandatory directive forces importers to specify which plug-in they want the package from (using the bundle-symbolic-name matching attribute).  Bundles which use "Import-Package: org.eclipse.core.runtime" will now be forced to use the complete package as it is exported from org.eclipse.core.runtime.  There may be a few unlikely plug-ins out there that were using "Import-Package: org.eclipse.core.runtime" when only a selected set of the split runtime plug-ins are installed.  This is not common because it would involve a platform that did not include the org.eclipse.core.runtime plug-in.  For example, you may have a platform that only includes the org.eclipse.equinox.common plug-in.  This plug-in exports a part of the org.eclipse.core.runtime bundle.  If you have a plug-in that only requires the common part of the package then you will have to use the following Import-Package header

Import-Package: org.eclipse.core.runtime; bundle-symbolic-name="org.eclipse.equinox.common"

This specifies that you only want the part of the org.eclipse.core.runtime package which is exported by the org.eclipse.equinox.common plug-in.  For more information or to track this issue see https://bugs.eclipse.org/bugs/show_bug.cgi?id=132200