Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Fun with fragments...
Fun with fragments... [message #836981] Thu, 05 April 2012 05:44
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
[Forwarded to this group after getting no feedback after two days from
e.p.rcp, in particular because the described problem looks pde-related]

I'm observing unexpected compile behaviour for my "home-brewed"
bundle/fragment pair, I'm working with Eclipse 3.7.2 64-bit Classic
with an x86 JRE set.

a) I have a very simple host bundle, let's name it abc, with the

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-Vendor: %Bundle-Vendor
Bundle-SymbolicName: abc;singleton:=true
Bundle-Version: 1.0.0.-SNAPSHOT
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: org.eclipse.swt,
Bundle-ActivationPolicy: lazy
Eclipse-ExtensibleAPI: true
Export-Package: abc

Please note that the host bundle itself has no sources, because the
complete implementation is provided by a single fragment (This is very
similar to the swt bundle). It nonetheless exports package "abc",
because that is the public API expected to be published by the fragment.

b) I have also written a corresponding fragment restricted for
win32-win32-x86, the is defined:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-Vendor: %Bundle-Vendor
Bundle-SymbolicName: abc.win32.win32.x86;singleton:=true
Bundle-Version: 1.0.0.-SNAPSHOT
Fragment-Host: abc
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-PlatformFilter: (& ( (osgi.os=win32) (osgi.arch=x86))
Eclipse-BundleShape: dir
Import-Package: org.eclipse.swt.internal.ole.win32,
Export-Package: abc,

This fragment bundle contains all the code, in particular the public API
within package abc.

If I have this bundle+fragment as a project in my Eclipse IDE,
everything is fine, which means that any depending plugins (using an
import directive), can resolve the "abc" package.

But when I set a target platform, which contains above bundle plus the
fragment and if I remove the aforementioned projects from the Eclipse
workspace, the expected package resolution does not succeed. I already
tried reloading the target-platform, cleaning the dependent projects
etc. This behaviour differs from all other (non-fragment) bundles that
are part of the target platform.

Does anyone have an idea what is going wrong here? (Let me repeat that I
have checked that the Java-runtime set matches the target platform
requirements, thus it is also an x86 JRE).

Any launcher based on the bundle+fragment starts and uses the
bundle+fragment successfully, so I'm yet not observing any runtime
problems. The real problem for me is, that all developers working at the
dependent bundles have also to ensure that they have the bundle+fragment
project in their workspace. Now, for swt a similar procedure is not
required, even though the architecture is quite similar. Is there
something wrong with any of the's or could that be an
Eclipse-PDE defect?

I would appreciate any suggestions!

Thanks & Greetings from Bremen,

Daniel Krügler
Previous Topic:Creating plugin in eclipse
Next Topic:Taking into account a new version of a plugin
Goto Forum:

Current Time: Sat Jul 22 15:05:26 GMT 2017

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

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