Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » Query Bundles.info for installed plugin and version
Query Bundles.info for installed plugin and version [message #629564] Tue, 28 September 2010 17:07 Go to next message
Eclipse UserFriend
Originally posted by: MrBob.bob.bob

I'm looking for a simple way using P2 to query whether or not a plugin
is installed, AND if so, what its version is.

The code, will start with only a path to the bundles.info (this is the
one piece of information I have).

Is there a P2 util class to do this? Or can someone point me to some
starter code, or a class to use that will lead me to the right solution.


I suppose, the other option, is to write a little bit of custom java
code to open the file, and directly inspect for the information.
However.. I'd like to use existing API if possible.
Re: Query Bundles.info for installed plugin and version [message #629577 is a reply to message #629564] Tue, 28 September 2010 17:59 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
There are predefined queries as well as a comprehensive query API
available in p2.
- henrik

MrBob <MrBob@bob.bob> wrote:
> I'm looking for a simple way using P2 to query whether or not a plugin
> is installed, AND if so, what its version is.
>
> The code, will start with only a path to the bundles.info (this is the
> one piece of information I have).
>
> Is there a P2 util class to do this? Or can someone point me to some
> starter code, or a class to use that will lead me to the right
> solution.
>
>
> I suppose, the other option, is to write a little bit of custom java
> code to open the file, and directly inspect for the information.
> However.. I'd like to use existing API if possible.


--
- henrik
Re: Query Bundles.info for installed plugin and version [message #629579 is a reply to message #629577] Tue, 28 September 2010 18:11 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: MrBob.bob.bob

Thanks for reply.

Any java package I should specifically start my look at? Is there a wiki
that maybe shows an example of how I might do a query?

Henrik Lindberg wrote:
> There are predefined queries as well as a comprehensive query API
> available in p2.
> - henrik
>
> MrBob <MrBob@bob.bob> wrote:
>> I'm looking for a simple way using P2 to query whether or not a plugin
>> is installed, AND if so, what its version is.
>>
>> The code, will start with only a path to the bundles.info (this is the
>> one piece of information I have).
>>
>> Is there a P2 util class to do this? Or can someone point me to some
>> starter code, or a class to use that will lead me to the right
>> solution.
>>
>>
>> I suppose, the other option, is to write a little bit of custom java
>> code to open the file, and directly inspect for the information.
>> However.. I'd like to use existing API if possible.
>
>
Re: Query Bundles.info for installed plugin and version [message #629613 is a reply to message #629577] Tue, 28 September 2010 22:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: MrBob.bob.bob

Thanks for reply.

Any java package I should specifically start my look at? Is there a wiki
that maybe shows an example of how I might do a query?


Henrik Lindberg wrote:
> There are predefined queries as well as a comprehensive query API
> available in p2.
> - henrik
>
> MrBob <MrBob@bob.bob> wrote:
>> I'm looking for a simple way using P2 to query whether or not a plugin
>> is installed, AND if so, what its version is.
>>
>> The code, will start with only a path to the bundles.info (this is the
>> one piece of information I have).
>>
>> Is there a P2 util class to do this? Or can someone point me to some
>> starter code, or a class to use that will lead me to the right
>> solution.
>>
>>
>> I suppose, the other option, is to write a little bit of custom java
>> code to open the file, and directly inspect for the information.
>> However.. I'd like to use existing API if possible.
>
>
Re: Query Bundles.info for installed plugin and version [message #629614 is a reply to message #629579] Tue, 28 September 2010 22:44 Go to previous message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Sorry for the short answer earlier, I was on a handheld device and did
not have the URL's handly.

The query langugage is called "p2QL", and you can read about it here:
http://wiki.eclipse.org/Query_Language_for_p2

And here is a link to help for the query package:
http://help.eclipse.org/helios/ntopic/org.eclipse.platform.d oc.isv/reference/api/org/eclipse/equinox/p2/query/package-us e.html

And here is a link to help for some predefined queries in QueryUtil:
http://help.eclipse.org/helios/ntopic/org.eclipse.platform.d oc.isv/reference/api/org/eclipse/equinox/p2/query/QueryUtil. html

I hope that helps as starting points.
Regards
- henrik

On 9/28/10 8:11 PM, MrBob wrote:
> Thanks for reply.
>
> Any java package I should specifically start my look at? Is there a wiki
> that maybe shows an example of how I might do a query?
>
> Henrik Lindberg wrote:
>> There are predefined queries as well as a comprehensive query API
>> available in p2.
>> - henrik
Previous Topic:Helios SR1 incompatible?
Next Topic:Need help to get started with p2
Goto Forum:
  


Current Time: Fri Mar 29 00:41:56 GMT 2024

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

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

Back to the top