@@ -159,12 +159,19 @@ private void ViewModelOnPropertyChanged(object sender, PropertyChangedEventArgs
159
159
public IOpenDocumentHelper OpenDocumentHelper { get { return _openDocumentHelper ; } }
160
160
161
161
public void OnFileSystemTreeComputing ( ) {
162
- var items = CreateInfromationMessages ( "Loading files from VS Chromium projects...)" ) ;
163
- ViewModel . SetInformationMessages ( items ) ;
162
+ // Display a generic "loading" message the first time a file system tree
163
+ // is loaded.
164
+ if ( ! ViewModel . FileSystemTreeAvailable ) {
165
+ var items = CreateInfromationMessages (
166
+ "Loading files from VS Chromium projects..." ) ;
167
+ ViewModel . SetInformationMessages ( items ) ;
164
168
165
- if ( ! ViewModel . FileSystemTreeAvailable || ViewModel . ActiveDisplay == CodeSearchViewModel . DisplayKind . InformationMessages ) {
166
- _searchResultDocumentChangeTracker . Disable ( ) ;
167
- ViewModel . SwitchToInformationMessages ( ) ;
169
+ // Display the new info messages, except if there is an active search
170
+ // result.
171
+ if ( ViewModel . ActiveDisplay == CodeSearchViewModel . DisplayKind . InformationMessages ) {
172
+ _searchResultDocumentChangeTracker . Disable ( ) ;
173
+ ViewModel . SwitchToInformationMessages ( ) ;
174
+ }
168
175
}
169
176
}
170
177
@@ -174,17 +181,19 @@ public void OnFileSystemTreeComputed(FileSystemTree tree) {
174
181
175
182
if ( ViewModel . FileSystemTreeAvailable ) {
176
183
var items = CreateInfromationMessages (
177
- "No search results available - Type text to search for in the \" Search Code\" or \" File Paths\" text box." ) ;
184
+ "No search results available - Type text to search for " +
185
+ "in the \" Search Code\" or \" File Paths\" text box." ) ;
178
186
ViewModel . SetInformationMessages ( items ) ;
179
187
if ( ViewModel . ActiveDisplay == CodeSearchViewModel . DisplayKind . InformationMessages ) {
180
188
_searchResultDocumentChangeTracker . Disable ( ) ;
181
189
ViewModel . SwitchToInformationMessages ( ) ;
182
190
}
183
191
184
192
RefreshView ( tree . Version ) ;
193
+ FetchDatabaseStatistics ( ) ;
185
194
} else {
186
195
var items = CreateInfromationMessages (
187
- string . Format ( "Open a source file from a local Chromium enlistment or" ) + "\r \n " +
196
+ "Open a source file from a local Chromium enlistment or" + "\r \n " +
188
197
string . Format ( "from a directory containing a \" {0}\" file." , ConfigurationFileNames . ProjectFileName ) ) ;
189
198
ViewModel . SetInformationMessages ( items ) ;
190
199
_searchResultDocumentChangeTracker . Disable ( ) ;
@@ -203,11 +212,12 @@ public void OnFilesLoading() {
203
212
}
204
213
205
214
public void OnFilesLoadingProgress ( ) {
206
- RefreshView ( - 1 ) ;
215
+ FetchDatabaseStatistics ( ) ;
207
216
}
208
217
209
218
public void OnFilesLoaded ( long treeVersion ) {
210
219
RefreshView ( treeVersion ) ;
220
+ FetchDatabaseStatistics ( ) ;
211
221
}
212
222
213
223
/// <summary>
@@ -227,7 +237,6 @@ private void RefreshView(long treeVersion) {
227
237
// Add top level nodes in search results explaining results may be outdated
228
238
AddResultsOutdatedMessage ( ) ;
229
239
}
230
- FetchDatabaseStatistics ( ) ;
231
240
}
232
241
233
242
public void CancelSearch ( ) {
0 commit comments