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

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

Issue 553193002: Implement "analysis.reanalyze" in analysis server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebuild contexts by calling setRoot Created 6 years, 3 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/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index e2f739bcb8ec06d8d8bb42f8e85fb80a23cb77ae..19707578db22cb52855adca6d144f50c3a584e04 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -474,6 +474,17 @@ class AnalysisServer {
}
/**
+ * Trigger reanalysis of all files from disk.
+ */
+ void reanalyze() {
+ // Clear any operations that are pending.
+ operationQueue.clear();
+ // Instruct the contextDirectoryManager to rebuild all contexts from
+ // scratch.
+ contextDirectoryManager.refresh();
+ }
+
+ /**
* Remove the given [listener] from the list of listeners that are listening
* for lifecycle events from this server.
*/
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/constants.dart » ('j') | pkg/analysis_server/lib/src/context_manager.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698