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

Side by Side Diff: pkg/analysis_server/test/stress/replay/operation.dart

Issue 1471443002: Initial work toward a stress test (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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/test/stress/replay/replay.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
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.
4
5 /**
6 * Operations to be performed during the simulation.
7 */
8 library analysis_server.test.stress.replay.replay;
scheglov 2015/11/20 22:52:18 library analysis_server.test.stress.replay.operati
9
10 import '../utilities/server.dart';
11 import 'package:analysis_server/plugin/protocol/protocol.dart';
scheglov 2015/11/20 22:52:18 Sort?
12
13 /**
14 * An operation to be performed during the simulation.
15 */
16 abstract class ServerOperation {
17 /**
18 * Perform this operation by communicating with the given [server].
19 */
20 void perform(Server server);
21 }
22
23 /**
24 * An operation that will send an 'analysis.updateContent' request.
25 */
26 class AnalysisUpdateContent extends ServerOperation {
27 /**
28 * The path of the file whose content is being updated.
29 */
30 String filePath;
31
32 /**
33 * The overlay used to update the content.
34 */
35 dynamic overlay;
36
37 /**
38 * Initialize an operation to send an 'analysis.updateContent' request with
39 * the given [filePath] and [overlay] as parameters.
40 */
41 AnalysisUpdateContent(this.filePath, this.overlay);
42
43 @override
44 void perform(Server server) {
45 server.sendAnalysisUpdateContent({filePath: overlay});
46 // if (overlay is ChangeContentOverlay) {
47 // List<SourceEdit> edits = (overlay as ChangeContentOverlay).edits;
48 // if (edits.length == 1) {
49 // SourceEdit edit = edits[0];
50 // if (edit.replacement.endsWith('.')) {
51 // int offset = edit.offset + edit.replacement.length - 1;
52 // server.sendCompletionGetSuggestions(filePath, offset);
53 // }
54 // }
55 // }
56 }
57 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/stress/replay/replay.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698