org.eclipse.ui split-package should be exported [message #122130] |
Wed, 03 December 2008 10:42  |
Eclipse User |
|
|
|
I think i stumbled upon a problem with the org.eclipse.ui split-package.
This package is included in the org.eclipse.ui.workbench plug-in and exported
with the "ui.workbench=split" attribute.
This sees to be ok.
However, the org.eclipse.ui package is NOT listed under the Export-Package header of the
org.eclipse.ui plug-in Manifest.mf. Hence, one cannot access the org.eclipse.ui package
with a simple "Import-Package: org.eclipse.ui".
Access is only possible by adding the org.eclipse.ui plug-in as Required-Bundle or by importing the
package with the ui.workbench=split attribute.
I think this is a bug and maybe other packages should be listed in the Export-Package header as
well.
Could someone please confim this? I will open a bug, then.
|
|
|
|
|
|
|
Re: org.eclipse.ui split-package should be exported [message #122361 is a reply to message #122209] |
Tue, 09 December 2008 11:58  |
Eclipse User |
|
|
|
Paul Webster schrieb:
> From your investigation, I guess that there's no way to use
> Import-Package: org.eclipse.ui in an RCP app that doesn't include
> o.e.ui.ide?
There is a way to do this:
One may create a custom plug-in for one's RCP app that
simply has a dependency to the org.eclipse.ui plug-in and that itself
reexports the org.eclipse.ui package (In other words, simply copy what
the org.eclipse.ui.ide plugin does in it's Manifest.mf). Other plug-ins can then use this exported
package with a simple Import Package: org.eclipse.ui and this approach is also
compatible with the "Automated Management of Dependencies" feature.
However, in my opinion, providing the "ui.workbench=split" attribute to the
import of org.eclipse.ui is much cleaner.
The drawback is that the attribute has to be added (at least once) manually and is not supported by
the "Automatic Dependency Management" feature.
In the case someone who reads this needs more info:
Take a look at the OSGi 4.1 reference sections
3.5.4 "Import Package Header"
3.5.5 "Export Pacakge Header"
3.6.5 "Attribute Matching
3.13.3 "Split Package Compatibility"
This really is necessary to understand how split-packages work (is not that hard ;)
Also read Eclipse Bug #134083 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=134083) to get some
background info about why split packages and attriutes are organized like they are in Eclipse.
Last but not least, take a look at the Eclipse help under "Platform Plug-in Developer Guide >
Reference > Other reference information" to find out which packages are split over which plug-ins.
MH
|
|
|
Powered by
FUDForum. Page generated in 0.04362 seconds