[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] How to determine which configuration directory is used by an Eclipse Instance

I did not see a reply to this go by so...

Basically the configuration are IS an Eclipse.  The way things are setup is that you have a mess of bundles in various places and then you have a set of configurations that define (hopefully) consistent/coherent collections of those bundles that go together to solve some problem.  In the default case it *happens* that the configuration location is inside the Eclipse install location but that is more a matter of convenience and history.  For example the new provisioning work will seriously challenge that norm.

As for the getLocation result, the short answer is that you cannot depend on that value.  While in many/most cases it does indeed correspond to the location on disk that holds the associated bundle content, the OSGi spec really makes no statement about the semantics of content of the string.  It is a value assigned by the agent that installed the bundle.  As an example, in normal Eclipse we have two agents that installs, EclipseStarter (in org.eclipse.osgi itself) and Update Configurator.  Each of these uses a different format for the value of the location string.  That will only continue over time.  

In your case, if you are actually reading the state files you really want to get the location information from the BundleData.  The story here may be a little complicated by the use/existance of Adpator hooks (is it StorageHooks that are relevant here) since these hooks can define how things are store/managed on disk.  In any event, this is a very interesting direction and useful thing to explore.  It would be great to have tools for exploring configurations without having to run them.  Please keep pushing in this direction and contribute the tools you create.  We are happy to help where we can so keep asking questions.


Aaron M Cohen <amcohen@xxxxxxxxxx>
Sent by: equinox-dev-bounces@xxxxxxxxxxx

04/05/2007 11:13 AM

Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>

[equinox-dev] How to determine which configuration directory is used by an Eclipse Instance


     I am writing an application to diagnose Eclipse Instances on the
User's computer. I am probing internal state of the configuration directory
since I can gather Bundle Information and find missing dependencies without
starting the Eclipse Instance.  I am interested to know how to determine
which configuration directory is associated with which Eclipse Instance. It
looks like the getLocation() method of the BundleDescriptor returns a path
but its "update@../" which looks like a relative path. So if I can figure
out which eclipse instance used a configuration directory, I may be able to
put the 2 together. However I cannot find any pointer in the configuration
directory back to the Eclipse executable. Do you know of any?


Aaron Cohen
Serviceability and Support Tools Developer
IBM/Rational Software
Email: amcohen@xxxxxxxxxx

equinox-dev mailing list