March
15th,
2011
Most plugins have some kind of preferences, which show up in the File -> Preferences dialog inside of Notes. The majority of time, these preferences come pre-configured with some default preference values. The way to do this is to use an extension point provided by Eclipse called org.eclipse.core.runtime.preferences. You can then provide an initializer class to this extension point that will get called when you first try to access any of the preferences. Your preference initializer class should subclass org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer.
<extension point="org.eclipse.core.runtime.preferences"> <scope name="foo" class="com.example.FooPrefs"/> <initializer class="com.example.MyPreferenceInitializer"/> <modifier class="com.example.MyModifyListener"/> </extension>