| 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/context/context_root.dart'; | 9 import 'package:analyzer/context/context_root.dart'; |
| 10 import 'package:analyzer/context/declared_variables.dart'; | 10 import 'package:analyzer/context/declared_variables.dart'; |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 } | 443 } |
| 444 if (_fileTracker.hasPendingFiles) { | 444 if (_fileTracker.hasPendingFiles) { |
| 445 return AnalysisDriverPriority.general; | 445 return AnalysisDriverPriority.general; |
| 446 } | 446 } |
| 447 if (_requestedParts.isNotEmpty || _partsToAnalyze.isNotEmpty) { | 447 if (_requestedParts.isNotEmpty || _partsToAnalyze.isNotEmpty) { |
| 448 return AnalysisDriverPriority.general; | 448 return AnalysisDriverPriority.general; |
| 449 } | 449 } |
| 450 return AnalysisDriverPriority.nothing; | 450 return AnalysisDriverPriority.nothing; |
| 451 } | 451 } |
| 452 | 452 |
| 453 /** | 453 @override |
| 454 * Add the file with the given [path] to the set of files to analyze. | |
| 455 * | |
| 456 * The [path] must be absolute and normalized. | |
| 457 * | |
| 458 * The results of analysis are eventually produced by the [results] stream. | |
| 459 */ | |
| 460 void addFile(String path) { | 454 void addFile(String path) { |
| 461 if (!_fsState.hasUri(path)) { | 455 if (!_fsState.hasUri(path)) { |
| 462 return; | 456 return; |
| 463 } | 457 } |
| 464 if (AnalysisEngine.isDartFileName(path)) { | 458 if (AnalysisEngine.isDartFileName(path)) { |
| 465 _fileTracker.addFile(path); | 459 _fileTracker.addFile(path); |
| 466 } | 460 } |
| 467 } | 461 } |
| 468 | 462 |
| 469 /** | 463 /** |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1337 * between priority files, nor between priority and non-priority files. | 1331 * between priority files, nor between priority and non-priority files. |
| 1338 */ | 1332 */ |
| 1339 void set priorityFiles(List<String> priorityPaths); | 1333 void set priorityFiles(List<String> priorityPaths); |
| 1340 | 1334 |
| 1341 /** | 1335 /** |
| 1342 * Return the priority of work that the driver needs to perform. | 1336 * Return the priority of work that the driver needs to perform. |
| 1343 */ | 1337 */ |
| 1344 AnalysisDriverPriority get workPriority; | 1338 AnalysisDriverPriority get workPriority; |
| 1345 | 1339 |
| 1346 /** | 1340 /** |
| 1341 * Add the file with the given [path] to the set of files that are explicitly |
| 1342 * being analyzed. |
| 1343 * |
| 1344 * The [path] must be absolute and normalized. |
| 1345 * |
| 1346 * The results of analysis are eventually produced by the [results] stream. |
| 1347 */ |
| 1348 void addFile(String path); |
| 1349 |
| 1350 /** |
| 1347 * Notify the driver that the client is going to stop using it. | 1351 * Notify the driver that the client is going to stop using it. |
| 1348 */ | 1352 */ |
| 1349 void dispose(); | 1353 void dispose(); |
| 1350 | 1354 |
| 1351 /** | 1355 /** |
| 1352 * Perform a single chunk of work and produce [results]. | 1356 * Perform a single chunk of work and produce [results]. |
| 1353 */ | 1357 */ |
| 1354 Future<Null> performWork(); | 1358 Future<Null> performWork(); |
| 1355 } | 1359 } |
| 1356 | 1360 |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1998 libraryDeclarations.add(new TopLevelDeclarationInSource( | 2002 libraryDeclarations.add(new TopLevelDeclarationInSource( |
| 1999 file.source, declaration, isExported)); | 2003 file.source, declaration, isExported)); |
| 2000 } | 2004 } |
| 2001 } | 2005 } |
| 2002 } | 2006 } |
| 2003 | 2007 |
| 2004 // We're not done yet. | 2008 // We're not done yet. |
| 2005 return false; | 2009 return false; |
| 2006 } | 2010 } |
| 2007 } | 2011 } |
| OLD | NEW |