diff options
Diffstat (limited to 'bundles/org.eclipse.equinox.preferences/schema/preferences.exsd')
-rw-r--r-- | bundles/org.eclipse.equinox.preferences/schema/preferences.exsd | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.preferences/schema/preferences.exsd b/bundles/org.eclipse.equinox.preferences/schema/preferences.exsd index 6173800bc..3f2531436 100644 --- a/bundles/org.eclipse.equinox.preferences/schema/preferences.exsd +++ b/bundles/org.eclipse.equinox.preferences/schema/preferences.exsd @@ -63,7 +63,7 @@ </documentation> </annotation> </attribute> - <attribute name="class" type="string" use="required"> + <attribute name="class" type="string"> <annotation> <documentation> The name of the class. @@ -73,6 +73,16 @@ </appInfo> </annotation> </attribute> + <attribute name="storage" type="string"> + <annotation> + <documentation> + The class which implements the preference storage. + </documentation> + <appInfo> + <meta.attribute kind="java" basedOn="org.eclipse.core.runtime.preferences.AbstractPreferenceStorage:"/> + </appInfo> + </annotation> + </attribute> </complexType> </element> @@ -140,6 +150,17 @@ </extension> </pre> </p> + +If the client chooses let the Eclipse Platform handle the preference nodes but wishes to define a custom location/mechanism for persisting the data, then they are able to set the "storage" attribute on the "scope" element. Note that only one of the "class" and "storage" attributes can be defined at the same time. The class referenced in the "storage" attribute must extend the AbstractPreferenceStorage class. In the following example the "FooStorage" class handles the loading/saving for the "foo" preferences. +<p> + <pre> + <extension point="org.eclipse.equinox.preferences.preferences"> + <scope name="foo" storage="com.example.FooStorage"/> + <initializer class="com.example.MyPreferenceInitializer"/> + <modifier class="com.example.MyModifyListener"/> + </extension> + </pre> +</p> </documentation> </annotation> @@ -166,7 +187,7 @@ <meta.section type="copyright"/> </appInfo> <documentation> - Copyright (c) 2004, 2009 IBM Corporation and others.<br> + Copyright (c) 2004, 2012 IBM Corporation and others.<br> All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at |