KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > $packageName$ > PreferenceInitializer


1 package $packageName$;
2
3 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
4 import org.eclipse.jface.preference.IPreferenceStore;
5
6 import $pluginClass$;
7
8 /**
9  * Class used to initialize default preference values.
10  */

11 public class PreferenceInitializer extends AbstractPreferenceInitializer {
12
13     /*
14      * (non-Javadoc)
15      *
16      * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
17      */

18     public void initializeDefaultPreferences() {
19         IPreferenceStore store = $activator$.getDefault().getPreferenceStore();
20         store.setDefault(PreferenceConstants.P_BOOLEAN, true);
21         store.setDefault(PreferenceConstants.P_CHOICE, "choice2");
22         store.setDefault(PreferenceConstants.P_STRING,
23                 "Default value");
24     }
25
26 }
27
Popular Tags