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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/generated/source.dart
diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
index 8e423795f13765cea13811c7e17834ec9f18eb9c..d276ce5b7a3ebe4a2b9d98575a94c97fae2f868c 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -323,45 +323,43 @@ class LocalSourcePredicate_TRUE implements LocalSourcePredicate {
* An implementation of an non-existing [Source].
*/
class NonExistingSource extends Source {
- final String _name;
+ @override
+ final String fullName;
+
+ @override
+ final Uri uri;
final UriKind uriKind;
- NonExistingSource(this._name, this.uriKind);
+ NonExistingSource(this.fullName, this.uri, this.uriKind);
@override
TimestampedData<String> get contents {
- throw new UnsupportedOperationException("${_name}does not exist.");
+ throw new UnsupportedOperationException('$fullName does not exist.');
}
@override
String get encoding {
- throw new UnsupportedOperationException("${_name}does not exist.");
+ throw new UnsupportedOperationException('$fullName does not exist.');
}
@override
- String get fullName => _name;
-
- @override
- int get hashCode => _name.hashCode;
+ int get hashCode => fullName.hashCode;
@override
bool get isInSystemLibrary => false;
@override
- int get modificationStamp => 0;
-
- @override
- String get shortName => _name;
+ int get modificationStamp => -1;
@override
- Uri get uri => null;
+ String get shortName => fullName;
@override
bool operator ==(Object obj) {
if (obj is NonExistingSource) {
NonExistingSource other = obj;
- return other.uriKind == uriKind && (other._name == _name);
+ return other.uriKind == uriKind && other.fullName == fullName;
}
return false;
}
@@ -371,7 +369,7 @@ class NonExistingSource extends Source {
@override
Uri resolveRelativeUri(Uri relativeUri) {
- throw new UnsupportedOperationException("${_name}does not exist.");
+ throw new UnsupportedOperationException('$fullName does not exist.');
}
}
« 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