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

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

Issue 904093002: Discard pending notifications on the same source change. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 d4cd96d91ae49e1c04a247a7c8199b5a717e9af1..0cdc57c0e4c2baf11eac2585dbb8e6e1a5af4218 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -334,6 +334,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);
+ }
+ }
+
+ /**
* 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.
@@ -947,6 +962,8 @@ class AnalysisServer {
void updateContent(String id, Map<String, dynamic> changes) {
changes.forEach((file, change) {
Source source = getSource(file);
+ operationQueue.sourceAboutToChange(source);
+ // Prepare the new contents.
String oldContents = _overlayState.getContents(source);
String newContents;
if (change is AddContentOverlay) {

Powered by Google App Engine
This is Rietveld 408576698