OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 analyzer.src.task.dart_work_manager; | 5 library analyzer.src.task.dart_work_manager; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'package:analyzer/src/context/cache.dart'; | 9 import 'package:analyzer/src/context/cache.dart'; |
10 import 'package:analyzer/src/generated/engine.dart' | 10 import 'package:analyzer/src/generated/engine.dart' |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 shouldSetErrors = true; | 344 shouldSetErrors = true; |
345 } | 345 } |
346 }); | 346 }); |
347 if (shouldSetErrors) { | 347 if (shouldSetErrors) { |
348 AnalysisErrorInfo info = context.getErrors(source); | 348 AnalysisErrorInfo info = context.getErrors(source); |
349 context.getNotice(source).setErrors(info.errors, info.lineInfo); | 349 context.getNotice(source).setErrors(info.errors, info.lineInfo); |
350 } | 350 } |
351 } | 351 } |
352 } | 352 } |
353 | 353 |
| 354 /** |
| 355 * The given unit was incrementally resolved. Some of its error results might |
| 356 * have been invalidated, so we schedule it for computing errors. |
| 357 */ |
354 void unitIncrementallyResolved(Source librarySource, Source unitSource) { | 358 void unitIncrementallyResolved(Source librarySource, Source unitSource) { |
355 librarySourceQueue.add(librarySource); | 359 librarySourceQueue.add(librarySource); |
356 } | 360 } |
357 | 361 |
358 /** | 362 /** |
359 * Ask the [context]'s result provider for [CONTAINING_LIBRARIES]. | 363 * Ask the [context]'s result provider for [CONTAINING_LIBRARIES]. |
360 * Return the list of containing libraries, or `null` if unknown. | 364 * Return the list of containing libraries, or `null` if unknown. |
361 */ | 365 */ |
362 List<Source> _getLibrariesContainingPartFromResultProvider(Source part) { | 366 List<Source> _getLibrariesContainingPartFromResultProvider(Source part) { |
363 CacheEntry cacheEntry = context.getCacheEntry(part); | 367 CacheEntry cacheEntry = context.getCacheEntry(part); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 } | 491 } |
488 } | 492 } |
489 | 493 |
490 bool _shouldErrorsBeComputed(Source source) => | 494 bool _shouldErrorsBeComputed(Source source) => |
491 context.shouldErrorsBeAnalyzed(source); | 495 context.shouldErrorsBeAnalyzed(source); |
492 | 496 |
493 static bool _isDartSource(AnalysisTarget target) { | 497 static bool _isDartSource(AnalysisTarget target) { |
494 return target is Source && AnalysisEngine.isDartFileName(target.fullName); | 498 return target is Source && AnalysisEngine.isDartFileName(target.fullName); |
495 } | 499 } |
496 } | 500 } |
OLD | NEW |