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


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 updated the exporters of the split package with the mandatory directive "bundle-symbolic-name".  See https://bugs.eclipse.org/bugs/show_bug.cgi?id=132200 for more information.  Unfortunately this forces importers to be tightly coupled to a specific bundle which exports the org.eclipse.core.runtime package.  To allow for loose coupling when using Import-Package we have updated the mandatory directives again for the split package org.eclipse.core.runtime.  See https://bugs.eclipse.org/bugs/show_bug.cgi?id=134083 for more information


Here are the different Import-Package statements you can use to access the different parts of the split package:

## to import only the content from the org.eclipse.equinox.common bundle
Import-Package: org.eclipse.core.runtime; common="split"


## to import only the content from the org.eclipse.equinox.registry bundle
Import-Package: org.eclipse.core.runtime; registry="split

## to import the complete package from the org.eclipse.core.runtime bundle
Import-Package: org.eclipse.core.runtime

Tom