Initializing Configuration Scope Prefs from outside Eclipse [message #464150] |
Mon, 26 February 2007 17:48 |
Eclipse User |
|
|
|
Originally posted by: tizzo.computer.org
I am trying to determine the best way to initialize some preferences that
are determined at installation time for an RCP application I'm working on.
I want the preferences to be stored at Configuration scope (so that all
users of the application share the same information). From what I can
tell, the configuration scope preferences are stored in a file called
eclipse/configuration/.settings/<pluginID>.prefs. The file seems to be a
simple text file with a format similar to an INI file, with a series of
<name>=<pair> items. To be sure, when I create this file manually and
specify my desired preferences in it, and then try to access those
preferences from within my application by looking them up in the
configuration scope, I get what I'm expecting. I'm really just concerned
that this may not be the cleanest way to do this. The Eclipse
documentation does not even seem to mention the .prefs files at all, so I
would assume that they are subject to change in future versions (IE the
name, format, and location of the prefs files are certainly not part of
the public API of the Preferences service).
I have looked into using the plugin_customization.ini file, but this file
needs to be bundled in my plugin's jar file before deployment, and I'm
trying to set variables whose values are dependent on the deployment
environment, and are not determined until installation time.
Can anyone tell me whether writing my own .prefs file at application
installation time is a "correct" technique, and if not, can you suggest an
alternative? Thank you.
Tony
|
|
|
Powered by
FUDForum. Page generated in 0.05945 seconds