| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analysis.server; | 5 library analysis.server; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:core'; | 9 import 'dart:core'; |
| 10 import 'dart:io' as io; | 10 import 'dart:io' as io; |
| (...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1165 | 1165 |
| 1166 /** | 1166 /** |
| 1167 * Send status notification to the client. The state of analysis is given by | 1167 * Send status notification to the client. The state of analysis is given by |
| 1168 * the [status] information. | 1168 * the [status] information. |
| 1169 */ | 1169 */ |
| 1170 void sendStatusNotificationNew(nd.AnalysisStatus status) { | 1170 void sendStatusNotificationNew(nd.AnalysisStatus status) { |
| 1171 if (_onAnalysisCompleteCompleter != null && !status.isAnalyzing) { | 1171 if (_onAnalysisCompleteCompleter != null && !status.isAnalyzing) { |
| 1172 _onAnalysisCompleteCompleter.complete(); | 1172 _onAnalysisCompleteCompleter.complete(); |
| 1173 _onAnalysisCompleteCompleter = null; | 1173 _onAnalysisCompleteCompleter = null; |
| 1174 } | 1174 } |
| 1175 // Perform on-idle actions. |
| 1176 if (!status.isAnalyzing) { |
| 1177 if (generalAnalysisServices |
| 1178 .contains(GeneralAnalysisService.ANALYZED_FILES)) { |
| 1179 sendAnalysisNotificationAnalyzedFiles(this); |
| 1180 } |
| 1181 } |
| 1175 // Only send status when subscribed. | 1182 // Only send status when subscribed. |
| 1176 if (!serverServices.contains(ServerService.STATUS)) { | 1183 if (!serverServices.contains(ServerService.STATUS)) { |
| 1177 return; | 1184 return; |
| 1178 } | 1185 } |
| 1179 // Only send status when it changes | 1186 // Only send status when it changes |
| 1180 if (statusAnalyzing == status.isAnalyzing) { | 1187 if (statusAnalyzing == status.isAnalyzing) { |
| 1181 return; | 1188 return; |
| 1182 } | 1189 } |
| 1183 statusAnalyzing = status.isAnalyzing; | 1190 statusAnalyzing = status.isAnalyzing; |
| 1184 AnalysisStatus analysis = new AnalysisStatus(status.isAnalyzing); | 1191 AnalysisStatus analysis = new AnalysisStatus(status.isAnalyzing); |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2113 /** | 2120 /** |
| 2114 * The [PerformanceTag] for time spent in server request handlers. | 2121 * The [PerformanceTag] for time spent in server request handlers. |
| 2115 */ | 2122 */ |
| 2116 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); | 2123 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); |
| 2117 | 2124 |
| 2118 /** | 2125 /** |
| 2119 * The [PerformanceTag] for time spent in split store microtasks. | 2126 * The [PerformanceTag] for time spent in split store microtasks. |
| 2120 */ | 2127 */ |
| 2121 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 2128 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
| 2122 } | 2129 } |
| OLD | NEW |