Color color= Display.getDefault().getSystemColor(SWT.COLOR_BLUE);PreferenceConverter.setDefault (store, HIGHLIGHT_PREFERENCE, color.getRGB()); public class BadWordCheckerPlugin extends AbstractUIPlugin { //The shared instance. private static BadWordCheckerPlugin plugin; //The identifiers for the preferences public static final String BAD_WORDS_PREFERENCE = "badwords"; public static final String HIGHLIGHT_PREFERENCE = "highlight"; //The default values for the preferences public static final String DEFAULT_BAD_WORDS = "bug;bogus;hack;"; public static final int DEFAULT_HIGHLIGHT = SWT.COLOR_BLUE; public BadWordCheckerPlugin(IPluginDescriptor descriptor) { super(descriptor); plugin = this; } public static BadWordCheckerPlugin getDefault() { return plugin; } /** * Initializes a preference store with default preference values * for this plug-in. */ protected void initializeDefaultPreferences(IPreferenceStore store) { store.setDefault(BAD_WORDS_PREFERENCE, DEFAULT_BAD_WORDS); Color color= Display.getDefault().getSystemColor(DEFAULT_HIGHLIGHT); PreferenceConverter.setDefault(store, HIGHLIGHT_PREFERENCE, color.getRGB()); } }