01: /*******************************************************************************
02: * Copyright (c) 2006, 2007 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.fieldassist.preferences;
11:
12: import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
13: import org.eclipse.jface.preference.IPreferenceStore;
14:
15: import org.eclipse.ui.examples.fieldassist.FieldAssistPlugin;
16:
17: /**
18: * Class used to initialize default preference values.
19: */
20: public class PreferenceInitializer extends
21: AbstractPreferenceInitializer {
22:
23: /*
24: * (non-Javadoc)
25: *
26: * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
27: */
28: public void initializeDefaultPreferences() {
29: IPreferenceStore store = FieldAssistPlugin.getDefault()
30: .getPreferenceStore();
31: store.setDefault(PreferenceConstants.PREF_SHOWERRORDECORATION,
32: true);
33: store.setDefault(PreferenceConstants.PREF_SHOWERRORMESSAGE,
34: true);
35: store.setDefault(
36: PreferenceConstants.PREF_SHOWWARNINGDECORATION, true);
37: store.setDefault(
38: PreferenceConstants.PREF_SHOWREQUIREDFIELDDECORATION,
39: false);
40: store
41: .setDefault(
42: PreferenceConstants.PREF_SHOWREQUIREDFIELDLABELINDICATOR,
43: true);
44: store.setDefault(
45: PreferenceConstants.PREF_SHOWCONTENTPROPOSALCUE, true);
46: store
47: .setDefault(
48: PreferenceConstants.PREF_DECORATOR_HORIZONTALLOCATION,
49: PreferenceConstants.PREF_DECORATOR_HORIZONTALLOCATION_LEFT);
50: store
51: .setDefault(
52: PreferenceConstants.PREF_DECORATOR_VERTICALLOCATION,
53: PreferenceConstants.PREF_DECORATOR_VERTICALLOCATION_CENTER);
54: store.setDefault(
55: PreferenceConstants.PREF_DECORATOR_MARGINWIDTH, 0);
56: store.setDefault(PreferenceConstants.PREF_CONTENTASSISTKEY,
57: PreferenceConstants.PREF_CONTENTASSISTKEY1);
58: store.setDefault(
59: PreferenceConstants.PREF_CONTENTASSISTKEY_PROPAGATE,
60: false);
61: store.setDefault(PreferenceConstants.PREF_SHOWSECONDARYPOPUP,
62: true);
63: store.setDefault(PreferenceConstants.PREF_CONTENTASSISTDELAY,
64: 1000);
65: store.setDefault(PreferenceConstants.PREF_CONTENTASSISTRESULT,
66: PreferenceConstants.PREF_CONTENTASSISTRESULT_REPLACE);
67: store.setDefault(PreferenceConstants.PREF_CONTENTASSISTFILTER,
68: PreferenceConstants.PREF_CONTENTASSISTFILTER_CHAR);
69: }
70: }
|