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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/engine.dart'; 8 import 'package:analyzer/src/generated/engine.dart';
9 import 'package:analyzer/src/generated/source.dart'; 9 import 'package:analyzer/src/generated/source.dart';
10 10
11 /** 11 /**
12 * [MergeableOperation] can decide whether other operation can be merged into
13 * it, so that it should not be added as a separate operation.
14 */
15 abstract class MergeableOperation extends ServerOperation {
16 MergeableOperation(AnalysisContext context) : super(context);
17
18 /**
19 * Attempt to merge the given [other] operation into this one, return `true`
20 * in case of success, so that [other] should not be added as a separate
21 * operation.
22 */
23 bool merge(ServerOperation other);
24 }
25
26 /**
12 * The class [ServerOperation] defines the behavior of objects used to perform 27 * The class [ServerOperation] defines the behavior of objects used to perform
13 * operations on a [AnalysisServer]. 28 * operations on a [AnalysisServer].
14 */ 29 */
15 abstract class ServerOperation { 30 abstract class ServerOperation {
16 /** 31 /**
17 * The context for this operation. Operations will be automatically 32 * The context for this operation. Operations will be automatically
18 * de-queued when their context is destroyed. 33 * de-queued when their context is destroyed.
19 */ 34 */
20 final AnalysisContext context; 35 final AnalysisContext context;
21 36
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 */ 88 */
74 abstract class SourceSensitiveOperation extends ServerOperation { 89 abstract class SourceSensitiveOperation extends ServerOperation {
75 SourceSensitiveOperation(AnalysisContext context) : super(context); 90 SourceSensitiveOperation(AnalysisContext context) : super(context);
76 91
77 /** 92 /**
78 * The given [source] is about to be changed. 93 * The given [source] is about to be changed.
79 * Check if this [SourceSensitiveOperation] should be discarded. 94 * Check if this [SourceSensitiveOperation] should be discarded.
80 */ 95 */
81 bool shouldBeDiscardedOnSourceChange(Source source); 96 bool shouldBeDiscardedOnSourceChange(Source source);
82 } 97 }
OLDNEW
« 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