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

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

Issue 965393004: Expose 'typeProvider' from AnalysisContext. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/all_the_rest_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c5e99c1081ef764c4ff0ebd4885d9f95fdd84e8e..2a9bbf82f259326e26f4e42b27db1541e215e28d 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -419,6 +419,12 @@ abstract class AnalysisContext {
set name(String name);
/**
+ * Returns a type provider for this context or throws [AnalysisException] if
+ * `dart:core` or `dart:async` cannot be resolved.
+ */
+ TypeProvider get typeProvider;
+
+ /**
* The stream that is notified when sources have been added or removed,
* or the source's content has changed.
*/
@@ -9474,15 +9480,6 @@ abstract class InternalAnalysisContext implements AnalysisContext {
*/
AnalysisContextStatistics get statistics;
- /**
- * Returns a type provider for this context or throws an exception if dart:core cannot be
- * resolved.
- *
- * @return the type provider (not `null`)
- * @throws AnalysisException if dart:core cannot be resolved
- */
- TypeProvider get typeProvider;
-
/** A factory to override how [TypeResolverVisitor] is created. */
TypeResolverVisitorFactory get typeResolverVisitorFactory;
@@ -11007,8 +11004,7 @@ class ResolveDartUnitTask extends AnalysisTask {
@override
void internalPerform() {
- TypeProvider typeProvider =
- (_libraryElement.context as InternalAnalysisContext).typeProvider;
+ TypeProvider typeProvider = _libraryElement.context.typeProvider;
CompilationUnit unit = context.computeResolvableCompilationUnit(source);
if (unit == null) {
throw new AnalysisException(
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/all_the_rest_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698