Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » What is the best way to diagnose an Eclipse instance from an external java/eclipse application.
What is the best way to diagnose an Eclipse instance from an external java/eclipse application. [message #84115] Thu, 15 March 2007 19:59 Go to next message
Aaron Cohen is currently offline Aaron CohenFriend
Messages: 21
Registered: July 2009
Junior Member
I am creating an application to diagnose an eclipse instance. I want to
look for bundles that were not resolved. I am considering three
different approaches and I am interested to know which one the Equinox
community suggest?

1) Use a StateObjectFactory to read the ".state" from the
org.eclipse.osgi directory in the configuration.

2) Launch the OSGI instance with a generated configuration.

3) Launch Eclipse using EclipseStarter where the startup method returns
the BundleContext.

I need my application to work with both Eclipse 3.2 and 3.3. Currently I
am having trouble with the first option and Eclipse 3.3.
Re: What is the best way to diagnose an Eclipse instance from an external java/eclipse application. [message #84130 is a reply to message #84115] Thu, 15 March 2007 20:58 Go to previous messageGo to next message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 333
Registered: July 2009
Location: Ottawa
Senior Member
I would recommend option 1 since it does not try to run the system you are
trying to diagnose, thus avoiding any perturbation to it. The problem with
option 2 is that you will run osgi with a given configuration but the state
will point at what's in the running system.

Which problems do you have?
The state reading and writing code should be pretty standalone, however due
to changes in the format of the state between 3.2 and 3.3 your tool would
have to use the appropriate version of equinox to read the state.

Also when you have that done, we would be really glad if you could
contribute it back to the community as this thing is generally usefull.

Thx

PaScaL

the problem with option 2 and 3 are that it
"Aaron Cohen" <amcohen@us.ibm.com> wrote in message
news:etc8jc$b8$1@utils.eclipse.org...
>I am creating an application to diagnose an eclipse instance. I want to
>look for bundles that were not resolved. I am considering three different
>approaches and I am interested to know which one the Equinox community
>suggest?
>
> 1) Use a StateObjectFactory to read the ".state" from the org.eclipse.osgi
> directory in the configuration.
>
> 2) Launch the OSGI instance with a generated configuration.
>
> 3) Launch Eclipse using EclipseStarter where the startup method returns
> the BundleContext.
>
> I need my application to work with both Eclipse 3.2 and 3.3. Currently I
> am having trouble with the first option and Eclipse 3.3.
Re: What is the best way to diagnose an Eclipse instance from an external java/eclipse application. [message #84160 is a reply to message #84130] Fri, 16 March 2007 02:47 Go to previous messageGo to next message
Christophe Elek is currently offline Christophe ElekFriend
Messages: 21
Registered: July 2009
Junior Member
"Pascal Rapicault" <pascal_rapicault@ca.ibm.com> wrote in news:etcc3j$ivl$1
@utils.eclipse.org:

> the problem with option 2 and 3 are that it

you missed th erest of the sentence :)

Aaron,
Case number #1 (i do not like it but..)
We start using osgi 3.3, if this fails we send a return code to our luncher
nad we try with osgi 3.2

case #2 (not sure if this will work)
When we know the location of the eclipse we want to diagnose, we somhow
launch an RCP using the OSGI of that location
This is also your case #2, now Pascal could help us understand how easy or
not it is to generate a config.ini on the fly, pointing to the bundle we
bring as well as the OSGI bundle of the target eclipse, yet preventing
disturbing the eclipse we are debugging..

--
Christophe Elek
Serviceability Architect
IBM Software Group - Rational
Re: What is the best way to diagnose an Eclipse instance from an external java/eclipse application. [message #84227 is a reply to message #84160] Fri, 16 March 2007 15:43 Go to previous messageGo to next message
Pascal Rapicault is currently offline Pascal RapicaultFriend
Messages: 333
Registered: July 2009
Location: Ottawa
Senior Member
If you know where the plugins are located on disk and you have access to the
config.ini, you could determine which version of osgi you deal with, load it
as a regular jar (not running it) and use the state reader from here.

Now that I have stepped back from the details of your questions, it seems to
me that you would really want to take a close look at the work that Ikuo has
been doing on the org.eclipse.equinox.frameworkadmin API / service
(http://wiki.eclipse.org/index.php/Equinox_FrameworkAdmin) and maybe extend
/ fix this to do what I was describing above. Also note that even though
this is a service it can be used in a non-osgi based java program
( http://wiki.eclipse.org/index.php/Using_FrameworkAdmin_from_ Java_programs).

PaScaL

"Christophe Elek" <Christophe.Elek@gmail.com> wrote in message
news:Xns98F4E7D6AE0C9celekcaibmcom@206.191.52.34...
> "Pascal Rapicault" <pascal_rapicault@ca.ibm.com> wrote in
> news:etcc3j$ivl$1
> @utils.eclipse.org:
>
>> the problem with option 2 and 3 are that it
>
> you missed th erest of the sentence :)
>
> Aaron,
> Case number #1 (i do not like it but..)
> We start using osgi 3.3, if this fails we send a return code to our
> luncher
> nad we try with osgi 3.2
>
> case #2 (not sure if this will work)
> When we know the location of the eclipse we want to diagnose, we somhow
> launch an RCP using the OSGI of that location
> This is also your case #2, now Pascal could help us understand how easy or
> not it is to generate a config.ini on the fly, pointing to the bundle we
> bring as well as the OSGI bundle of the target eclipse, yet preventing
> disturbing the eclipse we are debugging..
>
> --
> Christophe Elek
> Serviceability Architect
> IBM Software Group - Rational
>
Re: What is the best way to diagnose an Eclipse instance from an external java/eclipse application. [message #84257 is a reply to message #84227] Fri, 16 March 2007 20:21 Go to previous message
Christophe Elek is currently offline Christophe ElekFriend
Messages: 21
Registered: July 2009
Junior Member
"Pascal Rapicault" <pascal_rapicault@ca.ibm.com> wrote in
news:etedvr$ih1$1@utils.eclipse.org:

> If you know where the plugins are located on disk and you have access
> to the config.ini, you could determine which version of osgi you deal
> with, load it as a regular jar (not running it) and use the state
> reader from here.

Oh, gotcha, we find the osgi jar, load it using our file classloader and
use the API on the jar... k, we'll try that

> Now that I have stepped back from the details of your questions, it
> seems to me that you would really want to take a close look at the
> work that Ikuo has been doing on the
> org.eclipse.equinox.frameworkadmin API / service
Ok, we will look at that too, thanks ... :)


--
Christophe Elek
Serviceability Architect
IBM Software Group - Rational
Previous Topic:Logging ?
Next Topic:Newbie OSGi Question
Goto Forum:
  


Current Time: Sat Apr 20 01:58:48 GMT 2024

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

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

Back to the top