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

Unified Diff: pkg/analysis_server/lib/src/resource.dart

Issue 308713002: Handle file additions/removals in ContextDirectoryManager. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address Konstantin's comments Created 6 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/analysis_server/lib/src/resource.dart
diff --git a/pkg/analysis_server/lib/src/resource.dart b/pkg/analysis_server/lib/src/resource.dart
index c01974ceb61a3d54fa096e389c376e5f97ceb3aa..9968845ea9131cc8644c717bb6f71b9b35527e0a 100644
--- a/pkg/analysis_server/lib/src/resource.dart
+++ b/pkg/analysis_server/lib/src/resource.dart
@@ -59,10 +59,9 @@ abstract class Resource {
bool get exists;
/**
- * Return the full (long) version of the name that can be displayed to the
- * user to denote this resource.
+ * Return the full path to this resource.
*/
- String get fullName;
+ String get path;
/**
* Return a short version of the name that can be displayed to the user to
@@ -102,7 +101,7 @@ abstract class _MemoryResource implements Resource {
bool get exists => _provider._pathToResource.containsKey(_path);
@override
- String get fullName => _path;
+ String get path => _path;
scheglov 2014/05/29 18:19:03 We could just drop this getter now and rename _pat
@override
get hashCode => _path.hashCode;
@@ -111,7 +110,7 @@ abstract class _MemoryResource implements Resource {
String get shortName => posix.basename(_path);
@override
- String toString() => fullName;
+ String toString() => path;
}
@@ -180,14 +179,14 @@ class _MemoryFileSource implements Source {
@override
String get encoding {
- return '${new String.fromCharCode(uriKind.encoding)}${_file.fullName}';
+ return '${new String.fromCharCode(uriKind.encoding)}${_file.path}';
}
@override
bool exists() => _file.exists;
@override
- String get fullName => _file.fullName;
+ String get fullName => _file.path;
@override
int get hashCode => _file.hashCode;
@@ -415,16 +414,16 @@ abstract class _PhysicalResource implements Resource {
bool get exists => _entry.existsSync();
@override
- String get fullName => _entry.absolute.path;
+ String get path => _entry.absolute.path;
@override
get hashCode => _entry.hashCode;
@override
- String get shortName => basename(fullName);
+ String get shortName => basename(path);
@override
- String toString() => fullName;
+ String toString() => path;
}

Powered by Google App Engine
This is Rietveld 408576698