Community
Participate
Working Groups
Build Identifier: 20110916-0149 In the manifest of org.eclipse.swtbot.eclipse.gef.finder replace the import of packages org.eclipse.ui and org.eclipse.ui.part with a dependency from plug-in org.eclipse.ui. Both packages are defined as split packages and thus require the presence of both plug-ins org.eclipse.ui and org.eclipse.ui.ide. This is usually not the case in a RCP scenario. Reproducible: Always Steps to Reproduce: 1. Set up a target platform with only RCP plug-ins and SwtBot plug-ins. 2. 3.
I simply remove the import to org.eclipse.ui.part. Code compiles and all tests succeed :) See http://git.eclipse.org/c/swtbot/org.eclipse.swtbot.git/commit/?id=d2f6f1115cd3e04f61be18f38ccd04fe1281792a
Didn't work for me. I had to remove the import to package org.eclipse.ui as well, and had to add the required plug-in org.eclipse.ui.
Hum I am not sure to fully understand. We use package dependencies and not plug-ins, and I am not confident to mix depencencie kind is a good thing. BTW org.eclipse.swtbot.eclipse.ui plugin imports as well org.eclipse.ui package so you should have the same problem for that plug-in ?
The problem is that both packages org.eclipse.ui and org.eclipse.ui.part are declared as split packages in plug-in org.eclipse.ui.workbench: org.eclipse.ui.part;ui.workbench=split;mandatory:="ui.workbench", and org.eclipse.ui.part;ui.workbench=split;mandatory:="ui.workbench", OSGi requires a second plug-in to export these packages when resolving the imported packages. See also this thread: http://eclipsesource.com/blogs/2009/07/14/why-i-cant-recommend-using-import-package/ I can't comment on the plug-in org.eclipse.swtbot.eclipse.ui. I installed "SWTBot for GEF Testing" that does not contain that plug-in.
(In reply to comment #4) > The problem is that both packages org.eclipse.ui and org.eclipse.ui.part are > declared as split packages in plug-in org.eclipse.ui.workbench: > > org.eclipse.ui.part;ui.workbench=split;mandatory:="ui.workbench", > > and > > org.eclipse.ui.part;ui.workbench=split;mandatory:="ui.workbench", > > OSGi requires a second plug-in to export these packages when resolving the > imported packages. See also this thread: > > http://eclipsesource.com/blogs/2009/07/14/why-i-cant-recommend-using-import-package/ > > > I can't comment on the plug-in org.eclipse.swtbot.eclipse.ui. I installed > "SWTBot for GEF Testing" that does not contain that plug-in. Thanks for the link, I have already have been hit by eclipse platform legacy hacks, but was not aware of the split nightmare. So here is a workaround we could try: Change the import to : Import-Package: org.eclipse.ui; ui.workbench="split" And export ourselve an org.eclipse.ui split mock package to force OSGi resolution. Does it sound reasonable and could work ?
That seems to work. I added Import-Package: org.eclipse.ui; ui.workbench="split", org.eclipse.ui.part; ui.workbench="split" to the manifest of org.eclipse.swtbot.eclipse.gef.finder and Export-Package: org.eclipse.ui, org.eclipse.ui.part to the manifest of org.eclipse.swtbot.eclipse.finder