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

Side by Side Diff: pkg/analysis_server/test/context_manager_test.dart

Issue 2060263006: Deprecate FileUriResolver and RelativeFileUriResolver in source_io.dart, replace the usages with Re… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
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';
11 import 'package:analyzer/file_system/physical_file_system.dart';
11 import 'package:analyzer/file_system/memory_file_system.dart'; 12 import 'package:analyzer/file_system/memory_file_system.dart';
12 import 'package:analyzer/instrumentation/instrumentation.dart'; 13 import 'package:analyzer/instrumentation/instrumentation.dart';
13 import 'package:analyzer/source/embedder.dart'; 14 import 'package:analyzer/source/embedder.dart';
14 import 'package:analyzer/source/error_processor.dart'; 15 import 'package:analyzer/source/error_processor.dart';
15 import 'package:analyzer/src/generated/engine.dart'; 16 import 'package:analyzer/src/generated/engine.dart';
16 import 'package:analyzer/src/generated/error.dart'; 17 import 'package:analyzer/src/generated/error.dart';
17 import 'package:analyzer/src/generated/java_io.dart'; 18 import 'package:analyzer/src/generated/java_io.dart';
18 import 'package:analyzer/src/generated/sdk.dart'; 19 import 'package:analyzer/src/generated/sdk.dart';
19 import 'package:analyzer/src/generated/source.dart'; 20 import 'package:analyzer/src/generated/source.dart';
20 import 'package:analyzer/src/generated/source_io.dart'; 21 import 'package:analyzer/src/generated/source_io.dart';
(...skipping 2639 matching lines...) Expand 10 before | Expand all | Expand 10 after
2660 (currentContext as InternalAnalysisContext).embedderYamlLocator; 2661 (currentContext as InternalAnalysisContext).embedderYamlLocator;
2661 EmbedderUriResolver embedderUriResolver = 2662 EmbedderUriResolver embedderUriResolver =
2662 new EmbedderUriResolver(embedderYamlLocator.embedderYamls); 2663 new EmbedderUriResolver(embedderYamlLocator.embedderYamls);
2663 if (embedderUriResolver.length > 0) { 2664 if (embedderUriResolver.length > 0) {
2664 // We have some embedder dart: uri mappings, add the resolver 2665 // We have some embedder dart: uri mappings, add the resolver
2665 // to the list. 2666 // to the list.
2666 resolvers.add(embedderUriResolver); 2667 resolvers.add(embedderUriResolver);
2667 } 2668 }
2668 } 2669 }
2669 resolvers.addAll(disposition.createPackageUriResolvers(resourceProvider)); 2670 resolvers.addAll(disposition.createPackageUriResolvers(resourceProvider));
2670 resolvers.add(new FileUriResolver()); 2671 resolvers.add(new ResourceUriResolver(PhysicalResourceProvider.INSTANCE));
2671 currentContext.analysisOptions = options; 2672 currentContext.analysisOptions = options;
2672 currentContext.sourceFactory = 2673 currentContext.sourceFactory =
2673 new SourceFactory(resolvers, disposition.packages); 2674 new SourceFactory(resolvers, disposition.packages);
2674 return currentContext; 2675 return currentContext;
2675 } 2676 }
2676 2677
2677 @override 2678 @override
2678 void applyChangesToContext(Folder contextFolder, ChangeSet changeSet) { 2679 void applyChangesToContext(Folder contextFolder, ChangeSet changeSet) {
2679 Map<String, int> filePaths = currentContextFilePaths[contextFolder.path]; 2680 Map<String, int> filePaths = currentContextFilePaths[contextFolder.path];
2680 Set<Source> sources = currentContextSources[contextFolder.path]; 2681 Set<Source> sources = currentContextSources[contextFolder.path];
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
2768 class TestUriResolver extends UriResolver { 2769 class TestUriResolver extends UriResolver {
2769 Map<Uri, Source> uriMap; 2770 Map<Uri, Source> uriMap;
2770 2771
2771 TestUriResolver(this.uriMap); 2772 TestUriResolver(this.uriMap);
2772 2773
2773 @override 2774 @override
2774 Source resolveAbsolute(Uri uri, [Uri actualUri]) { 2775 Source resolveAbsolute(Uri uri, [Uri actualUri]) {
2775 return uriMap[uri]; 2776 return uriMap[uri];
2776 } 2777 }
2777 } 2778 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/benchmark/errors_in_all_libraries.dart » ('j') | pkg/analyzer/lib/file_system/file_system.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698