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

Unified Diff: pkg/analysis_server/lib/src/operation/operation.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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/operation/operation_analysis.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6c5732d307f52baaea92d2fcb2eb3db2db732d5a..1a43a1889d4ea9611e2c5237ae0da3795b014077 100644
--- a/pkg/analysis_server/lib/src/operation/operation.dart
+++ b/pkg/analysis_server/lib/src/operation/operation.dart
@@ -9,6 +9,21 @@ import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/source.dart';
/**
+ * [MergeableOperation] can decide whether other operation can be merged into
+ * it, so that it should not be added as a separate operation.
+ */
+abstract class MergeableOperation extends ServerOperation {
+ MergeableOperation(AnalysisContext context) : super(context);
+
+ /**
+ * Attempt to merge the given [other] operation into this one, return `true`
+ * in case of success, so that [other] should not be added as a separate
+ * operation.
+ */
+ bool merge(ServerOperation other);
+}
+
+/**
* The class [ServerOperation] defines the behavior of objects used to perform
* operations on a [AnalysisServer].
*/
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/operation/operation_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698