Skip to main content



      Home
Home » Eclipse Projects » Equinox » How To: Get full path from a BundleDescriptor
How To: Get full path from a BundleDescriptor [message #71150] Mon, 31 July 2006 15:45 Go to next message
Eclipse UserFriend
I am writing a tool that analyzes another Eclipse OSGI runtime

When i read the remote BundlesDescriptors[] I get the following

initial@reference:file:plugins/org.eclipse.update.configurator_
3.2.0.v20060605.jar/
update@plugins/com.myCompany.native.win32.win32.x86_1.0.0/

How to I transform the getLocation() into a File() that would point either
to the JAR or the directory ?

I cannot resolve them locally as the OSGI level I am running in is not the
one I am getting the info from...

******************

I know it seems I can get around using Bundle and FileLocator...
But I cannot see if I can get my BundleDescriptor to give me the Bundle...
And the thing , again :) is that my code is not running in the same OSGI
layer as the one I am connecting to :)

--
Christophe Elek
Re: How To: Get full path from a BundleDescriptor [message #71487 is a reply to message #71150] Thu, 03 August 2006 14:54 Go to previous messageGo to next message
Eclipse UserFriend
Hi Chris,

There is no way to get that information from the State API. The
resolver state does not care about the bundle file at all. It only
provides an API to the metadata from the bundle manifest file
(META-INF/MANIFEST.MF)

Why do you need access to the actual local file? This type of
information is not stored in the state, instead it is stored in the
..bundledata file. There currently is no API to read this data. If you
really need this information then it will require some new code that can
read the bundle data file from a configuration that we are not running from.

Tom.

P.S. maybe you need to reopen the bug you closed about this topic and
ask for a mechanism to read the bundle data ;-) I am very reluctant to
add real API for this but right now I do not even see an easy way to do
this with internal classes.
Re: How To: Get full path from a BundleDescriptor [message #71543 is a reply to message #71487] Fri, 04 August 2006 09:04 Go to previous messageGo to next message
Eclipse UserFriend
Tom Watson <tjwatson@us.ibm.com> wrote in news:eatgpt$hkk$1
@utils.eclipse.org:

> Why do you need access to the actual local file?

Hey Tom,
We, the PDE team and other teams are trying to see if we can 'remotely
manage' or at least 'remotely query' an eclipse based install.
The ultimate goal would be for an Admin to 'monitor' the 2000 eclipse based
product in its company and see if they are 'healthy' or not :)

So we I can get the BundleDescriptor and from them, query the 'file
system' of the remote eclipse to see if there is any issue... that would
help the overall vision :)

Makes sense ? Still think I need to open the bug or should I talk to the
PDE team first?

--
Christophe Elek
Complex and difficult problem resolution specialist
IBM Software Groupe - Support
Eclipse Project - Update Core
Re: How To: Get full path from a BundleDescriptor [message #71562 is a reply to message #71543] Fri, 04 August 2006 09:59 Go to previous message
Eclipse UserFriend
> Makes sense ? Still think I need to open the bug or should I talk to the
> PDE team first?
>

Talk to the PDE team first if you like, but ...

We should probably move this discussion back to the bug report
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=152345) and CC the PDE
team members you want in on the discussion.

Tom
Previous Topic:Configuration Admin service usage example
Next Topic:Why we need to use ServiceFactory?
Goto Forum:
  


Current Time: Sun May 11 07:25:20 EDT 2025

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

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

Back to the top