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

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

Issue 1008443002: Cherry-pick r44373, r44378, and r44275. (Closed) Base URL: https://dart.googlecode.com/svn/trunk/dart
Patch Set: Created 5 years, 9 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 1433c904818c9b5bc9c4df1e32f0f573ae624b82..6c5732d307f52baaea92d2fcb2eb3db2db732d5a 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/engine.dart';
import 'package:analyzer/src/generated/source.dart';
/**
@@ -13,6 +14,14 @@ import 'package:analyzer/src/generated/source.dart';
*/
abstract class ServerOperation {
/**
+ * The context for this operation. Operations will be automatically
+ * de-queued when their context is destroyed.
+ */
+ final AnalysisContext context;
+
+ ServerOperation(this.context);
+
+ /**
* Returns the priority of this operation.
*/
ServerOperationPriority get priority;
@@ -63,6 +72,8 @@ class ServerOperationPriority {
* before a change is applied to a [Source].
*/
abstract class SourceSensitiveOperation extends ServerOperation {
+ SourceSensitiveOperation(AnalysisContext context) : super(context);
+
/**
* The given [source] is about to be changed.
* Check if this [SourceSensitiveOperation] should be discarded.
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | pkg/analysis_server/lib/src/operation/operation_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698