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

Unified Diff: pkg/analysis_server/lib/src/operation/operation.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/operation/operation.dart
diff --git a/pkg/analysis_server/lib/src/operation/operation.dart b/pkg/analysis_server/lib/src/operation/operation.dart
index 03fd9135d63016097f47bc45105e120ceb5ea53d..e9ed101115ef5be2dd7f08e6513fa923a4fe5497 100644
--- a/pkg/analysis_server/lib/src/operation/operation.dart
+++ b/pkg/analysis_server/lib/src/operation/operation.dart
@@ -5,6 +5,7 @@
library operation;
import 'package:analysis_server/src/analysis_server.dart';
+import 'package:analyzer/src/generated/source.dart';
/**
@@ -58,3 +59,16 @@ class ServerOperationPriority {
@override
String toString() => name;
}
+
+
+/**
+ * [SourceSensitiveOperation] can decide if the operation should be discarded
+ * before a change is applied to a [Source].
+ */
+abstract class SourceSensitiveOperation extends ServerOperation {
+ /**
+ * The given [source] is about to be changed.
+ * Check if this [SourceSensitiveOperation] should be discarded.
+ */
+ bool shouldBeDiscardedOnSourceChange(Source source);
+}

Powered by Google App Engine
This is Rietveld 408576698