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

Unified Diff: lib/src/dart_sdk.dart

Issue 2331833002: Switch to FolderBasedDartSdk. (Closed)
Patch Set: Created 4 years, 3 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 | lib/src/resolvers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/dart_sdk.dart
diff --git a/lib/src/dart_sdk.dart b/lib/src/dart_sdk.dart
index 801de33bb0b179463df320a7fda6dc2a78f888d9..2b56f8627680c5d913efae9a1822051c6a169072 100644
--- a/lib/src/dart_sdk.dart
+++ b/lib/src/dart_sdk.dart
@@ -6,14 +6,11 @@ library code_transformers.src.dart_sdk;
import 'dart:io' show Directory;
-/// Note that the Analyzer has two versions of SdkAnalysisContext (and lots of
-/// other classes) with different signatures: can't mix the two.
-import 'package:analyzer/src/generated/engine.dart'
- show AnalysisOptions, InternalAnalysisContext, TimestampedData;
-import 'package:analyzer/src/context/context.dart' show SdkAnalysisContext;
-import 'package:analyzer/src/generated/java_io.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/context/context.dart';
+import 'package:analyzer/src/dart/sdk/sdk.dart';
+import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/sdk.dart';
-import 'package:analyzer/src/generated/sdk_io.dart' show DirectoryBasedDartSdk;
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/summary/idl.dart';
import 'package:cli_util/cli_util.dart' as cli_util;
@@ -36,9 +33,10 @@ abstract class UriAnnotatedSource extends Source {
/// Dart SDK which wraps all Dart sources as [UriAnnotatedSource] to ensure they
/// are tracked with Uris.
-class DirectoryBasedDartSdkProxy extends DirectoryBasedDartSdk {
- DirectoryBasedDartSdkProxy(String sdkDirectory)
- : super(new JavaFile(sdkDirectory));
+class FolderBasedDartSdkProxy extends FolderBasedDartSdk {
+ FolderBasedDartSdkProxy(
+ ResourceProvider resourceProvider, String sdkDirectory)
+ : super(resourceProvider, resourceProvider.getFolder(sdkDirectory));
Source mapDartUri(String dartUri) =>
DartSourceProxy.wrap(super.mapDartUri(dartUri), Uri.parse(dartUri));
« no previous file with comments | « no previous file | lib/src/resolvers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698