Home » Eclipse Projects » Equinox » Strange behavior when specifying config.ini
| |
Re: Strange behavior when specifying config.ini [message #121473 is a reply to message #121465] |
Mon, 24 November 2008 18:30 |
Eclipse User |
|
|
|
Originally posted by: nospam_kowalskilee.gmail.com
Hi Andrew,
Does your phrasing ("whether or not you are using
org.eclipse.equinox.simipleconfigurator") mean that there are scenarios
under which one would not use simpleconfigurator?
If so, do you have a reference where I would be able to read up on that,
or illustrative examples?
Thanks!
Lee Anne
Andrew Niefer wrote:
> I believe the template behaviour for the config.ini is new. You should
> raise a bug on PDE/UI.
>
> You should note in particular whether or not you are using
> org.eclipse.equinox.simpleconfigurator. The simpleconfigurator uses a
> separate file from the config.ini to list out which bundles to install
> and their start levels. It could be there is a bug around this.
>
> -Andrew
>
> Brad wrote:
>> First off, if this in the wrong forum let me know I will repost
>> elsewhere.
>>
>> In my "Run Configurations" with the Eclipse IDE I am specifying a
>> config.ini file to use as a "template" when running my RCP app. I can
>> specify the start levels, etc... using my config file. This has always
>> worked fine up until now. Recently I had the need to add two more
>> plugins to the config file. Let's establish that:
>> 1) You specify your config.ini file within the run configuration
>> 2) When the configuration is run the specified config.ini is either
>> used as a "template" (Their words) or copied into the run
>> configurations specified "configuration" directory. 3) This resultant
>> config.ini file is used to run the application/product.
>>
>> Great. This works fine until I did the following until I added two new
>> plugins to the config.ini.
>>
>> Step 2 above should copy those changes to the generate config.ini. It
>> doesn't. For some reason it ignores ONLY THESE TWO PLUGINS. If I make
>> other changes to the start levels, etc... they ARE PROPAGATED
>> properly. I have already:
>> 1) Ensured I am pointing to the proper config.ini. There is no mistake
>> here.
>> 2) Re-installed eclipse
>> 3) Wiped my workspace and started from scratch
>> 4) And MOST IMPORTANTLY and WEIRD ...Generated a completely new
>> config.ini and set start levels. I did this by having Eclipse
>> "Generate a config.ini with default content". When I run using this
>> setting my missing plugins show in the equinox console, but I
>> obviously can't set my start levels. I then copy the working
>> config.ini, set the start levels, and replace my old config.ini that I
>> specified in my run configuration. In theory this should work. All the
>> paths are correct, but once again, it ignores my two plugins. I am at
>> a loss. Any help is appreciated.
>>
>>
|
|
|
Re: Strange behavior when specifying config.ini [message #121706 is a reply to message #121473] |
Wed, 26 November 2008 19:47 |
Andrew Niefer Messages: 990 Registered: July 2009 |
Senior Member |
|
|
Yes,
When eclipse starts, someone needs to install all the bundles into the
osgi runtime and start them as appropriate.
The most basic way of doing this is to list your bundles on the
"osgi.bundles" property in the config.ini file. However, this quickly
becomes unmanageable.
What you can do instead list a "configurator" bundle on the
osgi.bundles list. Then it is the configurator bundle's job to find and
install bundles into the framework.
Older versions of eclipse used org.eclipse.update.configurator to do
this. And in 3.4 we have a new org.eclipse.equinox.simpleconfigurator.
So there are really 3 cases:
1) no configurator, everything listed on osgi.bundles
2) old org.eclipse.update.configurator
3) new org.eclipse.equinox.simpleconfigurator
I don't have any references handy, but you can see examples by creating
a simple hello world rcp plugin with the new plugin wizard. Create a
product configuration for it and export the product. This should give
you a product that is set up like (1) above. Add
org.eclipse.equinox.simpleconfigurator to the product and you should
then get an exported product like (3).
-Andrew
Lee Anne Kowalski wrote:
> Hi Andrew,
>
> Does your phrasing ("whether or not you are using
> org.eclipse.equinox.simipleconfigurator") mean that there are scenarios
> under which one would not use simpleconfigurator?
>
> If so, do you have a reference where I would be able to read up on that,
> or illustrative examples?
>
> Thanks!
> Lee Anne
>
> Andrew Niefer wrote:
>> I believe the template behaviour for the config.ini is new. You
>> should raise a bug on PDE/UI.
>>
>> You should note in particular whether or not you are using
>> org.eclipse.equinox.simpleconfigurator. The simpleconfigurator uses a
>> separate file from the config.ini to list out which bundles to install
>> and their start levels. It could be there is a bug around this.
>>
>> -Andrew
>>
>> Brad wrote:
>>> First off, if this in the wrong forum let me know I will repost
>>> elsewhere.
>>>
>>> In my "Run Configurations" with the Eclipse IDE I am specifying a
>>> config.ini file to use as a "template" when running my RCP app. I can
>>> specify the start levels, etc... using my config file. This has
>>> always worked fine up until now. Recently I had the need to add two
>>> more plugins to the config file. Let's establish that:
>>> 1) You specify your config.ini file within the run configuration
>>> 2) When the configuration is run the specified config.ini is either
>>> used as a "template" (Their words) or copied into the run
>>> configurations specified "configuration" directory. 3) This resultant
>>> config.ini file is used to run the application/product.
>>>
>>> Great. This works fine until I did the following until I added two
>>> new plugins to the config.ini.
>>>
>>> Step 2 above should copy those changes to the generate config.ini. It
>>> doesn't. For some reason it ignores ONLY THESE TWO PLUGINS. If I make
>>> other changes to the start levels, etc... they ARE PROPAGATED
>>> properly. I have already:
>>> 1) Ensured I am pointing to the proper config.ini. There is no
>>> mistake here.
>>> 2) Re-installed eclipse
>>> 3) Wiped my workspace and started from scratch
>>> 4) And MOST IMPORTANTLY and WEIRD ...Generated a completely new
>>> config.ini and set start levels. I did this by having Eclipse
>>> "Generate a config.ini with default content". When I run using this
>>> setting my missing plugins show in the equinox console, but I
>>> obviously can't set my start levels. I then copy the working
>>> config.ini, set the start levels, and replace my old config.ini that
>>> I specified in my run configuration. In theory this should work. All
>>> the paths are correct, but once again, it ignores my two plugins. I
>>> am at a loss. Any help is appreciated.
>>>
>>>
|
|
|
Re: Strange behavior when specifying config.ini [message #121746 is a reply to message #121706] |
Wed, 26 November 2008 22:23 |
Eclipse User |
|
|
|
Originally posted by: nospam_kowalskilee.gmail.com
Wow, fabulous. Thanks Andrew for that explanation about osgi.bundles vs
simpleconfigurator. Now I understand some of the behaviors I am seeing
when trying to migrate my old 3.3 way of doing things to 3.4.
And thanks for the suggestion about using the hello world rcp to look
into the code. Then I can compare one create in 3.4 to one created in
3.3 and study the differences.
Thanks again,
Lee Anne
Andrew Niefer wrote:
> Yes,
> When eclipse starts, someone needs to install all the bundles into the
> osgi runtime and start them as appropriate.
> The most basic way of doing this is to list your bundles on the
> "osgi.bundles" property in the config.ini file. However, this quickly
> becomes unmanageable.
>
> What you can do instead list a "configurator" bundle on the
> osgi.bundles list. Then it is the configurator bundle's job to find and
> install bundles into the framework.
>
> Older versions of eclipse used org.eclipse.update.configurator to do
> this. And in 3.4 we have a new org.eclipse.equinox.simpleconfigurator.
>
> So there are really 3 cases:
> 1) no configurator, everything listed on osgi.bundles
> 2) old org.eclipse.update.configurator
> 3) new org.eclipse.equinox.simpleconfigurator
>
> I don't have any references handy, but you can see examples by creating
> a simple hello world rcp plugin with the new plugin wizard. Create a
> product configuration for it and export the product. This should give
> you a product that is set up like (1) above. Add
> org.eclipse.equinox.simpleconfigurator to the product and you should
> then get an exported product like (3).
>
> -Andrew
>
|
|
|
Re: Strange behavior when specifying config.ini [message #126178 is a reply to message #121746] |
Fri, 20 February 2009 22:36 |
Brad Messages: 5 Registered: July 2009 |
Junior Member |
|
|
I haven't checked back here in a while since I developed a work around.
FYI, when I export the product (not using the Simple Configurator) my
config.ini file works fine and all plugins start in the specified order.
Thus, I wasn't worried about being able to deliver my software. I just had
to suffer and start the plugins manually, every time I ran my software
through eclipse. Not pleasant, but it worked.
Now I am back.
I tried the simple configurator. I understand the bundles.info file is
responsible for controlling the list of available bundles. It appears the
fields are, in order:
Bundle name, bundle location, start level, and lazy loading
However, this still doesn't solve the fundamental problem of the enormous
pain in the ass it is to manually edit a config file. There is way to much
room for error (mispellings, etc..). It seems to me there are a few ways
to go about accomplishing an easier way for developers to specify the
start levels.
1) Allow developers to set the start level of plugins inside the product
file. That way when the config file, with or without the simple
configurator, is generated, the appropriate start levels can be placed.
(@3:start, etc..)
2) Allow a fragment plugin for the Simple configurator plugin that allows
us to specify the start levels or an entire config file.
Perhaps there is some simple way to do this that I am not aware of, but I
have looked everywhere. With OSGI services becoming more prevalent I
imagine this will become a larger issue. OSGI service plugins are not
started since they provide services only. No plugin uses their code
directly, thus eclipse wont start them. The more I use services the more
unmanigable the config.ini or bundles.inf becomes.
Keep in mind I am not taking anything away from the accomplishments the
developers have made. Great job. But this is one huge consideration that I
hope is being worked on.
|
|
|
Re: Strange behavior when specifying config.ini [message #126256 is a reply to message #126178] |
Mon, 23 February 2009 15:12 |
Andrew Niefer Messages: 990 Registered: July 2009 |
Senior Member |
|
|
Brad,
This is an area that is under current development, and hopefully we
should have something better in place for 3.5M6.
The product editor does now allow you to set start levels as you suggest
in (1). However, I believe the code that currently generates config.ini
and bundles.info for normal export still has to be updated for this.
The other focus here is generating p2 metadata for setting start levels
as p2 automatically manages your bundles.info for you.
There is a wiki here: http://wiki.eclipse.org/Equinox/p2/GeneratingCUs
with some thoughts around this, see also
https://bugs.eclipse.org/bugs/show_bug.cgi?id=265217
For normal product export, this second item would be transparent to the
user and pde/build would take care of it for those who don't want
explicit control over there configuration.
-Andrew
Brad wrote:
> I haven't checked back here in a while since I developed a work around.
> FYI, when I export the product (not using the Simple Configurator) my
> config.ini file works fine and all plugins start in the specified order.
> Thus, I wasn't worried about being able to deliver my software. I just
> had to suffer and start the plugins manually, every time I ran my
> software through eclipse. Not pleasant, but it worked.
> Now I am back.
>
> I tried the simple configurator. I understand the bundles.info file is
> responsible for controlling the list of available bundles. It appears
> the fields are, in order:
> Bundle name, bundle location, start level, and lazy loading
> However, this still doesn't solve the fundamental problem of the
> enormous pain in the ass it is to manually edit a config file. There is
> way to much room for error (mispellings, etc..). It seems to me there
> are a few ways to go about accomplishing an easier way for developers to
> specify the start levels.
> 1) Allow developers to set the start level of plugins inside the product
> file. That way when the config file, with or without the simple
> configurator, is generated, the appropriate start levels can be placed.
> (@3:start, etc..)
>
> 2) Allow a fragment plugin for the Simple configurator plugin that
> allows us to specify the start levels or an entire config file.
> Perhaps there is some simple way to do this that I am not aware of, but
> I have looked everywhere. With OSGI services becoming more prevalent I
> imagine this will become a larger issue. OSGI service plugins are not
> started since they provide services only. No plugin uses their code
> directly, thus eclipse wont start them. The more I use services the more
> unmanigable the config.ini or bundles.inf becomes.
> Keep in mind I am not taking anything away from the accomplishments the
> developers have made. Great job. But this is one huge consideration that
> I hope is being worked on.
|
|
| | |
Goto Forum:
Current Time: Sun Jun 30 04:53:40 GMT 2024
Powered by FUDForum. Page generated in 0.03419 seconds
|