Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 1008443002: Cherry-pick r44373, r44378, and r44275. (Closed) Base URL: https://dart.googlecode.com/svn/trunk/dart
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/generated/engine.dart
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 399959cd4ed2bba0360878d89f0da50d81eb90dc..bf4be15eec24c7dcc028027ba905563ace3900e0 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -451,6 +451,13 @@ abstract class AnalysisContext {
void set sourceFactory(SourceFactory factory);
/**
+ * Return an array containing all of the sources known to this context.
+ *
+ * @return all of the sources known to this context
+ */
+ List<Source> get sources;
+
+ /**
* Returns a type provider for this context or throws [AnalysisException] if
* `dart:core` or `dart:async` cannot be resolved.
*/
@@ -1447,6 +1454,16 @@ class AnalysisContextImpl implements InternalAnalysisContext {
_invalidateAllLocalResolutionInformation(true);
}
+ @override
+ List<Source> get sources {
+ List<Source> sources = new List<Source>();
+ MapIterator<Source, SourceEntry> iterator = _cache.iterator();
+ while (iterator.moveNext()) {
+ sources.add(iterator.key);
+ }
+ return sources;
+ }
+
/**
* Return a list of the sources that would be processed by [performAnalysisTask]. This
* method duplicates, and must therefore be kept in sync with, [getNextAnalysisTask].
« no previous file with comments | « pkg/analysis_server/test/operation/operation_queue_test.dart ('k') | pkg/analyzer/test/generated/engine_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698