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

Unified Diff: pkg/code_transformers/lib/src/dart_sdk.dart

Issue 318983002: Use parseDirectives were possible. Also mark analyzer ready to be released. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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/code_transformers/lib/src/dart_sdk.dart
diff --git a/pkg/code_transformers/lib/src/dart_sdk.dart b/pkg/code_transformers/lib/src/dart_sdk.dart
index 98f09e9534480e382dde1eeb5d8895edd192bb0a..652c4dfc083b94088dbeed50ca379e2876f0da1f 100644
--- a/pkg/code_transformers/lib/src/dart_sdk.dart
+++ b/pkg/code_transformers/lib/src/dart_sdk.dart
@@ -145,7 +145,7 @@ class MockDartSdk implements DartSdk {
final Map<String, SdkLibrary> _libs = {};
final String sdkVersion = '0';
List<String> get uris => _sources.keys.map((uri) => '$uri').toList();
- final AnalysisContext context = new _SdkAnalysisContext();
+ final AnalysisContext context = new SdkAnalysisContext();
MockDartSdk(Map<String, String> sources, {this.reportMissing}) {
sources.forEach((uriString, contents) {
@@ -208,18 +208,3 @@ class _MockSdkSource implements UriAnnotatedSource {
Source resolveRelative(Uri relativeUri) =>
throw new UnsupportedError('not expecting relative urls in dart: mocks');
}
-
-// TODO(sigmund): delete once we bump the dependency on analyzer. We copied
-// this code from SdkAnalysisContext in 'analyzer/src/generated/engine.dart' to
-// prevent bumping the dependency on analyzer. We should remove this as soon as
-// we start depending on analyzer >= 0.15.5.
-class _SdkAnalysisContext extends AnalysisContextImpl {
- @override
- AnalysisCache createCacheFromSourceFactory(SourceFactory factory) {
- if (factory == null) return super.createCacheFromSourceFactory(factory);
- var sdk = factory.dartSdk;
- if (sdk == null) throw "Missing a DartUriResolver in source factory";
- return new AnalysisCache(
- [AnalysisEngine.instance.partitionManager.forSdk(sdk)]);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698