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

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

Issue 672003002: Add package root setting to analysis server API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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/context_manager.dart
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index c46d214b445349aeace40d976e0c4a195ad0895f..7b9b4e15179ea26c09a57bc4d4991a5c5d032abf 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -61,6 +61,11 @@ abstract class ContextManager {
List<String> includedPaths = <String>[];
/**
+ * The map of package roots most recently passed to [setRoots].
+ */
+ Map<String, String> packageRoots = <String, String>{};
+
+ /**
* Provider which is used to determine the mapping from package name to
* package folder.
*/
@@ -116,14 +121,17 @@ abstract class ContextManager {
contextFolders.forEach(_destroyContext);
// Rebuild contexts based on the data last sent to setRoots().
- setRoots(includedPaths, excludedPaths);
+ setRoots(includedPaths, excludedPaths, packageRoots);
}
/**
* Change the set of paths which should be used as starting points to
* determine the context directories.
*/
- void setRoots(List<String> includedPaths, List<String> excludedPaths) {
+ void setRoots(List<String> includedPaths, List<String> excludedPaths,
+ Map<String, String> packageRoots) {
+ // TODO(paulberry): process package roots.
+ this.packageRoots = packageRoots;
List<Folder> contextFolders = _contexts.keys.toList();
// included
Set<Folder> includedFolders = new HashSet<Folder>();

Powered by Google App Engine
This is Rietveld 408576698