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 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'dart:convert'; | 6 import 'dart:convert'; |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 | 8 |
9 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 9 import 'package:analysis_server/protocol/protocol.dart'; |
| 10 import 'package:analysis_server/protocol/protocol_generated.dart'; |
10 import 'package:analysis_server/src/channel/channel.dart'; | 11 import 'package:analysis_server/src/channel/channel.dart'; |
11 import 'package:analysis_server/src/channel/web_socket_channel.dart'; | 12 import 'package:analysis_server/src/channel/web_socket_channel.dart'; |
12 | 13 |
13 /** | 14 /** |
14 * [AnalysisManager] is used to launch and manage an analysis server | 15 * [AnalysisManager] is used to launch and manage an analysis server |
15 * running in a separate process using either the [start] or [connect] methods. | 16 * running in a separate process using either the [start] or [connect] methods. |
16 */ | 17 */ |
17 class AnalysisManager { | 18 class AnalysisManager { |
18 // TODO dynamically allocate port and/or allow client to specify port | 19 // TODO dynamically allocate port and/or allow client to specify port |
19 static const int PORT = 3333; | 20 static const int PORT = 3333; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 } | 130 } |
130 | 131 |
131 /** | 132 /** |
132 * Launch analysis server in a separate process | 133 * Launch analysis server in a separate process |
133 * and return a future with a manager for that analysis server. | 134 * and return a future with a manager for that analysis server. |
134 */ | 135 */ |
135 static Future<AnalysisManager> start(String serverPath) { | 136 static Future<AnalysisManager> start(String serverPath) { |
136 return new AnalysisManager()._launchServer(serverPath); | 137 return new AnalysisManager()._launchServer(serverPath); |
137 } | 138 } |
138 } | 139 } |
OLD | NEW |