You have, as always, a number of options, depending on your requirements.
- use Runtime Preferences to save to a PreferenceStore with a suitable PreferenceInitializer. Large enough and extensive API, in which a lot of thought. By default, preferences do not apply to the user or administrator, so you will need to do some work to open the preferences page or write to the properties file.
For less advanced / less work, especially if you don't have access to eclipse settings (e.g. OSGi on the server side):
- set as a system property in RCP.ini. Unchanged by the user after starting, access to the RCP.ini file (eclipse.ini) is required, which may be possible, especially if you do not contribute to the IDE.
- set as a system property, as an argument in a shortcut. Depends on the user using the shortcut. A custom shortcut must be created during installation.
If accessibility from the file system is really important, I would consider using one of the above methods to set the etc directory, and let your packages generate default property files in the etc directory if they are not on top for the first time. This essentially collapses your own preference store, so if you have a package of access settings, you might be better off doing this. This rather old User Settings FAQ may also be useful.
I really remember Erich Gamma (as in an interview with the Gang of Four and the JDT Technical lead) in which he says that there are about seven different preference mechanisms, and he never knew which one to use.
jamesh
source share