| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library analyzer.source.sdk_ext; | 5 library analyzer.source.sdk_ext; |
| 6 | 6 |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 8 import 'dart:core' hide Resource; | 8 import 'dart:core'; |
| 9 | 9 |
| 10 import 'package:analyzer/file_system/file_system.dart'; | 10 import 'package:analyzer/file_system/file_system.dart'; |
| 11 import 'package:analyzer/source/package_map_provider.dart' | 11 import 'package:analyzer/source/package_map_provider.dart' |
| 12 show PackageMapProvider; | 12 show PackageMapProvider; |
| 13 import 'package:analyzer/src/generated/java_io.dart' show JavaFile; | 13 import 'package:analyzer/src/generated/java_io.dart' show JavaFile; |
| 14 import 'package:analyzer/src/generated/source.dart'; | 14 import 'package:analyzer/src/generated/source.dart'; |
| 15 import 'package:analyzer/src/generated/source_io.dart' show FileBasedSource; | 15 import 'package:analyzer/src/generated/source_io.dart' show FileBasedSource; |
| 16 import 'package:path/path.dart' as pathos; | 16 import 'package:path/path.dart' as pathos; |
| 17 | 17 |
| 18 /// Given a packageMap (see [PackageMapProvider]), check in each package's lib | 18 /// Given a packageMap (see [PackageMapProvider]), check in each package's lib |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 /// Resolve a 'part' statement inside an sdk extension. | 198 /// Resolve a 'part' statement inside an sdk extension. |
| 199 Source _resolvePart(Uri libraryEntry, String partPath, Uri importUri) { | 199 Source _resolvePart(Uri libraryEntry, String partPath, Uri importUri) { |
| 200 // Library part. | 200 // Library part. |
| 201 var directory = pathos.dirname(libraryEntry.path); | 201 var directory = pathos.dirname(libraryEntry.path); |
| 202 var partUri = new Uri.file(pathos.join(directory, partPath)); | 202 var partUri = new Uri.file(pathos.join(directory, partPath)); |
| 203 assert(partUri.isAbsolute); | 203 assert(partUri.isAbsolute); |
| 204 JavaFile javaFile = new JavaFile.fromUri(partUri); | 204 JavaFile javaFile = new JavaFile.fromUri(partUri); |
| 205 return new FileBasedSource(javaFile, importUri); | 205 return new FileBasedSource(javaFile, importUri); |
| 206 } | 206 } |
| 207 } | 207 } |
| OLD | NEW |