|
1 /* |
|
2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 * Class used to initialize default preference values. |
|
17 * |
|
18 */ |
|
19 package com.nokia.traceviewer.engine.preferences; |
|
20 |
|
21 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; |
|
22 import org.eclipse.jface.preference.IPreferenceStore; |
|
23 |
|
24 import com.nokia.traceviewer.TraceViewerPlugin; |
|
25 |
|
26 /** |
|
27 * Class used to initialize default preference values. |
|
28 */ |
|
29 public class PreferenceInitializer extends AbstractPreferenceInitializer { |
|
30 |
|
31 /* |
|
32 * (non-Javadoc) |
|
33 * |
|
34 * @seeorg.eclipse.core.runtime.preferences.AbstractPreferenceInitializer# |
|
35 * initializeDefaultPreferences() |
|
36 */ |
|
37 @Override |
|
38 public void initializeDefaultPreferences() { |
|
39 IPreferenceStore store = TraceViewerPlugin.getDefault() |
|
40 .getPreferenceStore(); |
|
41 |
|
42 // Configuration file |
|
43 store.setDefault(PreferenceConstants.CONFIGURATION_FILE, |
|
44 PreferenceConstants.DEFAULT_CONFIGURATION_FILE); |
|
45 |
|
46 // Timestamp accuracy |
|
47 store.setDefault(PreferenceConstants.TIMESTAMP_ACCURACY, |
|
48 PreferenceConstants.MILLISECOND_ACCURACY); |
|
49 |
|
50 // Time from previous checkbox |
|
51 store.setDefault(PreferenceConstants.TIME_FROM_PREVIOUS_TRACE_CHECKBOX, |
|
52 false); |
|
53 |
|
54 // Show component and group name before trace text checkbox |
|
55 store.setDefault( |
|
56 PreferenceConstants.SHOW_COMPONENT_GROUP_NAME_CHECKBOX, true); |
|
57 |
|
58 // Show class and function name before trace text checkbox |
|
59 store.setDefault(PreferenceConstants.SHOW_CLASS_FUNCTION_NAME_CHECKBOX, |
|
60 true); |
|
61 |
|
62 // Auto reload changed Dictionaries checkbox |
|
63 store.setDefault(PreferenceConstants.AUTO_RELOAD_DICTIONARIES_CHECKBOX, |
|
64 true); |
|
65 |
|
66 // Show BTrace variables checkbox |
|
67 store.setDefault(PreferenceConstants.SHOW_BTRACE_VARIABLES_CHECKBOX, |
|
68 true); |
|
69 |
|
70 // Show undecoded traces as what type checkbox |
|
71 store.setDefault(PreferenceConstants.SHOW_UNDECODED_TRACES_TYPE, |
|
72 PreferenceConstants.UNDECODED_ID_AND_DATA); |
|
73 |
|
74 // Insert OST as default data format |
|
75 store.setDefault(PreferenceConstants.DATA_FORMAT, |
|
76 "OST - Open System Trace"); //$NON-NLS-1$ |
|
77 |
|
78 // Auto connect to dynamic connections |
|
79 store.setDefault( |
|
80 PreferenceConstants.AUTO_CONNECT_DYNAMIC_CONNECTIONS_CHECKBOX, |
|
81 false); |
|
82 } |
|
83 } |