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

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

Issue 303413003: Don't add files inside "packages" subdir to context. (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 b8b6c3cd6523985cd0ed72ade8bb978d42c92793..e3df8afb24bb5e0814f48220e45d964d8ee132ac 100644
--- a/pkg/analysis_server/lib/src/resource.dart
+++ b/pkg/analysis_server/lib/src/resource.dart
@@ -80,6 +80,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;
}
@@ -347,6 +352,9 @@ class MemoryResourceProvider implements ResourceProvider {
_pathToTimestamp.remove(path);
_notifyWatchers(path, ChangeType.REMOVE);
}
+
+ @override
+ Context get pathContext => posix;
}
@@ -442,4 +450,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