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

Unified Diff: pkg/analyzer/lib/src/generated/source.dart

Issue 1147733002: Use short names in 'Create File' Quick Fix messages. (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
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d276ce5b7a3ebe4a2b9d98575a94c97fae2f868c..4900cf687fd5f68a6be3a52acc51f9d5c249b6d0 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -7,12 +7,13 @@
library engine.source;
-import "dart:math" as math;
import 'dart:collection';
+import "dart:math" as math;
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/source/package_map_resolver.dart';
import 'package:analyzer/task/model.dart';
+import 'package:path/path.dart' as pathos;
import 'engine.dart';
import 'java_core.dart';
@@ -353,12 +354,11 @@ class NonExistingSource extends Source {
int get modificationStamp => -1;
@override
- String get shortName => fullName;
+ String get shortName => pathos.basename(fullName);
@override
- bool operator ==(Object obj) {
- if (obj is NonExistingSource) {
- NonExistingSource other = obj;
+ bool operator ==(Object other) {
+ if (other is NonExistingSource) {
return other.uriKind == uriKind && other.fullName == fullName;
}
return false;
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698