Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Sorting a list of bundles, based on the dependencies between them
Sorting a list of bundles, based on the dependencies between them [message #1010979] Mon, 18 February 2013 15:46 Go to next message
Cristian Spiescu is currently offline Cristian SpiescuFriend
Messages: 100
Registered: July 2009
Senior Member
Hello,

My plugin declares an extension point, used by various plugins. I would like to sort these contributing plugins, based on the dependencies between them. I.e. plugins on which others depend: at the beginning of the list; plugins that don't have dependencies: at the end.

E.g.:
PluginA depends on PluginB that depends on PluginC
PluginD has no dependencies

I would like to have them in the order: C, B, A, D.

I guess that this kind of sorting of the plugins is done by osgi as well, when it starts them, in order to ensure that when a plugin is started, for sure the plugins on which it depends are already started.

Have you got some pointers on how to achieve this?

Thank you in advance.

Best regards,
Cristian.
Re: Sorting a list of bundles, based on the dependencies between them [message #1011865 is a reply to message #1010979] Wed, 20 February 2013 11:49 Go to previous messageGo to next message
Libor Jelinek is currently offline Libor JelinekFriend
Messages: 143
Registered: January 2012
Location: Prague, Czech Rep.
Senior Member

Hello,
I'm not aware about any way to get this kind of "dependency list" from
Equinox runtime. But you may prefer graphical visualization of
dependency using e..g
http://www.eclipse.org/pde/incubator/dependency-visualization/. Though
it is in "incubation" phase for many years, I am its long time happy user.

--
Have a nice day!
Libor Jelinek
http://devblog.virtage.com/libor-jelinek/

On 18.2.2013 16:46, Cristian Mising name wrote:
> Hello,
>
> My plugin declares an extension point, used by various plugins. I would
> like to sort these contributing plugins, based on the dependencies
> between them. I.e. plugins on which others depend: at the beginning of
> the list; plugins that don't have dependencies: at the end.
>
> E.g.:
> PluginA depends on PluginB that depends on PluginC
> PluginD has no dependencies
>
> I would like to have them in the order: C, B, A, D.
>
> I guess that this kind of sorting of the plugins is done by osgi as
> well, when it starts them, in order to ensure that when a plugin is
> started, for sure the plugins on which it depends are already started.
>
> Have you got some pointers on how to achieve this?
>
> Thank you in advance.
>
> Best regards,
> Cristian.
Re: Sorting a list of bundles, based on the dependencies between them [message #1011887 is a reply to message #1011865] Wed, 20 February 2013 12:33 Go to previous message
Cristian Spiescu is currently offline Cristian SpiescuFriend
Messages: 100
Registered: July 2009
Senior Member
Hello Libor,

Thanks for your reply.

It seems like a great starting point for what I want to achieve.

The reason behind wanting to get the list is that my plugins expose web plugins, that are loaded dynamically on a web page. These web plugin may depend upon each other, and I'd like to initialize them in a decent order. I.e. a plugin upon which other depends => gets loaded before the ones that depend on it.

Regards,
Cristian.
Previous Topic:p2 eclipse.publish.featuresAndBundles does not ignor .svn files
Next Topic:Question about the OSGI console commands: packages& bundle
Goto Forum:
  


Current Time: Thu Mar 28 17:20:12 GMT 2024

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

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

Back to the top