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

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

Issue 300643002: Use type annotations everywhere in analysis_server/lib. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 socket.server; 5 library socket.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/channel.dart'; 8 import 'package:analysis_server/src/channel.dart';
9 import 'package:analysis_server/src/domain_context.dart'; 9 import 'package:analysis_server/src/domain_context.dart';
10 import 'package:analysis_server/src/domain_server.dart'; 10 import 'package:analysis_server/src/domain_server.dart';
(...skipping 11 matching lines...) Expand all
22 * connection, or `null` if no such connection has yet been established. 22 * connection, or `null` if no such connection has yet been established.
23 */ 23 */
24 AnalysisServer analysisServer; 24 AnalysisServer analysisServer;
25 25
26 /** 26 /**
27 * Create an analysis server which will communicate with the client using the 27 * Create an analysis server which will communicate with the client using the
28 * given serverChannel. 28 * given serverChannel.
29 */ 29 */
30 void createAnalysisServer(ServerCommunicationChannel serverChannel) { 30 void createAnalysisServer(ServerCommunicationChannel serverChannel) {
31 if (analysisServer != null) { 31 if (analysisServer != null) {
32 var error = new RequestError.serverAlreadyStarted(); 32 RequestError error = new RequestError.serverAlreadyStarted();
33 serverChannel.sendResponse(new Response('', error)); 33 serverChannel.sendResponse(new Response('', error));
34 serverChannel.listen((Request request) { 34 serverChannel.listen((Request request) {
35 serverChannel.sendResponse(new Response(request.id, error)); 35 serverChannel.sendResponse(new Response(request.id, error));
36 }); 36 });
37 return; 37 return;
38 } 38 }
39 analysisServer = new AnalysisServer(serverChannel); 39 analysisServer = new AnalysisServer(serverChannel);
40 _initializeHandlers(analysisServer); 40 _initializeHandlers(analysisServer);
41 } 41 }
42 42
43 /** 43 /**
44 * Initialize the handlers to be used by the given [server]. 44 * Initialize the handlers to be used by the given [server].
45 */ 45 */
46 void _initializeHandlers(AnalysisServer server) { 46 void _initializeHandlers(AnalysisServer server) {
47 server.handlers = [ 47 server.handlers = [
48 new ServerDomainHandler(server), 48 new ServerDomainHandler(server),
49 new ContextDomainHandler(server), 49 new ContextDomainHandler(server),
50 ]; 50 ];
51 } 51 }
52 52
53 } 53 }
OLDNEW
« pkg/analysis_server/lib/src/protocol.dart ('K') | « pkg/analysis_server/lib/src/protocol.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698