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

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

Issue 1135073004: Fix for 'Create part' Quick Fix. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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 // 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; 8 library engine.source;
9 9
10 import "dart:math" as math; 10 import "dart:math" as math;
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 316
317 class LocalSourcePredicate_TRUE implements LocalSourcePredicate { 317 class LocalSourcePredicate_TRUE implements LocalSourcePredicate {
318 @override 318 @override
319 bool isLocal(Source source) => true; 319 bool isLocal(Source source) => true;
320 } 320 }
321 321
322 /** 322 /**
323 * An implementation of an non-existing [Source]. 323 * An implementation of an non-existing [Source].
324 */ 324 */
325 class NonExistingSource extends Source { 325 class NonExistingSource extends Source {
326 final String _name; 326 @override
327 final String fullName;
328
329 @override
330 final Uri uri;
327 331
328 final UriKind uriKind; 332 final UriKind uriKind;
329 333
330 NonExistingSource(this._name, this.uriKind); 334 NonExistingSource(this.fullName, this.uri, this.uriKind);
331 335
332 @override 336 @override
333 TimestampedData<String> get contents { 337 TimestampedData<String> get contents {
334 throw new UnsupportedOperationException("${_name}does not exist."); 338 throw new UnsupportedOperationException('$fullName does not exist.');
335 } 339 }
336 340
337 @override 341 @override
338 String get encoding { 342 String get encoding {
339 throw new UnsupportedOperationException("${_name}does not exist."); 343 throw new UnsupportedOperationException('$fullName does not exist.');
340 } 344 }
341 345
342 @override 346 @override
343 String get fullName => _name; 347 int get hashCode => fullName.hashCode;
344
345 @override
346 int get hashCode => _name.hashCode;
347 348
348 @override 349 @override
349 bool get isInSystemLibrary => false; 350 bool get isInSystemLibrary => false;
350 351
351 @override 352 @override
352 int get modificationStamp => 0; 353 int get modificationStamp => -1;
353 354
354 @override 355 @override
355 String get shortName => _name; 356 String get shortName => fullName;
356
357 @override
358 Uri get uri => null;
359 357
360 @override 358 @override
361 bool operator ==(Object obj) { 359 bool operator ==(Object obj) {
362 if (obj is NonExistingSource) { 360 if (obj is NonExistingSource) {
363 NonExistingSource other = obj; 361 NonExistingSource other = obj;
364 return other.uriKind == uriKind && (other._name == _name); 362 return other.uriKind == uriKind && other.fullName == fullName;
365 } 363 }
366 return false; 364 return false;
367 } 365 }
368 366
369 @override 367 @override
370 bool exists() => false; 368 bool exists() => false;
371 369
372 @override 370 @override
373 Uri resolveRelativeUri(Uri relativeUri) { 371 Uri resolveRelativeUri(Uri relativeUri) {
374 throw new UnsupportedOperationException("${_name}does not exist."); 372 throw new UnsupportedOperationException('$fullName does not exist.');
375 } 373 }
376 } 374 }
377 375
378 /** 376 /**
379 * The interface `Source` defines the behavior of objects representing source co de that can be 377 * The interface `Source` defines the behavior of objects representing source co de that can be
380 * analyzed by the analysis engine. 378 * analyzed by the analysis engine.
381 * 379 *
382 * Implementations of this interface need to be aware of some assumptions made b y the analysis 380 * Implementations of this interface need to be aware of some assumptions made b y the analysis
383 * engine concerning sources: 381 * engine concerning sources:
384 * * Sources are not required to be unique. That is, there can be multiple insta nces representing 382 * * Sources are not required to be unique. That is, there can be multiple insta nces representing
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 999
1002 /** 1000 /**
1003 * Return an absolute URI that represents the given source, or `null` if a val id URI cannot 1001 * Return an absolute URI that represents the given source, or `null` if a val id URI cannot
1004 * be computed. 1002 * be computed.
1005 * 1003 *
1006 * @param source the source to get URI for 1004 * @param source the source to get URI for
1007 * @return the absolute URI representing the given source 1005 * @return the absolute URI representing the given source
1008 */ 1006 */
1009 Uri restoreAbsolute(Source source) => null; 1007 Uri restoreAbsolute(Source source) => null;
1010 } 1008 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/source/package_map_resolver.dart ('k') | pkg/analyzer/lib/src/generated/testing/element_factory.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698