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

Side by Side Diff: pkg/analyzer/lib/src/generated/source_io.dart

Issue 2257023002: Replace uses of FileBasedSource in cli (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | pkg/analyzer_cli/lib/src/build_mode.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 analyzer.src.generated.source_io; 5 library analyzer.src.generated.source_io;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/generated/engine.dart'; 9 import 'package:analyzer/src/generated/engine.dart';
10 import 'package:analyzer/src/generated/java_core.dart'; 10 import 'package:analyzer/src/generated/java_core.dart';
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 return path; 78 return path;
79 } 79 }
80 return "$path${JavaFile.separator}"; 80 return "$path${JavaFile.separator}";
81 } 81 }
82 } 82 }
83 83
84 /** 84 /**
85 * Instances of the class [ExplicitSourceResolver] map URIs to files on disk 85 * Instances of the class [ExplicitSourceResolver] map URIs to files on disk
86 * using a fixed mapping provided at construction time. 86 * using a fixed mapping provided at construction time.
87 */ 87 */
88 @deprecated
88 class ExplicitSourceResolver extends UriResolver { 89 class ExplicitSourceResolver extends UriResolver {
89 final Map<Uri, JavaFile> uriToFileMap; 90 final Map<Uri, JavaFile> uriToFileMap;
90 final Map<String, Uri> pathToUriMap; 91 final Map<String, Uri> pathToUriMap;
91 92
92 /** 93 /**
93 * Construct an [ExplicitSourceResolver] based on the given [uriToFileMap]. 94 * Construct an [ExplicitSourceResolver] based on the given [uriToFileMap].
94 */ 95 */
95 ExplicitSourceResolver(Map<Uri, JavaFile> uriToFileMap) 96 ExplicitSourceResolver(Map<Uri, JavaFile> uriToFileMap)
96 : uriToFileMap = uriToFileMap, 97 : uriToFileMap = uriToFileMap,
97 pathToUriMap = _computePathToUriMap(uriToFileMap); 98 pathToUriMap = _computePathToUriMap(uriToFileMap);
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 } 567 }
567 568
568 /** 569 /**
569 * Return `true` if the given URI is a `file` URI. 570 * Return `true` if the given URI is a `file` URI.
570 * 571 *
571 * @param uri the URI being tested 572 * @param uri the URI being tested
572 * @return `true` if the given URI is a `file` URI 573 * @return `true` if the given URI is a `file` URI
573 */ 574 */
574 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; 575 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME;
575 } 576 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer_cli/lib/src/build_mode.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698