Commit 999dd6a
Fix RealtimeScanProgressIndicator to properly manage VS status bar progress
Issues fixed:
1. Silent catch blocks: log errors via CxAssistErrorHandler instead of swallowing
- PushScanAsync: log progress bar initialization errors
- PopScanAsync: log progress cleanup errors
- ProgressTimer.Elapsed: log timer execution errors
- Prevents bugs from being hidden forever (enables debugging and diagnostics)
2. VS Progress contract violation: initialize progress before timer starts
- Call statusBar.Progress(ref _progressCookie=0, fInProgress=1) to let VS allocate cookie
- Timer updates with same cookie to fill the bar (0→100%)
- PopScanAsync calls with fInProgress=0 to clear, then resets cookie to 0
- Prevents progress bar from sticking at 100% after scan completes
3. Add clarifying comments on VS Progress API contract requirements
Addresses code review feedback from @cx-rakesh-kadu
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>1 parent ff515da commit 999dd6a
1 file changed
Lines changed: 27 additions & 7 deletions
File tree
- ast-visual-studio-extension/CxExtension/CxAssist/Realtime/Utils
Lines changed: 27 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
88 | | - | |
| 89 | + | |
89 | 90 | | |
| 91 | + | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
| |||
110 | 112 | | |
111 | 113 | | |
112 | 114 | | |
| 115 | + | |
| 116 | + | |
113 | 117 | | |
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
119 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
120 | 140 | | |
121 | 141 | | |
122 | 142 | | |
| |||
128 | 148 | | |
129 | 149 | | |
130 | 150 | | |
131 | | - | |
132 | | - | |
| 151 | + | |
| 152 | + | |
133 | 153 | | |
134 | | - | |
| 154 | + | |
135 | 155 | | |
136 | 156 | | |
137 | 157 | | |
| |||
141 | 161 | | |
142 | 162 | | |
143 | 163 | | |
144 | | - | |
| 164 | + | |
145 | 165 | | |
146 | | - | |
| 166 | + | |
147 | 167 | | |
148 | 168 | | |
149 | 169 | | |
| |||
0 commit comments