Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to find dependencies of plug-in?
How to find dependencies of plug-in? [message #332818] Mon, 10 November 2008 17:54 Go to next message
Sudarsha Wijenayake is currently offline Sudarsha WijenayakeFriend
Messages: 6
Registered: July 2009
Junior Member
Hello,

Could someone tell me how to programmatically find the dependencies
(required plug-ins) of a plug-in (say org.eclipse.ui for instance)?

I tried using class org.osgi.framework.Bundle, but still have had no luck.

Thanks in advance!

Sudarsha Wijenayake
Re: How to find dependencies of plug-in? [message #332826 is a reply to message #332818] Mon, 10 November 2008 21:15 Go to previous messageGo to next message
Duncan Krebs is currently offline Duncan KrebsFriend
Messages: 79
Registered: July 2009
Member
I looked around for you seems like you want to take a look at
Bundle.getHeaders() as I think there is a header that specifies the list
of dependent plugins declared in the plugin's MANIFEST.
http://www.ibm.com/developerworks/library/os-eclipse-bundlem gmt/index.html
has a table of headers and the Require-Bundle is the header that I think
should contain that information. Hope that helps. - Duncan
Re: How to find dependencies of plug-in? [message #332869 is a reply to message #332818] Tue, 11 November 2008 18:28 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
You need to work with BundleDescription objects. And then use
StateHelper which has a number of interesting methods.

To get BundleDescription objects, you will need to use the PlatformAdmin
service. The easiest way to get the service is
Platform#getPlatformAdmin().
Then you need the State (PlatformAdmin#getState()), the state has
State#getBundle(long) iwhere you can pass in your Bundle#getBundleId().

-Andrew
Sudarsha Wijenayake wrote:
> Hello,
>
> Could someone tell me how to programmatically find the dependencies
> (required plug-ins) of a plug-in (say org.eclipse.ui for instance)?
>
> I tried using class org.osgi.framework.Bundle, but still have had no luck.
>
> Thanks in advance!
>
> Sudarsha Wijenayake
>
>
Previous Topic:Delete/Purge old plugins
Next Topic:Question about IAutoEditStrategy
Goto Forum:
  


Current Time: Thu Jul 18 01:07:00 GMT 2024

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

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

Back to the top