| 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:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 import 'dart:math'; | 9 import 'dart:math'; |
| 10 | 10 |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 plugins.add(AnalysisEngine.instance.enginePlugin); | 265 plugins.add(AnalysisEngine.instance.enginePlugin); |
| 266 plugins.add(serverPlugin); | 266 plugins.add(serverPlugin); |
| 267 plugins.addAll(_userDefinedPlugins); | 267 plugins.addAll(_userDefinedPlugins); |
| 268 ExtensionManager manager = new ExtensionManager(); | 268 ExtensionManager manager = new ExtensionManager(); |
| 269 manager.processPlugins(plugins); | 269 manager.processPlugins(plugins); |
| 270 | 270 |
| 271 socketServer = new SocketServer( | 271 socketServer = new SocketServer( |
| 272 analysisServerOptions, defaultSdk, service, serverPlugin); | 272 analysisServerOptions, defaultSdk, service, serverPlugin); |
| 273 httpServer = new HttpAnalysisServer(socketServer); | 273 httpServer = new HttpAnalysisServer(socketServer); |
| 274 stdioServer = new StdioAnalysisServer(socketServer); | 274 stdioServer = new StdioAnalysisServer(socketServer); |
| 275 socketServer.userDefinedPlugins = _userDefinedPlugins; |
| 275 | 276 |
| 276 if (serve_http) { | 277 if (serve_http) { |
| 277 httpServer.serveHttp(port); | 278 httpServer.serveHttp(port); |
| 278 } | 279 } |
| 279 | 280 |
| 280 _captureExceptions(service, () { | 281 _captureExceptions(service, () { |
| 281 stdioServer.serveStdio().then((_) { | 282 stdioServer.serveStdio().then((_) { |
| 282 if (serve_http) { | 283 if (serve_http) { |
| 283 httpServer.close(); | 284 httpServer.close(); |
| 284 } | 285 } |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 uuidFile.parent.createSync(recursive: true); | 412 uuidFile.parent.createSync(recursive: true); |
| 412 uuidFile.writeAsStringSync(uuid); | 413 uuidFile.writeAsStringSync(uuid); |
| 413 } catch (exception, stackTrace) { | 414 } catch (exception, stackTrace) { |
| 414 service.logPriorityException(exception, stackTrace); | 415 service.logPriorityException(exception, stackTrace); |
| 415 // Slightly alter the uuid to indicate it was not persisted | 416 // Slightly alter the uuid to indicate it was not persisted |
| 416 uuid = 'temp-$uuid'; | 417 uuid = 'temp-$uuid'; |
| 417 } | 418 } |
| 418 return uuid; | 419 return uuid; |
| 419 } | 420 } |
| 420 } | 421 } |
| OLD | NEW |