OLD | NEW |
1 import 'dart:io' as io; | 1 import 'dart:io' as io; |
2 | 2 |
3 import 'package:analyzer/dart/element/element.dart'; | 3 import 'package:analyzer/dart/element/element.dart'; |
4 import 'package:analyzer/file_system/file_system.dart'; | 4 import 'package:analyzer/file_system/file_system.dart'; |
5 import 'package:analyzer/src/context/cache.dart'; | 5 import 'package:analyzer/src/context/cache.dart'; |
6 import 'package:analyzer/src/context/context.dart'; | 6 import 'package:analyzer/src/context/context.dart'; |
7 import 'package:analyzer/src/dart/element/element.dart'; | 7 import 'package:analyzer/src/dart/element/element.dart'; |
8 import 'package:analyzer/src/generated/engine.dart'; | 8 import 'package:analyzer/src/generated/engine.dart'; |
9 import 'package:analyzer/src/generated/java_io.dart'; | 9 import 'package:analyzer/src/generated/java_io.dart'; |
10 import 'package:analyzer/src/generated/resolver.dart'; | 10 import 'package:analyzer/src/generated/resolver.dart'; |
11 import 'package:analyzer/src/generated/source.dart'; | 11 import 'package:analyzer/src/generated/source.dart'; |
12 import 'package:analyzer/src/generated/source_io.dart'; | 12 import 'package:analyzer/src/generated/source_io.dart'; |
13 import 'package:analyzer/src/generated/utilities_dart.dart'; | 13 import 'package:analyzer/src/generated/utilities_dart.dart'; |
14 import 'package:analyzer/src/source/source_resource.dart'; | 14 import 'package:analyzer/src/source/source_resource.dart'; |
15 import 'package:analyzer/src/summary/format.dart'; | 15 import 'package:analyzer/src/summary/format.dart'; |
16 import 'package:analyzer/src/summary/idl.dart'; | 16 import 'package:analyzer/src/summary/idl.dart'; |
17 import 'package:analyzer/src/summary/resynthesize.dart'; | 17 import 'package:analyzer/src/summary/resynthesize.dart'; |
18 import 'package:analyzer/src/task/dart.dart'; | 18 import 'package:analyzer/src/task/dart.dart'; |
19 import 'package:analyzer/src/util/fast_uri.dart'; | 19 import 'package:analyzer/src/util/fast_uri.dart'; |
20 import 'package:analyzer/task/dart.dart'; | 20 import 'package:analyzer/task/dart.dart'; |
21 import 'package:analyzer/task/general.dart'; | 21 import 'package:analyzer/task/general.dart'; |
22 import 'package:analyzer/task/model.dart'; | 22 import 'package:analyzer/task/model.dart'; |
23 import 'package:path/path.dart' as pathos; | 23 import 'package:path/path.dart' as pathos; |
| 24 import 'package:source_span/source_span.dart' as source_span; |
24 | 25 |
25 /** | 26 /** |
26 * The [ResultProvider] that provides results from input package summaries. | 27 * The [ResultProvider] that provides results from input package summaries. |
27 */ | 28 */ |
28 class InputPackagesResultProvider extends ResynthesizerResultProvider { | 29 class InputPackagesResultProvider extends ResynthesizerResultProvider { |
29 InputPackagesResultProvider( | 30 InputPackagesResultProvider( |
30 InternalAnalysisContext context, SummaryDataStore dataStore) | 31 InternalAnalysisContext context, SummaryDataStore dataStore) |
31 : super(context, dataStore) { | 32 : super(context, dataStore) { |
32 AnalysisContext sdkContext = context.sourceFactory.dartSdk.context; | 33 AnalysisContext sdkContext = context.sourceFactory.dartSdk.context; |
33 createResynthesizer(sdkContext, sdkContext.typeProvider); | 34 createResynthesizer(sdkContext, sdkContext.typeProvider); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 @override | 99 @override |
99 bool get isInSystemLibrary => uri.scheme == DartUriResolver.DART_SCHEME; | 100 bool get isInSystemLibrary => uri.scheme == DartUriResolver.DART_SCHEME; |
100 | 101 |
101 @override | 102 @override |
102 int get modificationStamp => 0; | 103 int get modificationStamp => 0; |
103 | 104 |
104 @override | 105 @override |
105 String get shortName => pathos.basename(fullName); | 106 String get shortName => pathos.basename(fullName); |
106 | 107 |
107 @override | 108 @override |
| 109 source_span.SourceFile get sourceFile => |
| 110 throw new StateError('Tried to get location info for InSummarySource'); |
| 111 |
| 112 @override |
108 UriKind get uriKind => UriKind.PACKAGE_URI; | 113 UriKind get uriKind => UriKind.PACKAGE_URI; |
109 | 114 |
110 @override | 115 @override |
111 bool operator ==(Object object) => object is Source && object.uri == uri; | 116 bool operator ==(Object object) => object is Source && object.uri == uri; |
112 | 117 |
113 @override | 118 @override |
114 bool exists() => true; | 119 bool exists() => true; |
115 | 120 |
116 @override | 121 @override |
117 String toString() => uri.toString(); | 122 String toString() => uri.toString(); |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 */ | 502 */ |
498 @deprecated | 503 @deprecated |
499 class _InSummaryFallbackSource extends FileBasedSource | 504 class _InSummaryFallbackSource extends FileBasedSource |
500 implements InSummarySource { | 505 implements InSummarySource { |
501 @override | 506 @override |
502 final String summaryPath; | 507 final String summaryPath; |
503 | 508 |
504 _InSummaryFallbackSource(JavaFile file, Uri uri, this.summaryPath) | 509 _InSummaryFallbackSource(JavaFile file, Uri uri, this.summaryPath) |
505 : super(file, uri); | 510 : super(file, uri); |
506 } | 511 } |
OLD | NEW |