Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 15:16 Go to next message
Ryan is currently offline RyanFriend
Messages: 74
Registered: July 2009
Location: Indiana
Member
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 14:59 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
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 15:49 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
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: Wed Apr 24 16:54:43 GMT 2024

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

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

Back to the top