| 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);
|
| +}
|
|
|