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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
7 | 7 |
8 library engine; | 8 library engine; |
9 | 9 |
10 import "dart:math" as math; | 10 import "dart:math" as math; |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 * Set the source factory used to create the sources that can be analyzed in t
his context to the | 444 * Set the source factory used to create the sources that can be analyzed in t
his context to the |
445 * given source factory. Clients can safely assume that all analysis results h
ave been | 445 * given source factory. Clients can safely assume that all analysis results h
ave been |
446 * invalidated. | 446 * invalidated. |
447 * | 447 * |
448 * @param factory the source factory used to create the sources that can be an
alyzed in this | 448 * @param factory the source factory used to create the sources that can be an
alyzed in this |
449 * context | 449 * context |
450 */ | 450 */ |
451 void set sourceFactory(SourceFactory factory); | 451 void set sourceFactory(SourceFactory factory); |
452 | 452 |
453 /** | 453 /** |
| 454 * Return an array containing all of the sources known to this context. |
| 455 * |
| 456 * @return all of the sources known to this context |
| 457 */ |
| 458 List<Source> get sources; |
| 459 |
| 460 /** |
454 * Returns a type provider for this context or throws [AnalysisException] if | 461 * Returns a type provider for this context or throws [AnalysisException] if |
455 * `dart:core` or `dart:async` cannot be resolved. | 462 * `dart:core` or `dart:async` cannot be resolved. |
456 */ | 463 */ |
457 TypeProvider get typeProvider; | 464 TypeProvider get typeProvider; |
458 | 465 |
459 /** | 466 /** |
460 * Add the given listener to the list of objects that are to be notified when
various analysis | 467 * Add the given listener to the list of objects that are to be notified when
various analysis |
461 * results are produced in this context. | 468 * results are produced in this context. |
462 * | 469 * |
463 * @param listener the listener to be added | 470 * @param listener the listener to be added |
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 _sourceFactory.context = null; | 1447 _sourceFactory.context = null; |
1441 } | 1448 } |
1442 factory.context = this; | 1449 factory.context = this; |
1443 _sourceFactory = factory; | 1450 _sourceFactory = factory; |
1444 _coreLibrarySource = _sourceFactory.forUri(DartSdk.DART_CORE); | 1451 _coreLibrarySource = _sourceFactory.forUri(DartSdk.DART_CORE); |
1445 _asyncLibrarySource = _sourceFactory.forUri(DartSdk.DART_ASYNC); | 1452 _asyncLibrarySource = _sourceFactory.forUri(DartSdk.DART_ASYNC); |
1446 _cache = createCacheFromSourceFactory(factory); | 1453 _cache = createCacheFromSourceFactory(factory); |
1447 _invalidateAllLocalResolutionInformation(true); | 1454 _invalidateAllLocalResolutionInformation(true); |
1448 } | 1455 } |
1449 | 1456 |
| 1457 @override |
| 1458 List<Source> get sources { |
| 1459 List<Source> sources = new List<Source>(); |
| 1460 MapIterator<Source, SourceEntry> iterator = _cache.iterator(); |
| 1461 while (iterator.moveNext()) { |
| 1462 sources.add(iterator.key); |
| 1463 } |
| 1464 return sources; |
| 1465 } |
| 1466 |
1450 /** | 1467 /** |
1451 * Return a list of the sources that would be processed by [performAnalysisTas
k]. This | 1468 * Return a list of the sources that would be processed by [performAnalysisTas
k]. This |
1452 * method duplicates, and must therefore be kept in sync with, [getNextAnalysi
sTask]. | 1469 * method duplicates, and must therefore be kept in sync with, [getNextAnalysi
sTask]. |
1453 * This method is intended to be used for testing purposes only. | 1470 * This method is intended to be used for testing purposes only. |
1454 * | 1471 * |
1455 * @return a list of the sources that would be processed by [performAnalysisTa
sk] | 1472 * @return a list of the sources that would be processed by [performAnalysisTa
sk] |
1456 */ | 1473 */ |
1457 List<Source> get sourcesNeedingProcessing { | 1474 List<Source> get sourcesNeedingProcessing { |
1458 HashSet<Source> sources = new HashSet<Source>(); | 1475 HashSet<Source> sources = new HashSet<Source>(); |
1459 bool hintsEnabled = _options.hint; | 1476 bool hintsEnabled = _options.hint; |
(...skipping 10737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12197 visitElement(Element element) { | 12214 visitElement(Element element) { |
12198 if (element.id == _id) { | 12215 if (element.id == _id) { |
12199 result = element; | 12216 result = element; |
12200 throw new _ElementByIdFinderException(); | 12217 throw new _ElementByIdFinderException(); |
12201 } | 12218 } |
12202 super.visitElement(element); | 12219 super.visitElement(element); |
12203 } | 12220 } |
12204 } | 12221 } |
12205 | 12222 |
12206 class _ElementByIdFinderException {} | 12223 class _ElementByIdFinderException {} |
OLD | NEW |