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

Side by Side Diff: pkg/analysis_server/lib/src/domain_server.dart

Issue 304273007: Use 'analysis.setSubscriptions' HIGHLIGHTS in Editor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use addAnalysisSubscription/removeAnalysisSubscription Created 6 years, 6 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 domain.server; 5 library domain.server;
6 6
7 import 'package:analysis_server/src/analysis_server.dart'; 7 import 'package:analysis_server/src/analysis_server.dart';
8 import 'package:analysis_server/src/constants.dart'; 8 import 'package:analysis_server/src/constants.dart';
9 import 'package:analysis_server/src/protocol.dart'; 9 import 'package:analysis_server/src/protocol.dart';
10 10
(...skipping 11 matching lines...) Expand all
22 * Initialize a newly created handler to handle requests for the given [server ]. 22 * Initialize a newly created handler to handle requests for the given [server ].
23 */ 23 */
24 ServerDomainHandler(this.server); 24 ServerDomainHandler(this.server);
25 25
26 @override 26 @override
27 Response handleRequest(Request request) { 27 Response handleRequest(Request request) {
28 try { 28 try {
29 String requestName = request.method; 29 String requestName = request.method;
30 if (requestName == METHOD_GET_VERSION) { 30 if (requestName == METHOD_GET_VERSION) {
31 return getVersion(request); 31 return getVersion(request);
32 } else if (requestName == METHOD_SET_SUBSCRIPTIONS) { 32 } else if (requestName == METHOD_SET_SERVER_SUBSCRIPTIONS) {
33 return setSubscriptions(request); 33 return setSubscriptions(request);
34 } else if (requestName == METHOD_SHUTDOWN) { 34 } else if (requestName == METHOD_SHUTDOWN) {
35 return shutdown(request); 35 return shutdown(request);
36 } 36 }
37 } on RequestFailure catch (exception) { 37 } on RequestFailure catch (exception) {
38 return exception.response; 38 return exception.response;
39 } 39 }
40 return null; 40 return null;
41 } 41 }
42 42
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 /** 116 /**
117 * Return the version number of the analysis server. 117 * Return the version number of the analysis server.
118 */ 118 */
119 Response getVersion(Request request) { 119 Response getVersion(Request request) {
120 Response response = new Response(request.id); 120 Response response = new Response(request.id);
121 response.setResult(VERSION, '0.0.1'); 121 response.setResult(VERSION, '0.0.1');
122 return response; 122 return response;
123 } 123 }
124 } 124 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/domain_analysis.dart ('k') | pkg/analysis_server/test/domain_analysis_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698