Way to retrieve the bundles with provides a capability from BundleRequirement

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Way to retrieve the bundles with provides a capability from BundleRequirement

Lars Vogel-2
Friends of Equinox,

in PDE we have this "Add required" button which allows adding the
bundle requirements to a launch configuration and the product.

Currently is is implemented for required bundles and imported
packages. Equinox provides very simple API for that:

BundleSpecification requiredBundle;
BaseDescription bd = requiredBundle.getSupplier();


Do you have something similar for retrieving the bundles which
provides a capability (provide-capability)?

I found BundleRequirement but see now way to retrieve bundles which
seems to model "require-capability" but was unable to determine the
API to find suppliers.

Best regards, Lars


--
Eclipse Platform UI and e4 project co-lead
CEO vogella GmbH

Haindaalwisch 17a, 22395 Hamburg
Amtsgericht Hamburg: HRB 127058
Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
USt-IdNr.: DE284122352
Fax (040) 5247 6322, Email: [hidden email], Web: http://www.vogella.com
_______________________________________________
equinox-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev
Reply | Threaded
Open this post in threaded view
|

Re: Way to retrieve the bundles with provides a capability from BundleRequirement

Thomas Watson
This is all getting a bit fuzzy for me because PDE is still using the old Equinox resolver API which the framework no longer actually uses at runtime.  But if I recall correctly Require-Capability reqs are modelled with the org.eclipse.osgi.service.resolver.GenericSpecification interface which has a getSuppliers() method.  The reason for it being plural is because require-capability may specify a cardinality of multiple so they can be 'wired' to more than one supplier at a time.  Also see org.eclipse.osgi.service.resolver.BundleDescription.getGenericRequires()

HTH

Tom





From:        Lars Vogel <[hidden email]>
To:        Equinox development mailing list <[hidden email]>
Date:        12/20/2016 07:54 AM
Subject:        [equinox-dev] Way to retrieve the bundles with provides a        capability from BundleRequirement
Sent by:        [hidden email]




Friends of Equinox,

in PDE we have this "Add required" button which allows adding the
bundle requirements to a launch configuration and the product.

Currently is is implemented for required bundles and imported
packages. Equinox provides very simple API for that:

BundleSpecification requiredBundle;
BaseDescription bd = requiredBundle.getSupplier();


Do you have something similar for retrieving the bundles which
provides a capability (provide-capability)?

I found BundleRequirement but see now way to retrieve bundles which
seems to model "require-capability" but was unable to determine the
API to find suppliers.

Best regards, Lars


--
Eclipse Platform UI and e4 project co-lead
CEO vogella GmbH

Haindaalwisch 17a, 22395 Hamburg
Amtsgericht Hamburg: HRB 127058
Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
USt-IdNr.: DE284122352
Fax (040) 5247 6322, Email: [hidden email], Web:
http://www.vogella.com
_______________________________________________
equinox-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev



_______________________________________________
equinox-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/equinox-dev