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

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

Issue 444293002: Fixes for the 'pub' bot and 'analysis_server' on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 | « no previous file | pkg/analyzer/lib/file_system/memory_file_system.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 22151d424a7f50434e8138bc71338963377e1aa9..e1c992a901068b50efca9ca8a450ee3e693b8ec8 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -105,6 +105,11 @@ class AnalysisServer {
final ServerCommunicationChannel channel;
/**
+ * The [ResourceProvider] using which paths are converted into [Resource]s.
+ */
+ final ResourceProvider resourceProvider;
+
+ /**
* The [Index] for this server.
*/
final Index index;
@@ -193,7 +198,7 @@ class AnalysisServer {
* exceptions to show up in unit tests, but it should be set to false when
* running a full analysis server.
*/
- AnalysisServer(this.channel, ResourceProvider resourceProvider,
+ AnalysisServer(this.channel, this.resourceProvider,
PackageMapProvider packageMapProvider, this.index, this.defaultSdk,
{this.rethrowExceptions: true}) {
searchEngine = createSearchEngine(index);
@@ -562,14 +567,14 @@ class AnalysisServer {
Source getSource(String path) {
// try SDK
{
- Uri uri = toUri(path);
+ Uri uri = resourceProvider.pathContext.toUri(path);
Source sdkSource = defaultSdk.fromFileUri(uri);
if (sdkSource != null) {
return sdkSource;
}
}
// file-based source
- File file = contextDirectoryManager.resourceProvider.getResource(path);
+ File file = resourceProvider.getResource(path);
return file.createSource();
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/file_system/memory_file_system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698