Page 1 of 1

Preference store in Eclipse version

Posted: Fri May 04, 2012 10:37 am
by SSC
Hi,

I´d like to change the default Preferences of the Eclipse version of Oxygen 13.2.
When I looked at your obfuscated code of a PreferencePage I recognized that you use an own mechanism to store your preferences.
Where do I find the file, which stores the values of the Settings in the Preferences in order to change them?

Best regards,

Simon

Re: Preference store in Eclipse version

Posted: Fri May 04, 2012 10:53 am
by Radu
Hi Simon,

Our internal preferences are stored in a custom structure resembling a map.

The standalone version of Oxygen stores the internal preferences as an XML file in a special folder in the user home.

The Eclipse version of Oxygen stores the same XML content (serialized from our internal map) using the IPreferenceStore with the following key:

1) For XML Author: Author_Options_Tag
2) For XML Editor: oXygen_Options_Tag

So if from your plugin you read that key from the IPreferenceStore you will obtain the serialized XML content of our options but modifying and setting it back will not work unless the Oxygen plugin has not yet instantiated.

But there is another way:

http://www.oxygenxml.com/doc/ug-editorE ... tions.html

So if from a started Oxygen Plugin you set a couple of options and then export the entire Oxygen options to an XML file, then copy this XML file to a folder called "preferences" in the plugin's installation directory, on startup the Oxygen plugin will consider those options in the XML file as the default options.

Regards,
Radu