Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 110013

Summary: Fragments manifest should support dependencies on fragments
Product: [Eclipse Project] Equinox Reporter: Daniel Krügler <daniel.kruegler>
Component: FrameworkAssignee: equinox.framework-inbox <equinox.framework-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: gunnar, pascal, pwebster
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Daniel Krügler CLA 2005-09-20 09:58:18 EDT
It seems that currently only plugins (and not other fragments) are valid
dependencies in fragment manifests. While this behaviour seems reasonable on the
first sight, its also an annoying limitation.

Consider a patch is needed for the Spinner widget from org.eclipse.swt, which
must access a Spinner method of package visibility. Currently this is not
solvable by means of the fragment approach. Reason is, that Spinner itself is
defined inside a fragment, namely in the package org.eclipse.swt.widgets from
the fragment org.eclipse.swt.win32.win32.x86.

Now, although I can construct a fragment with the following manifest

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %fragment.name
Bundle-Vendor: %provider.name
Bundle-SymbolicName: de.bdal.org.eclipse.swt.patch; singleton:=true
Bundle-Version: 1.0.0
Fragment-Host: org.eclipse.swt;bundle-version="3.1.0"
Bundle-Localization: plugin
Export-Package: org.eclipse.swt.widgets
Require-Bundle: org.eclipse.swt

this is not enough for creation of an exportable RCP app. Following the
discussion from thread "Export problems (fragment related)" in the
eclipse.platform.rcp newsgroup the only actual limitation is that I cannot
express org.eclipse.swt.win32.win32.x86 as a requirement for this fragment (The
editor forbids this). Because this dependency is missing I cannot export the
RCP product, because resolving the dependency to org.eclipse.swt.win32.win32.x86
fails. But interestingly the plugin-dependency view of the PackageExplorer does
list org.eclipse.swt.win32.win32.x86, so the such provided fragment compiles
successfully (and runs successfully if started by the run configuration).
Comment 1 Thomas Watson CLA 2006-04-10 14:45:23 EDT
It is now possible for a fragment to "require" another fragment.  You must use the new generic matching headers from bug 123707.

In this case the org.eclipse.swt.win32.win32.x86 bundle need to describe a generic capability header

Eclipse-GenericCapabilty: win32.win32.x86:swt-platform-fragment

And your swt fragment would have the following generic requirement header specifying that it required the capability from the org.eclipse.swt.win32.win32.x86 fragment.

Eclipse-GenericRequire: win32.win32.x86:swt-platform-fragment

This is just an example, you may be able to come up with better names for the capabilities.

*** This bug has been marked as a duplicate of 123707 ***