Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » org.eclipse.ui split-package should be exported
org.eclipse.ui split-package should be exported [message #122130] Wed, 03 December 2008 15:42 Go to next message
Marcel Hoetter is currently offline Marcel HoetterFriend
Messages: 28
Registered: July 2009
Junior Member
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 #122144 is a reply to message #122130] Wed, 03 December 2008 16:25 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

I guess org.eclipse.ui.workbench exports with the attribute,
org.eclipse.ui simply re-exports, and org.eclipse.ui.ide exports that
package with no attribute.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Re: org.eclipse.ui split-package should be exported [message #122155 is a reply to message #122144] Thu, 04 December 2008 09:14 Go to previous messageGo to next message
Marcel Hoetter is currently offline Marcel HoetterFriend
Messages: 28
Registered: July 2009
Junior Member
Paul Webster schrieb:
> I guess org.eclipse.ui.workbench exports with the attribute,
> org.eclipse.ui simply re-exports, and org.eclipse.ui.ide exports that
> package with no attribute.

Ah! I did not have org.eclipse.ui.ide in my target platform. I guess i have to stick
with the attribute solution then.

btw: Is there a quick way to list or find all split-parts of a package?
Re: org.eclipse.ui split-package should be exported [message #122168 is a reply to message #122155] Thu, 04 December 2008 09:17 Go to previous messageGo to next message
Marcel Hoetter is currently offline Marcel HoetterFriend
Messages: 28
Registered: July 2009
Junior Member
> btw: Is there a quick way to list or find all split-parts of a package?

Never mind: There is the Eclipse Platform
Map of Platform Plug-ins in the Eclipse help under "Platform Plug-in Developer Guide > Reference >
Other reference information" :)

Thnx Paul
Re: org.eclipse.ui split-package should be exported [message #122209 is a reply to message #122168] Thu, 04 December 2008 14:12 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

I'm not saying that it's correct (I don't understand all of the
implications myself :-)

Simply, when o.e.ui was split into o.e.ui.workbench (for RCP) and
o.e.ui.ide (for IDE since it includes IResources) the API package
org.eclipse.ui was split over the 2 bundles.

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? Well, if you can use the attribute I guess that would still
be do-able (in the RCP case you would know that was what you were trying
to do anyway).

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Re: org.eclipse.ui split-package should be exported [message #122361 is a reply to message #122209] Tue, 09 December 2008 16:58 Go to previous message
Marcel Hoetter is currently offline Marcel HoetterFriend
Messages: 28
Registered: July 2009
Junior Member
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
Previous Topic:Fragment is unable to resolve its host classes
Next Topic:org.eclipse.equinox.http.registry.resources - ability to cache rule
Goto Forum:
  


Current Time: Sun May 29 08:58:45 GMT 2022

Powered by FUDForum. Page generated in 0.01901 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top