Preference store in Eclipse version

<oXygen/> general issues.
SSC
Posts: 206
Joined: Thu Dec 01, 2011 4:22 pm
Location: Hamburg, Germany

Preference store in Eclipse version

Post by SSC » Fri May 04, 2012 10:37 am

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
Simon Scholz
vogella GmbH
http://www.vogella.com

Radu
Posts: 6582
Joined: Fri Jul 09, 2004 5:18 pm

Re: Preference store in Eclipse version

Post by Radu » Fri May 04, 2012 10:53 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply