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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library operation; 5 library operation;
6 6
7 import 'package:analysis_server/src/analysis_server.dart'; 7 import 'package:analysis_server/src/analysis_server.dart';
8 import 'package:analyzer/src/generated/source.dart';
8 9
9 10
10 /** 11 /**
11 * The class [ServerOperation] defines the behavior of objects used to perform 12 * The class [ServerOperation] defines the behavior of objects used to perform
12 * operations on a [AnalysisServer]. 13 * operations on a [AnalysisServer].
13 */ 14 */
14 abstract class ServerOperation { 15 abstract class ServerOperation {
15 /** 16 /**
16 * Returns the priority of this operation. 17 * Returns the priority of this operation.
17 */ 18 */
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 const ServerOperationPriority._(5, "ANALYSIS"); 52 const ServerOperationPriority._(5, "ANALYSIS");
52 53
53 final int ordinal; 54 final int ordinal;
54 final String name; 55 final String name;
55 56
56 const ServerOperationPriority._(this.ordinal, this.name); 57 const ServerOperationPriority._(this.ordinal, this.name);
57 58
58 @override 59 @override
59 String toString() => name; 60 String toString() => name;
60 } 61 }
62
63
64 /**
65 * [SourceSensitiveOperation] can decide if the operation should be discarded
66 * before a change is applied to a [Source].
67 */
68 abstract class SourceSensitiveOperation extends ServerOperation {
69 /**
70 * The given [source] is about to be changed.
71 * Check if this [SourceSensitiveOperation] should be discarded.
72 */
73 bool shouldBeDiscardedOnSourceChange(Source source);
74 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698