/**
 * $id:  $
 *
 */
package org.jvnet.lookout.core.preference;


import org.eclipse.core.runtime.Preferences;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.jvnet.lookout.core.Plugin;

public class CorePreferenceInitializer extends AbstractPreferenceInitializer {

	private Preferences sourcePreferences;

	public CorePreferenceInitializer() {
		sourcePreferences = obtainSourcePreference();
	}

	protected Preferences obtainSourcePreference() {
		return Plugin.getDefault().getPluginPreferences();		
	}

	final protected Preferences getSourcePreference() {
		return sourcePreferences;
	}
	
	@Override
	public void initializeDefaultPreferences() {
		getSourcePreference().setDefault(org.jvnet.lookout.core.preference.Preferences.NumberOfResults, 10);
		getSourcePreference().setDefault(org.jvnet.lookout.core.preference.Preferences.SearchableSearchAdapters, "");
	}
}
