| 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 driver; | 5 library driver; |
| 6 | 6 |
| 7 import 'dart:io'; | 7 import 'dart:io'; |
| 8 | 8 |
| 9 import 'package:analysis_server/http_server.dart'; | 9 import 'package:analysis_server/http_server.dart'; |
| 10 import 'package:analysis_server/src/socket_server.dart'; | 10 import 'package:analysis_server/src/socket_server.dart'; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 } | 75 } |
| 76 } | 76 } |
| 77 | 77 |
| 78 if (serve_http) { | 78 if (serve_http) { |
| 79 httpServer.serveHttp(port); | 79 httpServer.serveHttp(port); |
| 80 } | 80 } |
| 81 stdioServer.serveStdio().then((_) { | 81 stdioServer.serveStdio().then((_) { |
| 82 if (serve_http) { | 82 if (serve_http) { |
| 83 httpServer.close(); | 83 httpServer.close(); |
| 84 } | 84 } |
| 85 exit(0); |
| 85 }); | 86 }); |
| 86 } | 87 } |
| 87 | 88 |
| 88 /** | 89 /** |
| 89 * Print information about how to use the server. | 90 * Print information about how to use the server. |
| 90 */ | 91 */ |
| 91 void _printUsage(ArgParser parser) { | 92 void _printUsage(ArgParser parser) { |
| 92 print('Usage: $BINARY_NAME [flags]'); | 93 print('Usage: $BINARY_NAME [flags]'); |
| 93 print(''); | 94 print(''); |
| 94 print('Supported flags are:'); | 95 print('Supported flags are:'); |
| 95 print(parser.getUsage()); | 96 print(parser.getUsage()); |
| 96 } | 97 } |
| 97 } | 98 } |
| OLD | NEW |