| 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/src/channel.dart'; | 9 import 'package:analysis_server/src/channel/channel.dart'; |
| 10 import 'package:analysis_server/src/channel/web_socket_channel.dart'; |
| 10 import 'package:analysis_server/src/protocol.dart'; | 11 import 'package:analysis_server/src/protocol.dart'; |
| 11 | 12 |
| 12 /** | 13 /** |
| 13 * [AnalysisManager] is used to launch and manage an analysis server | 14 * [AnalysisManager] is used to launch and manage an analysis server |
| 14 * running in a separate process using either the [start] or [connect] methods. | 15 * running in a separate process using either the [start] or [connect] methods. |
| 15 */ | 16 */ |
| 16 class AnalysisManager { | 17 class AnalysisManager { |
| 17 // TODO dynamically allocate port and/or allow client to specify port | 18 // TODO dynamically allocate port and/or allow client to specify port |
| 18 static const int PORT = 3333; | 19 static const int PORT = 3333; |
| 19 | 20 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 process.kill(); | 133 process.kill(); |
| 133 }) | 134 }) |
| 134 .then((int result) { | 135 .then((int result) { |
| 135 if (result != null && result != 0) { | 136 if (result != null && result != 0) { |
| 136 exitCode = result; | 137 exitCode = result; |
| 137 } | 138 } |
| 138 return true; | 139 return true; |
| 139 }); | 140 }); |
| 140 } | 141 } |
| 141 } | 142 } |
| OLD | NEW |