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

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: 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..059db1459f25a4ea4a181d6345ef86beebe055ec 100644
--- a/pkg/analysis_server/lib/src/resource.dart
+++ b/pkg/analysis_server/lib/src/resource.dart
@@ -81,6 +81,11 @@ abstract class ResourceProvider {
* Return the [Resource] that corresponds to the given [path].
*/
Resource getResource(String path);
+
+ /**
+ * Get the path context used by this resource provider.
+ */
+ Context get pathContext;
}
@@ -351,6 +356,9 @@ class MemoryResourceProvider implements ResourceProvider {
_pathToTimestamp.remove(path);
_notifyWatchers(path, ChangeType.REMOVE);
}
+
+ @override
+ Context get pathContext => posix;
}
@@ -446,4 +454,7 @@ class PhysicalResourceProvider implements ResourceProvider {
return new _PhysicalFile(file);
}
}
+
+ @override
+ Context get pathContext => io.Platform.isWindows ? windows : posix;
}

Powered by Google App Engine
This is Rietveld 408576698