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

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

Issue 1327173002: Make NavigationOperation a MergeableOperation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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/operation/operation_analysis.dart
diff --git a/pkg/analysis_server/lib/src/operation/operation_analysis.dart b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
index e7ba700b93b8f56cdf9428eb9a6fd90191b10ee0..4d1e60e8ad1e30d7fa2cda17f0c62ad254589409 100644
--- a/pkg/analysis_server/lib/src/operation/operation_analysis.dart
+++ b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
@@ -229,7 +229,8 @@ void _sendNotification(AnalysisServer server, f()) {
});
}
-class NavigationOperation extends _NotificationOperation {
+class NavigationOperation extends _NotificationOperation
+ implements MergeableOperation {
NavigationOperation(AnalysisContext context, Source source)
: super(context, source);
@@ -237,6 +238,13 @@ class NavigationOperation extends _NotificationOperation {
void perform(AnalysisServer server) {
sendAnalysisNotificationNavigation(server, context, source);
}
+
+ @override
+ bool merge(ServerOperation other) {
+ return other is NavigationOperation &&
+ other.context == context &&
+ other.source == source;
+ }
}
/**
« no previous file with comments | « pkg/analysis_server/lib/src/operation/operation.dart ('k') | pkg/analysis_server/lib/src/operation/operation_queue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698