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 397390b91a8b5769eed5bd7f09b2997c356affb2..b434d622809f6daedb5da9bc2ffb23e69be56ad5 100644 |
--- a/pkg/analysis_server/lib/src/analysis_server.dart |
+++ b/pkg/analysis_server/lib/src/analysis_server.dart |
@@ -335,21 +335,6 @@ class AnalysisServer { |
} |
/** |
- * Performs all scheduled analysis operations. |
- */ |
- void test_performAllAnalysisOperations() { |
- while (true) { |
- ServerOperation operation = operationQueue.takeIf((operation) { |
- return operation is PerformAnalysisOperation; |
- }); |
- if (operation == null) { |
- break; |
- } |
- operation.perform(this); |
- } |
- } |
- |
- /** |
* If the given notice applies to a file contained within an analysis root, |
* notify interested parties that the file has been (at least partially) |
* analyzed. |
@@ -475,23 +460,6 @@ class AnalysisServer { |
return context.getErrors(source); |
} |
-// TODO(brianwilkerson) Add the following method after 'prioritySources' has |
-// been added to InternalAnalysisContext. |
-// /** |
-// * Return a list containing the full names of all of the sources that are |
-// * priority sources. |
-// */ |
-// List<String> getPriorityFiles() { |
-// List<String> priorityFiles = new List<String>(); |
-// folderMap.values.forEach((ContextDirectory directory) { |
-// InternalAnalysisContext context = directory.context; |
-// context.prioritySources.forEach((Source source) { |
-// priorityFiles.add(source.fullName); |
-// }); |
-// }); |
-// return priorityFiles; |
-// } |
- |
/** |
* Returns resolved [AstNode]s at the given [offset] of the given [file]. |
* |
@@ -509,6 +477,23 @@ class AnalysisServer { |
return nodes; |
} |
+// TODO(brianwilkerson) Add the following method after 'prioritySources' has |
+// been added to InternalAnalysisContext. |
+// /** |
+// * Return a list containing the full names of all of the sources that are |
+// * priority sources. |
+// */ |
+// List<String> getPriorityFiles() { |
+// List<String> priorityFiles = new List<String>(); |
+// folderMap.values.forEach((ContextDirectory directory) { |
+// InternalAnalysisContext context = directory.context; |
+// context.prioritySources.forEach((Source source) { |
+// priorityFiles.add(source.fullName); |
+// }); |
+// }); |
+// return priorityFiles; |
+// } |
+ |
/** |
* Returns resolved [CompilationUnit]s of the Dart file with the given [path]. |
* |
@@ -970,6 +955,21 @@ class AnalysisServer { |
} |
/** |
+ * Performs all scheduled analysis operations. |
+ */ |
+ void test_performAllAnalysisOperations() { |
+ while (true) { |
+ ServerOperation operation = operationQueue.takeIf((operation) { |
+ return operation is PerformAnalysisOperation; |
+ }); |
+ if (operation == null) { |
+ break; |
+ } |
+ operation.perform(this); |
+ } |
+ } |
+ |
+ /** |
* Implementation for `analysis.updateContent`. |
*/ |
void updateContent(String id, Map<String, dynamic> changes) { |
@@ -1170,7 +1170,7 @@ class ServerContextManager extends ContextManager { |
_onContextsChangedController.stream; |
@override |
- void addContext(Folder folder, UriResolver packageUriResolver) { |
+ AnalysisContext addContext(Folder folder, UriResolver packageUriResolver) { |
InternalAnalysisContext context = |
AnalysisEngine.instance.createAnalysisContext(); |
context.contentCache = analysisServer._overlayState; |
@@ -1180,6 +1180,7 @@ class ServerContextManager extends ContextManager { |
_onContextsChangedController.add( |
new ContextsChangedEvent(added: [context])); |
analysisServer.schedulePerformAnalysisOperation(context); |
+ return context; |
} |
@override |