author | Matti Laitinen <matti.t.laitinen@nokia.com> |
Tue, 24 Aug 2010 12:16:27 +0300 | |
changeset 15 | 0367d2db2c06 |
parent 6 | f65f740e69f9 |
permissions | -rw-r--r-- |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
1 |
/* |
6
f65f740e69f9
AnalyzeTool Carbide Extension v1.9.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
1
diff
changeset
|
2 |
* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
8 |
* |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
11 |
* |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
13 |
* |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
14 |
* Description: Definitions for the class AnalyzeToolPreferencePage |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
15 |
* |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
17 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
18 |
package com.nokia.s60tools.analyzetool.preferences; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
19 |
|
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
20 |
import java.io.File; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
21 |
import java.text.MessageFormat; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
22 |
|
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
23 |
import org.eclipse.core.runtime.IPath; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
24 |
import org.eclipse.core.runtime.Path; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
25 |
import org.eclipse.jface.preference.FieldEditorPreferencePage; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
26 |
import org.eclipse.jface.preference.IPreferenceStore; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
27 |
import org.eclipse.jface.preference.RadioGroupFieldEditor; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
28 |
import org.eclipse.swt.SWT; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
29 |
import org.eclipse.swt.layout.GridData; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
30 |
import org.eclipse.swt.layout.GridLayout; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
31 |
import org.eclipse.swt.widgets.Button; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
32 |
import org.eclipse.swt.widgets.Composite; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
33 |
import org.eclipse.swt.widgets.DirectoryDialog; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
34 |
import org.eclipse.swt.widgets.Event; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
35 |
import org.eclipse.swt.widgets.Group; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
36 |
import org.eclipse.swt.widgets.Label; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
37 |
import org.eclipse.swt.widgets.Listener; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
38 |
import org.eclipse.swt.widgets.Spinner; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
39 |
import org.eclipse.swt.widgets.Text; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
40 |
import org.eclipse.ui.IWorkbench; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
41 |
import org.eclipse.ui.IWorkbenchPreferencePage; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
42 |
import org.eclipse.ui.PlatformUI; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
43 |
|
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
44 |
import com.nokia.carbide.cpp.epoc.engine.image.ISVGSource; |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
45 |
import com.nokia.s60tools.analyzetool.Activator; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
46 |
import com.nokia.s60tools.analyzetool.AnalyzeToolHelpContextIDs; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
47 |
import com.nokia.s60tools.analyzetool.global.Constants; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
48 |
import com.nokia.s60tools.analyzetool.global.Util; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
49 |
import com.nokia.s60tools.analyzetool.ui.IActionListener; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
50 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
51 |
/** |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
52 |
* This class represents a preference page that is contributed to the |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
53 |
* Preferences dialog. By subclassing <samp>FieldEditorPreferencePage</samp>, we |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
54 |
* can use the field support built into JFace that allows us to create a page |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
55 |
* that is small and knows how to save, restore and apply itself. |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
56 |
* <p> |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
57 |
* This page is used to modify preferences only. They are stored in the |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
58 |
* preference store that belongs to the main plug-in class. That way, |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
59 |
* preferences can be accessed directly via the preference store. |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
60 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
61 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
62 |
public class AnalyzeToolPreferencePage extends FieldEditorPreferencePage |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
63 |
implements IWorkbenchPreferencePage, Listener { |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
64 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
65 |
/** Button to ask always. */ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
66 |
Button askButton = null; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
67 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
68 |
/** Atool.exe path field. */ |
6
f65f740e69f9
AnalyzeTool Carbide Extension v1.9.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
1
diff
changeset
|
69 |
Text atoolDirText = null; |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
70 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
71 |
/** User specified atool.exe path. */ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
72 |
Label atoolDir = null; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
73 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
74 |
/** Atool.exe version field. */ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
75 |
Label atoolVerLabel; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
76 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
77 |
/** Browse button to active file selection dialog. */ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
78 |
Button browseButton = null; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
79 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
80 |
/** Group for callstack size buttons. */ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
81 |
Group csSizeGroup; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
82 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
83 |
/** Custom items button */ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
84 |
Button customButton; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
85 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
86 |
/** Forty items button */ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
87 |
Button fortyButton; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
88 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
89 |
/** Hundred items button */ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
90 |
Button hundredButton; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
91 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
92 |
/** Radio group for report level. */ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
93 |
RadioGroupFieldEditor reportLevels = null; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
94 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
95 |
/** Button to use S60 file mode. */ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
96 |
Button s60Button = null; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
97 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
98 |
/** |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
99 |
* Spinner to define custom size of callstack, this item is visible only |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
100 |
* when custom button is selected. |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
101 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
102 |
Spinner spinner; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
103 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
104 |
/** |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
105 |
* Button to use default atool.exe location this means that atool.exe is |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
106 |
* executed inside AnalyzeTool jar. |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
107 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
108 |
Button useDefaultLocation = null; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
109 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
110 |
/** Use user specified location. */ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
111 |
Button useUserSpecified = null; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
112 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
113 |
/** Button to verbose atool.exe output. */ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
114 |
Button verboseButton = null; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
115 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
116 |
/** Button to select fast external data gathering mode */ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
117 |
Button externalFastButton = null; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
118 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
119 |
/** No items button. */ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
120 |
Button zeroButton; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
121 |
|
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
122 |
Label logPath; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
123 |
Text logPathText; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
124 |
Label fileName; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
125 |
Text fileNameText; |
6
f65f740e69f9
AnalyzeTool Carbide Extension v1.9.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
1
diff
changeset
|
126 |
|
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
127 |
/** |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
128 |
* Constructor. |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
129 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
130 |
public AnalyzeToolPreferencePage() { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
131 |
super(GRID); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
132 |
setPreferenceStore(Activator.getDefault().getPreferenceStore()); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
133 |
setDescription(Constants.ATOOL_DESC); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
134 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
135 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
136 |
/** |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
137 |
* Checks preferences initial values if logging mode is not set to S60 |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
138 |
* disables S60 data file name selections. |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
139 |
*/ |
6
f65f740e69f9
AnalyzeTool Carbide Extension v1.9.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
1
diff
changeset
|
140 |
public final void checkInitValues() { |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
141 |
IPreferenceStore store = Activator.getPreferences(); |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
142 |
|
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
143 |
// get stored atool folder |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
144 |
String atoolFolder = store.getString(Constants.ATOOL_FOLDER); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
145 |
atoolVerLabel.setText(Constants.PREFS_ATOOL_VER_NOT_FOUND); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
146 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
147 |
// if atool folder is set to point default atool location |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
148 |
if (atoolFolder.equals(Constants.DEFAULT_ATOOL_FOLDER)) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
149 |
|
6
f65f740e69f9
AnalyzeTool Carbide Extension v1.9.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
1
diff
changeset
|
150 |
// check that stored atool location exists |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
151 |
File file = new File(atoolFolder); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
152 |
if (file.exists()) { // if exists use this location and update |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
153 |
// preference page buttons |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
154 |
useDefaultLocation.setSelection(false); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
155 |
store.setValue(Constants.USE_INTERNAL, false); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
156 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
157 |
} else { // location could not found => use internal atool |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
158 |
useDefaultLocation.setSelection(true); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
159 |
store.setValue(Constants.USE_INTERNAL, true); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
160 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
161 |
} else { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
162 |
boolean useDef = store.getBoolean(Constants.USE_INTERNAL); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
163 |
useDefaultLocation.setSelection(useDef); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
164 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
165 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
166 |
// get atool.exe path and set it atool.exe path field |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
167 |
String atoolPath = store.getString(Constants.USER_SELECTED_FOLDER); |
6
f65f740e69f9
AnalyzeTool Carbide Extension v1.9.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
1
diff
changeset
|
168 |
atoolDirText.setText(atoolPath); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
169 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
170 |
// update preference page buttons |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
171 |
handleDefaultLocationChange(); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
172 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
173 |
// get logging mode and update buttons |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
174 |
String fileMode = store.getString(Constants.LOGGING_MODE); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
175 |
setGroupButtons(fileMode); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
176 |
|
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
177 |
logPathText.setText(store.getString(Constants.DEVICE_LOG_FILE_PATH)); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
178 |
fileNameText.setText(store.getString(Constants.DEVICE_LOG_FILE_NAME)); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
179 |
|
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
180 |
logPathText.setText(store.getString(Constants.DEVICE_LOG_FILE_PATH)); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
181 |
fileNameText.setText(store.getString(Constants.DEVICE_LOG_FILE_NAME)); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
182 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
183 |
verboseButton.setSelection(store.getBoolean(Constants.ATOOL_VERBOSE)); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
184 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
185 |
// get stored callstack size |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
186 |
int callstackSize = store.getInt(Constants.CALLSTACK_SIZE); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
187 |
if (callstackSize == 0) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
188 |
zeroButton.setSelection(true); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
189 |
spinner.setEnabled(false); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
190 |
} else if (callstackSize == 40) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
191 |
fortyButton.setSelection(true); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
192 |
spinner.setEnabled(false); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
193 |
} else if (callstackSize == 100) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
194 |
hundredButton.setSelection(true); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
195 |
spinner.setEnabled(false); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
196 |
} else { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
197 |
// if callstack size is set to custom area |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
198 |
// enable spinner and set stored callstack size |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
199 |
customButton.setSelection(true); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
200 |
spinner.setEnabled(true); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
201 |
spinner.setSelection(callstackSize); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
202 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
203 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
204 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
205 |
/** |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
206 |
* Check if user entered folder location is available. |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
207 |
* |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
208 |
* @param folderLocation |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
209 |
* User entered folder location |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
210 |
* @return True if folder exists otherwise False |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
211 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
212 |
public final boolean checkIfFolderExists(final String folderLocation) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
213 |
if (folderLocation.length() > 0) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
214 |
StringBuffer tmpFolderLoc = new StringBuffer(); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
215 |
tmpFolderLoc.append(folderLocation); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
216 |
// folder is not end with backslash => add it |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
217 |
if (!folderLocation.endsWith("\\")) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
218 |
// folderLocation += "\\"; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
219 |
tmpFolderLoc.append('\\'); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
220 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
221 |
tmpFolderLoc.append("atool.exe"); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
222 |
IPath atoolPath = new Path(tmpFolderLoc.toString()); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
223 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
224 |
// if folder does not exists |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
225 |
if (atoolPath.toFile().exists()) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
226 |
return true; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
227 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
228 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
229 |
return false; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
230 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
231 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
232 |
/** |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
233 |
* Creates callstack size group items. |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
234 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
235 |
private void createCallstackSizeGroup() { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
236 |
// create new button group for callstack size |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
237 |
csSizeGroup = new Group(getFieldEditorParent(), SWT.NULL); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
238 |
csSizeGroup.setText("Stored callstack size"); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
239 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
240 |
// set group layout |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
241 |
final GridLayout layoutCsSize = new GridLayout(); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
242 |
layoutCsSize.numColumns = 1; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
243 |
csSizeGroup.setLayout(layoutCsSize); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
244 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
245 |
GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
246 |
gridData.horizontalSpan = 1; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
247 |
csSizeGroup.setLayoutData(gridData); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
248 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
249 |
// zero size button |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
250 |
zeroButton = new Button(csSizeGroup, SWT.RADIO); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
251 |
zeroButton.setText(Constants.PREFS_ZERO_BUTTON); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
252 |
zeroButton.addListener(SWT.Selection, this); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
253 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
254 |
// forty items button |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
255 |
fortyButton = new Button(csSizeGroup, SWT.RADIO); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
256 |
fortyButton.setText(Constants.PREFS_FORTY_BUTTON); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
257 |
fortyButton.addListener(SWT.Selection, this); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
258 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
259 |
// hundred items button |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
260 |
hundredButton = new Button(csSizeGroup, SWT.RADIO); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
261 |
hundredButton.setText(Constants.PREFS_HUNDRED_BUTTON); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
262 |
hundredButton.addListener(SWT.Selection, this); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
263 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
264 |
// button for define custom size of callstack |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
265 |
customButton = new Button(csSizeGroup, SWT.RADIO); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
266 |
customButton.setText(Constants.PREFS_CUSTOM_BUTTON); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
267 |
customButton.addListener(SWT.Selection, this); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
268 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
269 |
// new composite for spinner item |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
270 |
Composite customComp = new Composite(csSizeGroup, SWT.NULL); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
271 |
final GridLayout customGrid = new GridLayout(); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
272 |
customGrid.marginLeft = 15; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
273 |
customGrid.numColumns = 1; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
274 |
customComp.setLayout(customGrid); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
275 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
276 |
spinner = new Spinner(customComp, SWT.BORDER); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
277 |
spinner.setMaximum(255); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
278 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
279 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
280 |
/** |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
281 |
* Creates data gathering group items |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
282 |
*/ |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
283 |
private void createGatheringGroup() { |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
284 |
// create new button group for logging mode |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
285 |
Group groupGatheringMode = new Group(getFieldEditorParent(), SWT.NULL); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
286 |
groupGatheringMode.setText(Constants.PREFS_LOGGING_MODE_TITLE); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
287 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
288 |
// set group layout |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
289 |
final GridLayout layoutLogMode = new GridLayout(); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
290 |
layoutLogMode.numColumns = 1; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
291 |
groupGatheringMode.setLayout(layoutLogMode); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
292 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
293 |
GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
294 |
gridData.horizontalSpan = 1; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
295 |
groupGatheringMode.setLayoutData(gridData); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
296 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
297 |
// External fast mode button |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
298 |
externalFastButton = new Button(groupGatheringMode, SWT.RADIO); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
299 |
externalFastButton.setToolTipText(Constants.PREFS_EXT_FAST_TOOLTIP); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
300 |
externalFastButton.setText(Constants.PREFS_EXT_FAST); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
301 |
externalFastButton.addListener(SWT.Selection, this); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
302 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
303 |
// S60 mode button |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
304 |
s60Button = new Button(groupGatheringMode, SWT.RADIO); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
305 |
s60Button.setToolTipText(Constants.PREFS_S60_TOOLTIP); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
306 |
s60Button.setText(Constants.PREFS_S60); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
307 |
s60Button.addListener(SWT.Selection, this); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
308 |
|
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
309 |
Composite compS60 = new Composite(groupGatheringMode, SWT.NULL); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
310 |
|
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
311 |
final GridLayout layoutS60 = new GridLayout(); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
312 |
layoutS60.marginLeft = 15; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
313 |
layoutS60.numColumns = 2; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
314 |
compS60.setLayout(layoutS60); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
315 |
|
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
316 |
// path label |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
317 |
logPath = new Label(compS60, SWT.NONE); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
318 |
logPath.setToolTipText("Log file path in the device."); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
319 |
logPath.setText("Log file path:"); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
320 |
|
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
321 |
// path field |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
322 |
logPathText = new Text(compS60, SWT.BORDER); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
323 |
logPathText.setLayoutData(new GridData(280, SWT.DEFAULT)); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
324 |
logPathText.setText("C:\\logs\\atool\\"); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
325 |
|
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
326 |
// filename label |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
327 |
fileName = new Label(compS60, SWT.NONE); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
328 |
fileName.setToolTipText("Log file name."); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
329 |
fileName.setText("Filename:"); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
330 |
|
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
331 |
// filename field |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
332 |
fileNameText = new Text(compS60, SWT.BORDER); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
333 |
fileNameText.setLayoutData(new GridData(280, SWT.DEFAULT)); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
334 |
fileNameText.setText("%processname%.dat"); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
335 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
336 |
// ask always button |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
337 |
askButton = new Button(groupGatheringMode, SWT.RADIO); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
338 |
askButton.setToolTipText(Constants.PREFS_ASK_ALWAYS_TOOLTIP); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
339 |
askButton.setText(Constants.PREFS_ASK_ALWAYS); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
340 |
askButton.addListener(SWT.Selection, this); |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
341 |
} |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
342 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
343 |
/** |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
344 |
* Creates the field editors. Field editors are abstractions of the common |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
345 |
* GUI blocks needed to manipulate various types of preferences. Each field |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
346 |
* editor knows how to save and restore itself. |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
347 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
348 |
@Override |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
349 |
public final void createFieldEditors() { |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
350 |
|
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
351 |
Composite composite = new Composite(getFieldEditorParent(), SWT.NULL); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
352 |
final GridLayout gridLayout = new GridLayout(); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
353 |
gridLayout.numColumns = 3; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
354 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
355 |
// set layoyt of this view |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
356 |
composite.setLayout(gridLayout); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
357 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
358 |
// new group for atool.exe specific settings |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
359 |
Group groupAtool = new Group(getFieldEditorParent(), SWT.NULL); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
360 |
groupAtool.setText(Constants.PREFS_ATOOL_GROUP_TITLE); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
361 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
362 |
// set group layout |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
363 |
final GridLayout layoutAtool = new GridLayout(); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
364 |
layoutAtool.numColumns = 1; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
365 |
groupAtool.setLayout(layoutAtool); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
366 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
367 |
// grid data for the atool.exe group |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
368 |
GridData gridDataAtool = new GridData(GridData.HORIZONTAL_ALIGN_FILL); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
369 |
gridDataAtool.horizontalSpan = 1; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
370 |
groupAtool.setLayoutData(gridDataAtool); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
371 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
372 |
// create default location button and add listener to it |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
373 |
useDefaultLocation = new Button(groupAtool, SWT.RADIO); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
374 |
useDefaultLocation.setText(Constants.PREFS_USE_INTERNAL_TITLE); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
375 |
useDefaultLocation.setToolTipText(Constants.PREFS_USE_INTERNAL_TITLE); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
376 |
useDefaultLocation.addListener(SWT.Selection, this); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
377 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
378 |
// create user specified location button and add listener to it |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
379 |
useUserSpecified = new Button(groupAtool, SWT.RADIO); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
380 |
useUserSpecified.setText(Constants.PREFS_USE_EXTERNAL_TITLE); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
381 |
useUserSpecified.setToolTipText(Constants.PREFS_USE_EXTERNAL_TITLE); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
382 |
useUserSpecified.addListener(SWT.Selection, this); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
383 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
384 |
Composite compAtool = new Composite(groupAtool, SWT.NULL); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
385 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
386 |
final GridLayout layoutAtoolDir = new GridLayout(); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
387 |
layoutAtoolDir.marginLeft = 15; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
388 |
layoutAtoolDir.numColumns = 3; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
389 |
compAtool.setLayout(layoutAtoolDir); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
390 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
391 |
// directory label |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
392 |
atoolDir = new Label(compAtool, SWT.NONE); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
393 |
atoolDir.setToolTipText(Constants.PREFS_SELECT_FOLDER); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
394 |
atoolDir.setText(Constants.PREFS_ATOOL_PATH); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
395 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
396 |
// directory field |
6
f65f740e69f9
AnalyzeTool Carbide Extension v1.9.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
1
diff
changeset
|
397 |
atoolDirText = new Text(compAtool, SWT.BORDER); |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
398 |
atoolDirText.setEditable(false); |
6
f65f740e69f9
AnalyzeTool Carbide Extension v1.9.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
1
diff
changeset
|
399 |
atoolDirText.setLayoutData(new GridData(200, SWT.DEFAULT)); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
400 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
401 |
// button which opens the folder selection dialog |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
402 |
browseButton = new Button(compAtool, SWT.NONE); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
403 |
browseButton.setToolTipText(Constants.PREFS_SELECT_FOLDER); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
404 |
browseButton.setText(Constants.PREFS_BROWSE); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
405 |
browseButton.addListener(SWT.Selection, this); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
406 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
407 |
// verbose atool.exe output |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
408 |
verboseButton = new Button(groupAtool, SWT.CHECK); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
409 |
verboseButton.setText(Constants.PREFS_VERBOSE); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
410 |
verboseButton.setToolTipText(Constants.PREFS_VERBOSE_TOOLTIP); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
411 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
412 |
// create new group for the atool.exe version |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
413 |
Group groupVersion = new Group(groupAtool, SWT.NONE); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
414 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
415 |
// set atool.exe version group layout |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
416 |
GridData gridDataVersion = new GridData(GridData.HORIZONTAL_ALIGN_FILL); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
417 |
gridDataVersion.horizontalSpan = 1; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
418 |
groupVersion.setLayoutData(gridDataVersion); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
419 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
420 |
// set group layout |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
421 |
final GridLayout layoutVersion = new GridLayout(4, false); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
422 |
groupVersion.setLayout(layoutVersion); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
423 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
424 |
// atool.exe version label title |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
425 |
Label versionTextLabel = new Label(groupVersion, SWT.NONE); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
426 |
versionTextLabel.setText(Constants.PREFS_ENGINE_VERSION); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
427 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
428 |
// create atool.exe version field and set layout |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
429 |
atoolVerLabel = new Label(groupVersion, SWT.NONE); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
430 |
GridData vergd13 = new GridData(GridData.FILL_HORIZONTAL); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
431 |
vergd13.horizontalSpan = 2; |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
432 |
atoolVerLabel.setLayoutData(vergd13); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
433 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
434 |
// create data gathering group |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
435 |
createGatheringGroup(); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
436 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
437 |
// create callstack size group |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
438 |
createCallstackSizeGroup(); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
439 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
440 |
// report level related settings |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
441 |
reportLevels = new RadioGroupFieldEditor(Constants.REPORT_LEVEL, |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
442 |
Constants.PREFS_REPORT_LEVEL, 1, new String[][] { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
443 |
{ Constants.PREFS_SHOW_EVERY, Constants.REPORT_EVERY }, |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
444 |
{ Constants.PREFS_SHOW_KNOWN, Constants.REPORT_KNOWN }, |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
445 |
{ Constants.PREFS_SHOW_TOPMOST, |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
446 |
Constants.REPORT_TOPMOST } }, |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
447 |
getFieldEditorParent(), true); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
448 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
449 |
addField(reportLevels); |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
450 |
|
6
f65f740e69f9
AnalyzeTool Carbide Extension v1.9.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
1
diff
changeset
|
451 |
checkInitValues(); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
452 |
PlatformUI.getWorkbench().getHelpSystem().setHelp(super.getControl(), |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
453 |
AnalyzeToolHelpContextIDs.ANALYZE_TOOL_VIEW_MEM_LEAKS); |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
454 |
} |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
455 |
|
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
456 |
@Override |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
457 |
protected void checkState() { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
458 |
super.checkState(); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
459 |
|
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
460 |
String path; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
461 |
|
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
462 |
if (useDefaultLocation.getSelection()) { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
463 |
path = null; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
464 |
} else { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
465 |
path = atoolDirText.getText(); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
466 |
} |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
467 |
|
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
468 |
if (Util.getAtoolVersionNumber(path).equals( |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
469 |
Constants.PREFS_ATOOL_VER_NOT_FOUND)) { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
470 |
setErrorMessage(Constants.PREFS_CLE_NOT_AVAILABLE); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
471 |
setValid(false); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
472 |
} else if (Util.compareVersionNumber(Util.getAtoolVersionNumber(path), |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
473 |
Constants.MIN_CLE_SUPPORTED) == Constants.VERSION_NUMBERS_SECOND) { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
474 |
setErrorMessage(MessageFormat.format( |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
475 |
Constants.PREFS_CLE_OLDER_THAN_MIN, |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
476 |
Constants.MIN_CLE_SUPPORTED)); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
477 |
setValid(false); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
478 |
} else { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
479 |
setErrorMessage(null); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
480 |
setValid(true); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
481 |
} |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
482 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
483 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
484 |
/** |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
485 |
* Handles atool.exe location selection changes. Update corresponding |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
486 |
* buttons states. |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
487 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
488 |
public final void handleDefaultLocationChange() { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
489 |
if (useDefaultLocation.getSelection()) { |
6
f65f740e69f9
AnalyzeTool Carbide Extension v1.9.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
1
diff
changeset
|
490 |
atoolDirText.setEnabled(false); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
491 |
browseButton.setEnabled(false); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
492 |
atoolDir.setEnabled(false); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
493 |
useUserSpecified.setSelection(false); |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
494 |
updateAtoolVersion(null); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
495 |
} else { |
6
f65f740e69f9
AnalyzeTool Carbide Extension v1.9.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
1
diff
changeset
|
496 |
atoolDirText.setEnabled(true); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
497 |
browseButton.setEnabled(true); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
498 |
atoolDir.setEnabled(true); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
499 |
useUserSpecified.setSelection(true); |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
500 |
updateAtoolVersion(atoolDirText.getText()); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
501 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
502 |
} |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
503 |
|
6
f65f740e69f9
AnalyzeTool Carbide Extension v1.9.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
1
diff
changeset
|
504 |
/* |
f65f740e69f9
AnalyzeTool Carbide Extension v1.9.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
1
diff
changeset
|
505 |
* (non-Javadoc) |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
506 |
* |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
507 |
* @see |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
508 |
* org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets. |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
509 |
* Event) |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
510 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
511 |
public final void handleEvent(final Event event) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
512 |
if (event.widget == browseButton) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
513 |
openFolderDialog(); |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
514 |
} else if (event.widget == externalFastButton |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
515 |
|| event.widget == askButton) { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
516 |
setFileModeEnabled(false); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
517 |
} else if (event.widget == s60Button) { |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
518 |
setFileModeEnabled(true); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
519 |
} else if (event.widget == useDefaultLocation |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
520 |
|| event.widget == atoolDir) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
521 |
handleDefaultLocationChange(); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
522 |
} else if (event.widget == zeroButton || event.widget == fortyButton |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
523 |
|| event.widget == hundredButton) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
524 |
spinner.setEnabled(false); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
525 |
} else if (event.widget == customButton) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
526 |
spinner.setEnabled(true); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
527 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
528 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
529 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
530 |
/* |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
531 |
* (non-Javadoc) |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
532 |
* |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
533 |
* @see |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
534 |
* org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
535 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
536 |
public void init(final IWorkbench workbench) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
537 |
// MethodDeclaration/Block[count(BlockStatement) = 0 and |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
538 |
// @containsComment = 'false'] |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
539 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
540 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
541 |
/** |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
542 |
* Opens folder selection dialog. |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
543 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
544 |
public final void openFolderDialog() { |
6
f65f740e69f9
AnalyzeTool Carbide Extension v1.9.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
1
diff
changeset
|
545 |
DirectoryDialog folderDialog = new DirectoryDialog(atoolDirText |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
546 |
.getShell(), SWT.OPEN); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
547 |
folderDialog.setText(Constants.PREFS_SELECT_DIR); |
6
f65f740e69f9
AnalyzeTool Carbide Extension v1.9.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
1
diff
changeset
|
548 |
folderDialog.setFilterPath(atoolDirText.getText()); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
549 |
String folderPath = folderDialog.open(); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
550 |
if (folderPath != null) { |
6
f65f740e69f9
AnalyzeTool Carbide Extension v1.9.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
1
diff
changeset
|
551 |
atoolDirText.setText(folderPath); |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
552 |
updateAtoolVersion(atoolDirText.getText()); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
553 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
554 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
555 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
556 |
/** |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
557 |
* Perform defaults for AnalyzeTool preferences. |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
558 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
559 |
@Override |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
560 |
public final void performDefaults() { |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
561 |
setGroupButtons(Constants.LOGGING_EXT_FAST); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
562 |
atoolDirText.setText(Constants.DEFAULT_ATOOL_FOLDER); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
563 |
useDefaultLocation.setSelection(true); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
564 |
handleDefaultLocationChange(); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
565 |
verboseButton.setSelection(false); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
566 |
zeroButton.setSelection(false); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
567 |
fortyButton.setSelection(true); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
568 |
hundredButton.setSelection(false); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
569 |
customButton.setSelection(false); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
570 |
spinner.setEnabled(false); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
571 |
|
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
572 |
logPathText.setText("C:\\logs\\atool\\"); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
573 |
fileNameText.setText("%processname%.dat"); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
574 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
575 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
576 |
/** |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
577 |
* Stores selected values When user press "Ok" or "apply" button this method |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
578 |
* is called |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
579 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
580 |
@Override |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
581 |
public final boolean performOk() { |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
582 |
|
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
583 |
IPreferenceStore store = Activator.getPreferences(); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
584 |
|
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
585 |
// use default location is selected |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
586 |
if (useDefaultLocation.getSelection()) { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
587 |
store.setValue(Constants.ATOOL_FOLDER, Util |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
588 |
.getDefaultAtoolLocation()); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
589 |
store.setValue(Constants.USE_INTERNAL, true); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
590 |
} |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
591 |
// using user specified atool.exe location and the folder contains |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
592 |
// atool.exe |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
593 |
else { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
594 |
store.setValue(Constants.ATOOL_FOLDER, atoolDirText.getText()); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
595 |
store.setValue(Constants.USER_SELECTED_FOLDER, atoolDirText |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
596 |
.getText()); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
597 |
store.setValue(Constants.USE_INTERNAL, false); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
598 |
} |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
599 |
|
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
600 |
// store logging mode |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
601 |
if (askButton.getSelection()) { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
602 |
store.setValue(Constants.LOGGING_MODE, |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
603 |
Constants.LOGGING_ASK_ALLWAYS); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
604 |
} else if (s60Button.getSelection()) { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
605 |
store.setValue(Constants.LOGGING_MODE, Constants.LOGGING_S60); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
606 |
} else if (externalFastButton.getSelection()) { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
607 |
store.setValue(Constants.LOGGING_MODE, Constants.LOGGING_EXT_FAST); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
608 |
} |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
609 |
store.setValue(Constants.DEVICE_LOG_FILE_PATH, logPathText.getText()); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
610 |
store.setValue(Constants.DEVICE_LOG_FILE_NAME, fileNameText.getText()); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
611 |
|
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
612 |
// store value of verbose atool.exe output |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
613 |
store.setValue(Constants.ATOOL_VERBOSE, verboseButton.getSelection()); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
614 |
|
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
615 |
// update preference value |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
616 |
// this values is used later when UI creates/update toolbar options and |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
617 |
// when building project with "ask always" option |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
618 |
if (externalFastButton.isEnabled()) { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
619 |
store.setValue(Constants.LOGGING_FAST_ENABLED, true); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
620 |
} else { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
621 |
store.setValue(Constants.LOGGING_FAST_ENABLED, false); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
622 |
} |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
623 |
|
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
624 |
// get callstack size |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
625 |
int size = 0; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
626 |
boolean userDefinedCSSize = false; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
627 |
if (zeroButton.getSelection() && zeroButton.isEnabled()) { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
628 |
userDefinedCSSize = true; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
629 |
} else if (fortyButton.getSelection() && fortyButton.isEnabled()) { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
630 |
size = 40; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
631 |
userDefinedCSSize = true; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
632 |
} else if (hundredButton.getSelection() && hundredButton.isEnabled()) { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
633 |
size = 100; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
634 |
userDefinedCSSize = true; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
635 |
} else if (customButton.getSelection() && customButton.isEnabled()) { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
636 |
size = spinner.getSelection(); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
637 |
userDefinedCSSize = true; |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
638 |
} |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
639 |
|
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
640 |
// store callstack size |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
641 |
store.setValue(Constants.USE_CALLSTACK_SIZE, userDefinedCSSize); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
642 |
store.setValue(Constants.CALLSTACK_SIZE, size); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
643 |
|
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
644 |
// update view with new settings |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
645 |
IActionListener listener = Activator.getActionListener(); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
646 |
if (listener != null) { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
647 |
listener.preferenceChanged(); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
648 |
} |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
649 |
|
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
650 |
// store report detail level prefs |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
651 |
return super.performOk(); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
652 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
653 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
654 |
/** |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
655 |
* Sets S60 file options visible. |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
656 |
* |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
657 |
* @param enabled |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
658 |
* Is buttons enabled. |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
659 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
660 |
private void setFileModeEnabled(final boolean enabled) { |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
661 |
logPath.setEnabled(enabled); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
662 |
logPathText.setEnabled(enabled); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
663 |
fileName.setEnabled(enabled); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
664 |
fileNameText.setEnabled(enabled); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
665 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
666 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
667 |
/** |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
668 |
* Changes logging mode buttons. |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
669 |
* |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
670 |
* @param mode |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
671 |
* Which mode is used |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
672 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
673 |
private void setGroupButtons(final String mode) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
674 |
if (mode.equals(Constants.LOGGING_S60)) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
675 |
externalFastButton.setSelection(false); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
676 |
s60Button.setSelection(true); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
677 |
askButton.setSelection(false); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
678 |
setFileModeEnabled(true); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
679 |
} else if (mode.equals(Constants.LOGGING_ASK_ALLWAYS)) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
680 |
externalFastButton.setSelection(false); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
681 |
s60Button.setSelection(false); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
682 |
askButton.setSelection(true); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
683 |
setFileModeEnabled(false); |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
684 |
} else if (mode.equals(Constants.LOGGING_EXT_FAST)) { |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
685 |
externalFastButton.setSelection(true); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
686 |
s60Button.setSelection(false); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
687 |
askButton.setSelection(false); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
688 |
setFileModeEnabled(false); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
689 |
} |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
690 |
// else { |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
691 |
// externalButton.setSelection(true); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
692 |
// externalFastButton.setSelection(false); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
693 |
// s60Button.setSelection(false); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
694 |
// askButton.setSelection(false); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
695 |
// setFileModeEnabled(false); |
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
696 |
// } |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
697 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
698 |
|
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
699 |
/** |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
700 |
* Update atool.exe version number. |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
701 |
* |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
702 |
* @param path |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
703 |
* Atool.exe location |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
704 |
*/ |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
705 |
private void updateAtoolVersion(final String path) { |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
706 |
atoolVerLabel.setText(Util.getAtoolVersionNumber(path)); |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
707 |
atoolVerLabel.update(); |
15
0367d2db2c06
AnalyzeTool Carbide extension 1.10.0
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
6
diff
changeset
|
708 |
checkState(); |
1
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
709 |
} |
1050670c6980
Initial version of AnalyzeTool under EPL
Matti Laitinen <matti.t.laitinen@nokia.com>
parents:
diff
changeset
|
710 |
} |