| OLD | NEW |
| 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_analysis.dart'; | 9 import 'package:analysis_server/src/domain_analysis.dart'; |
| 10 import 'package:analysis_server/src/domain_completion.dart'; |
| 11 import 'package:analysis_server/src/domain_edit.dart'; |
| 12 import 'package:analysis_server/src/domain_search.dart'; |
| 10 import 'package:analysis_server/src/domain_server.dart'; | 13 import 'package:analysis_server/src/domain_server.dart'; |
| 11 import 'package:analysis_server/src/protocol.dart'; | 14 import 'package:analysis_server/src/protocol.dart'; |
| 12 import 'package:analysis_server/src/resource.dart'; | 15 import 'package:analysis_server/src/resource.dart'; |
| 13 | 16 |
| 14 /** | 17 /** |
| 15 * Instances of the class [SocketServer] implement the common parts of | 18 * Instances of the class [SocketServer] implement the common parts of |
| 16 * http-based and stdio-based analysis servers. The primary responsibility of | 19 * http-based and stdio-based analysis servers. The primary responsibility of |
| 17 * the SocketServer is to manage the lifetime of the AnalysisServer and to | 20 * the SocketServer is to manage the lifetime of the AnalysisServer and to |
| 18 * encode and decode the JSON messages exchanged with the client. | 21 * encode and decode the JSON messages exchanged with the client. |
| 19 */ | 22 */ |
| (...skipping 24 matching lines...) Expand all Loading... |
| 44 _initializeHandlers(analysisServer); | 47 _initializeHandlers(analysisServer); |
| 45 } | 48 } |
| 46 | 49 |
| 47 /** | 50 /** |
| 48 * Initialize the handlers to be used by the given [server]. | 51 * Initialize the handlers to be used by the given [server]. |
| 49 */ | 52 */ |
| 50 void _initializeHandlers(AnalysisServer server) { | 53 void _initializeHandlers(AnalysisServer server) { |
| 51 server.handlers = [ | 54 server.handlers = [ |
| 52 new ServerDomainHandler(server), | 55 new ServerDomainHandler(server), |
| 53 new AnalysisDomainHandler(server), | 56 new AnalysisDomainHandler(server), |
| 57 new EditDomainHandler(server), |
| 58 new SearchDomainHandler(server), |
| 59 new CompletionDomainHandler(server), |
| 54 ]; | 60 ]; |
| 55 } | 61 } |
| 56 | 62 |
| 57 } | 63 } |
| OLD | NEW |