01: /*******************************************************************************
02: * Copyright (c) 2004, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.examples.readmetool;
11:
12: import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
13: import org.eclipse.jface.preference.IPreferenceStore;
14:
15: /**
16: * Initializes the preferences for the readme plug-in.
17: *
18: * @since 3.0
19: */
20: public class ReadmePreferenceInitializer extends
21: AbstractPreferenceInitializer {
22:
23: /*
24: * (non-Javadoc)
25: *
26: * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
27: */
28: public void initializeDefaultPreferences() {
29: // These settings will show up when the Readme preference page
30: // is shown for the first time.
31: IPreferenceStore store = ReadmePlugin.getDefault()
32: .getPreferenceStore();
33: store.setDefault(IReadmeConstants.PRE_CHECK1, true);
34: store.setDefault(IReadmeConstants.PRE_CHECK2, true);
35: store.setDefault(IReadmeConstants.PRE_CHECK3, false);
36: store.setDefault(IReadmeConstants.PRE_RADIO_CHOICE, 2);
37: store.setDefault(IReadmeConstants.PRE_TEXT, MessageUtil
38: .getString("Default_text")); //$NON-NLS-1$
39: }
40:
41: }
|