1 /* ======================================
2 * Copyright (c) 2004-2005 Achim Nierbeck
3 * All rights reserved.
4 *
5 * You may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.gnu.org/licenses/lgpl.html
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 * ======================================
16 */
17
18 /*
19 * PreferenceInitializer.java
20 * $Revision: 1.5 $
21 * Date 14.12.2005
22 *
23 * $Author: nierbeck $
24 * $Date: 2006/02/02 21:31:31 $
25 *
26 */
27
28 package de.nierbeck.timeTrack.preferences;
29
30 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
31 import org.eclipse.jface.preference.IPreferenceStore;
32
33 import de.nierbeck.timeTrack.TimeTrackPlugin;
34
35 /***
36 * Class used to initialize default preference values.
37 */
38 public class PreferenceInitializer extends AbstractPreferenceInitializer {
39
40 /***
41 *
42 *
43 * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
44 */
45 public final void initializeDefaultPreferences() {
46 IPreferenceStore store = TimeTrackPlugin.getDefault()
47 .getPreferenceStore();
48 // store.setDefault(PreferenceConstants.P_BOOLEAN, true);
49 // store.setDefault(PreferenceConstants.P_CHOICE, "choice2");
50 // store.setDefault(PreferenceConstants.P_STRING,
51 // "Default value");
52 store.setDefault(PreferenceConstants.P_FILE,
53 PreferenceConstants.P_FILE_DEFAULT);
54 // store.setDefault(PreferenceConstants.P_PATH,
55 // PreferenceConstants.P_PATH_DEFAULT);
56 store.setDefault(PreferenceConstants.P_PATH, System
57 .getProperty("user.home"));
58
59 store.setDefault(PreferenceConstants.P_UPDATE_INTERVALL,
60 PreferenceConstants.P_UPDATE_INTERVALL_DEFAULT);
61 }
62
63 }