Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.preferences/schema/preferences.exsd')
-rw-r--r--bundles/org.eclipse.equinox.preferences/schema/preferences.exsd25
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 @@
&lt;/extension&gt;
&lt;/pre&gt;
&lt;/p&gt;
+
+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 &quot;storage&quot; attribute on the &quot;scope&quot; element. Note that only one of the &quot;class&quot; and &quot;storage&quot; attributes can be defined at the same time. The class referenced in the &quot;storage&quot; attribute must extend the AbstractPreferenceStorage class. In the following example the &quot;FooStorage&quot; class handles the loading/saving for the &quot;foo&quot; preferences.
+&lt;p&gt;
+ &lt;pre&gt;
+ &lt;extension point=&quot;org.eclipse.equinox.preferences.preferences&quot;&gt;
+ &lt;scope name=&quot;foo&quot; storage=&quot;com.example.FooStorage&quot;/&gt;
+ &lt;initializer class=&quot;com.example.MyPreferenceInitializer&quot;/&gt;
+ &lt;modifier class=&quot;com.example.MyModifyListener&quot;/&gt;
+ &lt;/extension&gt;
+ &lt;/pre&gt;
+&lt;/p&gt;
</documentation>
</annotation>
@@ -166,7 +187,7 @@
<meta.section type="copyright"/>
</appInfo>
<documentation>
- Copyright (c) 2004, 2009 IBM Corporation and others.&lt;br&gt;
+ Copyright (c) 2004, 2012 IBM Corporation and others.&lt;br&gt;
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

Back to the top