| 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 /** | 379 /** |
| 380 * Add the file with the given [path] to the set of files to analyze. | 380 * Add the file with the given [path] to the set of files to analyze. |
| 381 * | 381 * |
| 382 * The [path] must be absolute and normalized. | 382 * The [path] must be absolute and normalized. |
| 383 * | 383 * |
| 384 * The results of analysis are eventually produced by the [results] stream. | 384 * The results of analysis are eventually produced by the [results] stream. |
| 385 */ | 385 */ |
| 386 void addFile(String path) { | 386 void addFile(String path) { |
| 387 if (AnalysisEngine.isDartFileName(path)) { | 387 if (AnalysisEngine.isDartFileName(path)) { |
| 388 _addedFiles.add(path); | 388 _addedFiles.add(path); |
| 389 _changedFiles.add(path); | |
| 390 _filesToAnalyze.add(path); | 389 _filesToAnalyze.add(path); |
| 391 } | 390 } |
| 392 _statusSupport.transitionToAnalyzing(); | 391 _statusSupport.transitionToAnalyzing(); |
| 393 _scheduler._notify(this); | 392 _scheduler._notify(this); |
| 394 } | 393 } |
| 395 | 394 |
| 396 /** | 395 /** |
| 397 * The file with the given [path] might have changed - updated, added or | 396 * The file with the given [path] might have changed - updated, added or |
| 398 * removed. Or not, we don't know. Or it might have, but then changed back. | 397 * removed. Or not, we don't know. Or it might have, but then changed back. |
| 399 * | 398 * |
| (...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1530 libraryDeclarations.add(new TopLevelDeclarationInSource( | 1529 libraryDeclarations.add(new TopLevelDeclarationInSource( |
| 1531 file.source, declaration, isExported)); | 1530 file.source, declaration, isExported)); |
| 1532 } | 1531 } |
| 1533 } | 1532 } |
| 1534 } | 1533 } |
| 1535 | 1534 |
| 1536 // We're not done yet. | 1535 // We're not done yet. |
| 1537 return false; | 1536 return false; |
| 1538 } | 1537 } |
| 1539 } | 1538 } |
| OLD | NEW |