OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'dart:collection'; | 6 import 'dart:collection'; |
7 import 'dart:typed_data'; | 7 import 'dart:typed_data'; |
8 | 8 |
9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
10 import 'package:analyzer/dart/element/element.dart' show CompilationUnitElement; | 10 import 'package:analyzer/dart/element/element.dart' show CompilationUnitElement; |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 /** | 377 /** |
378 * Add the file with the given [path] to the set of files to analyze. | 378 * Add the file with the given [path] to the set of files to analyze. |
379 * | 379 * |
380 * The [path] must be absolute and normalized. | 380 * The [path] must be absolute and normalized. |
381 * | 381 * |
382 * The results of analysis are eventually produced by the [results] stream. | 382 * The results of analysis are eventually produced by the [results] stream. |
383 */ | 383 */ |
384 void addFile(String path) { | 384 void addFile(String path) { |
385 if (AnalysisEngine.isDartFileName(path)) { | 385 if (AnalysisEngine.isDartFileName(path)) { |
386 _explicitFiles.add(path); | 386 _explicitFiles.add(path); |
| 387 _changedFiles.add(path); |
387 _filesToAnalyze.add(path); | 388 _filesToAnalyze.add(path); |
388 } | 389 } |
389 _statusSupport.transitionToAnalyzing(); | 390 _statusSupport.transitionToAnalyzing(); |
390 _scheduler._notify(this); | 391 _scheduler._notify(this); |
391 } | 392 } |
392 | 393 |
393 /** | 394 /** |
394 * The file with the given [path] might have changed - updated, added or | 395 * The file with the given [path] might have changed - updated, added or |
395 * removed. Or not, we don't know. Or it might have, but then changed back. | 396 * removed. Or not, we don't know. Or it might have, but then changed back. |
396 * | 397 * |
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1523 libraryDeclarations.add(new TopLevelDeclarationInSource( | 1524 libraryDeclarations.add(new TopLevelDeclarationInSource( |
1524 file.source, declaration, isExported)); | 1525 file.source, declaration, isExported)); |
1525 } | 1526 } |
1526 } | 1527 } |
1527 } | 1528 } |
1528 | 1529 |
1529 // We're not done yet. | 1530 // We're not done yet. |
1530 return false; | 1531 return false; |
1531 } | 1532 } |
1532 } | 1533 } |
OLD | NEW |