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' hide Resource; | 9 import 'dart:core' hide Resource; |
10 import 'dart:math' show max; | 10 import 'dart:math' show max; |
(...skipping 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1233 }); | 1233 }); |
1234 // | 1234 // |
1235 // Update the defaults used to create new contexts. | 1235 // Update the defaults used to create new contexts. |
1236 // | 1236 // |
1237 optionUpdaters.forEach((OptionUpdater optionUpdater) { | 1237 optionUpdaters.forEach((OptionUpdater optionUpdater) { |
1238 optionUpdater(defaultContextOptions); | 1238 optionUpdater(defaultContextOptions); |
1239 }); | 1239 }); |
1240 } | 1240 } |
1241 | 1241 |
1242 /** | 1242 /** |
1243 * Return a set of contexts containing all of the resources in the given list | 1243 * Return a set of all contexts whose associated folder is contained within, |
1244 * of [resources]. | 1244 * or equal to, one of the resources in the given list of [resources]. |
1245 */ | 1245 */ |
1246 Set<AnalysisContext> _getContexts(List<Resource> resources) { | 1246 Set<AnalysisContext> _getContexts(List<Resource> resources) { |
1247 Set<AnalysisContext> contexts = new HashSet<AnalysisContext>(); | 1247 Set<AnalysisContext> contexts = new HashSet<AnalysisContext>(); |
1248 resources.forEach((Resource resource) { | 1248 resources.forEach((Resource resource) { |
1249 if (resource is Folder) { | 1249 if (resource is Folder) { |
1250 contexts.addAll(contextManager.contextsInAnalysisRoot(resource)); | 1250 contexts.addAll(contextManager.contextsInAnalysisRoot(resource)); |
1251 } | 1251 } |
1252 }); | 1252 }); |
1253 return contexts; | 1253 return contexts; |
1254 } | 1254 } |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1564 /** | 1564 /** |
1565 * The [PerformanceTag] for time spent in server request handlers. | 1565 * The [PerformanceTag] for time spent in server request handlers. |
1566 */ | 1566 */ |
1567 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); | 1567 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); |
1568 | 1568 |
1569 /** | 1569 /** |
1570 * The [PerformanceTag] for time spent in split store microtasks. | 1570 * The [PerformanceTag] for time spent in split store microtasks. |
1571 */ | 1571 */ |
1572 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 1572 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
1573 } | 1573 } |
OLD | NEW |