Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Correct way to save system property to config.ini?
Correct way to save system property to config.ini? [message #485132] Thu, 10 September 2009 11:16 Go to next message
Eclipse UserFriend
I need to save a property, osgi.nl, to the config.ini file. I can get the
configuration area via Platform.getConfigurationLocation() and manually
read in/edit the config.ini file. However, I was wondering if eclipse had
a framework for saving a system property to this file without manually
editing the file?

Thanks,
Ryan
Re: Correct way to save system property to config.ini? [message #487552 is a reply to message #485132] Wed, 23 September 2009 10:59 Go to previous messageGo to next message
Eclipse UserFriend
Since 3.4, the config.ini file is managed by p2, and it updated
according to the metadata for the things you have installed.

So I guess the "proper" way to do this would be to generate an
Installable Unit (IU) that provides the proper touchpoint advice to set
the property ("setProgramProperty"), and then install that IU into your
eclipse. I'm sure this can all be done programmatically, but you'll
need to dig for the details.

Check out
org.eclipse.equinox.p2.metadata/MetadataFactory and
InstallableUnitDescription which can be used to create an IU.
And get the IDirector service to install your IU using a
ProfileChangeRequest.


http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/p2_overview.htm
http://wiki.eclipse.org/Installable_Units
http://wiki.eclipse.org/Equinox/p2/Customizing_Metadata
http://wiki.eclipse.org/Equinox/p2/Engine/Touchpoint_Instruc tions

Ryan wrote:
> I need to save a property, osgi.nl, to the config.ini file. I can get
> the configuration area via Platform.getConfigurationLocation() and
> manually read in/edit the config.ini file. However, I was wondering if
> eclipse had a framework for saving a system property to this file
> without manually editing the file?
>
> Thanks,
> Ryan
>
Re: Correct way to save system property to config.ini? [message #487572 is a reply to message #487552] Wed, 23 September 2009 11:49 Go to previous message
Eclipse UserFriend
See also this blog post:
http://eclipsesource.com/blogs/2009/05/14/pimp-your-p2-profi le/

-Andrew
Andrew Niefer wrote:
> Since 3.4, the config.ini file is managed by p2, and it updated
> according to the metadata for the things you have installed.
>
> So I guess the "proper" way to do this would be to generate an
> Installable Unit (IU) that provides the proper touchpoint advice to set
> the property ("setProgramProperty"), and then install that IU into your
> eclipse. I'm sure this can all be done programmatically, but you'll
> need to dig for the details.
>
> Check out
> org.eclipse.equinox.p2.metadata/MetadataFactory and
> InstallableUnitDescription which can be used to create an IU.
> And get the IDirector service to install your IU using a
> ProfileChangeRequest.
>
>
> http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/p2_overview.htm
>
> http://wiki.eclipse.org/Installable_Units
> http://wiki.eclipse.org/Equinox/p2/Customizing_Metadata
> http://wiki.eclipse.org/Equinox/p2/Engine/Touchpoint_Instruc tions
>
> Ryan wrote:
>> I need to save a property, osgi.nl, to the config.ini file. I can get
>> the configuration area via Platform.getConfigurationLocation() and
>> manually read in/edit the config.ini file. However, I was wondering
>> if eclipse had a framework for saving a system property to this file
>> without manually editing the file?
>>
>> Thanks,
>> Ryan
>>
Previous Topic:PROBLEM LAUNCHING RCP ... IN LINUX!!
Next Topic:private Xulrunner is not detected
Goto Forum:
  


Current Time: Mon Jun 16 19:24:48 EDT 2025

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

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

Back to the top