|
1 /* |
|
2 * Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 using System; |
|
19 using System.Collections.Generic; |
|
20 using System.ComponentModel; |
|
21 using System.Drawing; |
|
22 using System.Data; |
|
23 using System.Text; |
|
24 using System.Windows.Forms; |
|
25 using CAPRawStack.Plugin; |
|
26 using CrashAnalyserEngine.Tabs; |
|
27 using CrashAnalyserEngine.Engine; |
|
28 using CrashAnalyserEngine.Interfaces; |
|
29 using SymbianStackLib.Engine; |
|
30 using SymbianStackLib.Data.Source; |
|
31 using SymbianStackLib.Data.Output; |
|
32 using SymbianStackLib.Data.Output.Entry; |
|
33 using SymbianStackLibUi.GUI; |
|
34 |
|
35 namespace CAPluginRawStackUi.Tabs |
|
36 { |
|
37 internal partial class CATabStackViewer : CATab |
|
38 { |
|
39 #region Constructors |
|
40 public CATabStackViewer( CAPluginRawStack aPlugin ) |
|
41 { |
|
42 InitializeComponent(); |
|
43 // |
|
44 iPlugin = aPlugin; |
|
45 base.Title = "Call Stack"; |
|
46 } |
|
47 #endregion |
|
48 |
|
49 #region Properties |
|
50 #endregion |
|
51 |
|
52 #region Event handlers |
|
53 private void CATabStackViewer_Load( object sender, EventArgs e ) |
|
54 { |
|
55 StackEngine stackEngine = iPlugin.StackEngine; |
|
56 |
|
57 try |
|
58 { |
|
59 StackEngineProgressDialog.ReconstructStack( stackEngine ); |
|
60 } |
|
61 catch( Exception exception ) |
|
62 { |
|
63 iLbl_ErrorMessage.Text = exception.Message; |
|
64 iLbl_ErrorMessage.Visible = true; |
|
65 } |
|
66 |
|
67 iStackViewer.StackData = stackEngine.DataOutput; |
|
68 |
|
69 // Work out if we have any ghosts in the data - this dictates whether |
|
70 // or not we show the "hide ghosts" checkbox. |
|
71 bool seenGhost = false; |
|
72 foreach ( StackOutputEntry entry in stackEngine.DataOutput ) |
|
73 { |
|
74 if ( entry.IsGhost ) |
|
75 { |
|
76 seenGhost = true; |
|
77 break; |
|
78 } |
|
79 } |
|
80 // |
|
81 iCB_HideGhosts.Checked = seenGhost; |
|
82 iCB_HideGhosts.Visible = seenGhost; |
|
83 iStackViewer.OnlyShowEntriesWithSymbols = iCB_MatchExactSymbols.Checked; |
|
84 iStackViewer.HideGhosts = iCB_HideGhosts.Checked; |
|
85 } |
|
86 |
|
87 private void iCB_HideGhosts_CheckedChanged( object sender, EventArgs e ) |
|
88 { |
|
89 bool hideGhosts = iCB_HideGhosts.Checked; |
|
90 iStackViewer.HideGhosts = hideGhosts; |
|
91 iStackViewer.Refresh(); |
|
92 } |
|
93 |
|
94 private void iCB_MatchExactSymbols_CheckedChanged( object sender, EventArgs e ) |
|
95 { |
|
96 bool matchExact = iCB_MatchExactSymbols.Checked; |
|
97 iStackViewer.OnlyShowEntriesWithSymbols = matchExact; |
|
98 iStackViewer.Refresh(); |
|
99 } |
|
100 #endregion |
|
101 |
|
102 #region Internal methods |
|
103 #endregion |
|
104 |
|
105 #region Data members |
|
106 private readonly CAPluginRawStack iPlugin; |
|
107 #endregion |
|
108 } |
|
109 } |