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

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

Issue 944493002: Change equality comparison for FileBasedSource to use URI. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reformat and sort code. Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/engine_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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.source.io; 8 library engine.source.io;
9 9
10 import 'engine.dart'; 10 import 'engine.dart';
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } else if (scheme == DartUriResolver.DART_SCHEME) { 190 } else if (scheme == DartUriResolver.DART_SCHEME) {
191 return UriKind.DART_URI; 191 return UriKind.DART_URI;
192 } else if (scheme == FileUriResolver.FILE_SCHEME) { 192 } else if (scheme == FileUriResolver.FILE_SCHEME) {
193 return UriKind.FILE_URI; 193 return UriKind.FILE_URI;
194 } 194 }
195 return UriKind.FILE_URI; 195 return UriKind.FILE_URI;
196 } 196 }
197 197
198 @override 198 @override
199 bool operator ==(Object object) => 199 bool operator ==(Object object) =>
200 object != null && object is FileBasedSource && file == object.file; 200 object != null && object is FileBasedSource && uri == object.uri;
scheglov 2015/02/19 18:54:47 The check object != null is not necessary, "is" wi
Paul Berry 2015/02/19 19:15:32 Fair enough. Fixed.
201 201
202 @override 202 @override
203 bool exists() => file.isFile(); 203 bool exists() => file.isFile();
204 204
205 @override 205 @override
206 Uri resolveRelativeUri(Uri containedUri) { 206 Uri resolveRelativeUri(Uri containedUri) {
207 try { 207 try {
208 Uri baseUri = uri; 208 Uri baseUri = uri;
209 bool isOpaque = uri.isAbsolute && !uri.path.startsWith('/'); 209 bool isOpaque = uri.isAbsolute && !uri.path.startsWith('/');
210 if (isOpaque) { 210 if (isOpaque) {
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 } 521 }
522 522
523 /** 523 /**
524 * Return `true` if the given URI is a `file` URI. 524 * Return `true` if the given URI is a `file` URI.
525 * 525 *
526 * @param uri the URI being tested 526 * @param uri the URI being tested
527 * @return `true` if the given URI is a `file` URI 527 * @return `true` if the given URI is a `file` URI
528 */ 528 */
529 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; 529 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME;
530 } 530 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/engine_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698