OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 test.context.directory.manager; | 5 library test.context.directory.manager; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'package:analysis_server/src/context_manager.dart'; | 9 import 'package:analysis_server/src/context_manager.dart'; |
10 import 'package:analyzer/file_system/file_system.dart'; | 10 import 'package:analyzer/file_system/file_system.dart'; |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 } | 146 } |
147 | 147 |
148 UriResolver provideEmbeddedUriResolver(Folder folder) => embeddedUriResolver; | 148 UriResolver provideEmbeddedUriResolver(Folder folder) => embeddedUriResolver; |
149 | 149 |
150 UriResolver providePackageResolver(Folder folder) => packageResolver; | 150 UriResolver providePackageResolver(Folder folder) => packageResolver; |
151 | 151 |
152 void setUp() { | 152 void setUp() { |
153 processRequiredPlugins(); | 153 processRequiredPlugins(); |
154 resourceProvider = new MemoryResourceProvider(); | 154 resourceProvider = new MemoryResourceProvider(); |
155 packageMapProvider = new MockPackageMapProvider(); | 155 packageMapProvider = new MockPackageMapProvider(); |
156 DartSdkManager sdkManager = new DartSdkManager(() { | 156 DartSdkManager sdkManager = new DartSdkManager((_) { |
157 return new MockSdk(); | 157 return new MockSdk(); |
158 }); | 158 }); |
159 manager = new ContextManagerImpl( | 159 manager = new ContextManagerImpl( |
160 resourceProvider, | 160 resourceProvider, |
161 sdkManager, | 161 sdkManager, |
162 providePackageResolver, | 162 providePackageResolver, |
163 provideEmbeddedUriResolver, | 163 provideEmbeddedUriResolver, |
164 packageMapProvider, | 164 packageMapProvider, |
165 analysisFilesGlobs, | 165 analysisFilesGlobs, |
166 InstrumentationService.NULL_SERVICE, | 166 InstrumentationService.NULL_SERVICE, |
(...skipping 2322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2489 class TestUriResolver extends UriResolver { | 2489 class TestUriResolver extends UriResolver { |
2490 Map<Uri, Source> uriMap; | 2490 Map<Uri, Source> uriMap; |
2491 | 2491 |
2492 TestUriResolver(this.uriMap); | 2492 TestUriResolver(this.uriMap); |
2493 | 2493 |
2494 @override | 2494 @override |
2495 Source resolveAbsolute(Uri uri, [Uri actualUri]) { | 2495 Source resolveAbsolute(Uri uri, [Uri actualUri]) { |
2496 return uriMap[uri]; | 2496 return uriMap[uri]; |
2497 } | 2497 } |
2498 } | 2498 } |
OLD | NEW |