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

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

Issue 2078703002: Provide direction to users of the now deprecated class FileUriResolver (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
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/source_factory_test.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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 String toString() { 255 String toString() {
256 if (file == null) { 256 if (file == null) {
257 return "<unknown source>"; 257 return "<unknown source>";
258 } 258 }
259 return file.getAbsolutePath(); 259 return file.getAbsolutePath();
260 } 260 }
261 } 261 }
262 262
263 /** 263 /**
264 * Instances of the class `FileUriResolver` resolve `file` URI's. 264 * Instances of the class `FileUriResolver` resolve `file` URI's.
265 *
266 * This class is now deprecated, 'new FileUriResolver()' is equivalent to
267 * 'new ResourceUriResolver(PhysicalResourceProvider.INSTANCE)'.
265 */ 268 */
266 @deprecated 269 @deprecated
267 class FileUriResolver extends UriResolver { 270 class FileUriResolver extends UriResolver {
268 /** 271 /**
269 * The name of the `file` scheme. 272 * The name of the `file` scheme.
270 */ 273 */
271 static String FILE_SCHEME = "file"; 274 static String FILE_SCHEME = "file";
272 275
273 @override 276 @override
274 Source resolveAbsolute(Uri uri, [Uri actualUri]) { 277 Source resolveAbsolute(Uri uri, [Uri actualUri]) {
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 * Return `true` if the given URI is a `package` URI. 513 * Return `true` if the given URI is a `package` URI.
511 * 514 *
512 * @param uri the URI being tested 515 * @param uri the URI being tested
513 * @return `true` if the given URI is a `package` URI 516 * @return `true` if the given URI is a `package` URI
514 */ 517 */
515 static bool isPackageUri(Uri uri) => PACKAGE_SCHEME == uri.scheme; 518 static bool isPackageUri(Uri uri) => PACKAGE_SCHEME == uri.scheme;
516 } 519 }
517 520
518 /** 521 /**
519 * Instances of the class `RelativeFileUriResolver` resolve `file` URI's. 522 * Instances of the class `RelativeFileUriResolver` resolve `file` URI's.
523 *
524 * This class is now deprecated, file URI resolution should be done with
525 * ResourceUriResolver, i.e.
526 * 'new ResourceUriResolver(PhysicalResourceProvider.INSTANCE)'.
520 */ 527 */
521 @deprecated 528 @deprecated
522 class RelativeFileUriResolver extends UriResolver { 529 class RelativeFileUriResolver extends UriResolver {
523 /** 530 /**
524 * The name of the `file` scheme. 531 * The name of the `file` scheme.
525 */ 532 */
526 static String FILE_SCHEME = "file"; 533 static String FILE_SCHEME = "file";
527 534
528 /** 535 /**
529 * The directories for the relatvie URI's 536 * The directories for the relatvie URI's
(...skipping 29 matching lines...) Expand all
559 } 566 }
560 567
561 /** 568 /**
562 * Return `true` if the given URI is a `file` URI. 569 * Return `true` if the given URI is a `file` URI.
563 * 570 *
564 * @param uri the URI being tested 571 * @param uri the URI being tested
565 * @return `true` if the given URI is a `file` URI 572 * @return `true` if the given URI is a `file` URI
566 */ 573 */
567 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; 574 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME;
568 } 575 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/source_factory_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698