| 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 domain.server; | 5 library domain.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/constants.dart'; | 8 import 'package:analysis_server/src/constants.dart'; |
| 9 import 'package:analysis_server/src/protocol.dart'; | 9 import 'package:analysis_server/src/protocol.dart'; |
| 10 | 10 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 return null; | 48 return null; |
| 49 } | 49 } |
| 50 | 50 |
| 51 /** | 51 /** |
| 52 * Subscribe for services. | 52 * Subscribe for services. |
| 53 * | 53 * |
| 54 * All previous subscriptions are replaced by the given set of subscriptions. | 54 * All previous subscriptions are replaced by the given set of subscriptions. |
| 55 */ | 55 */ |
| 56 Response setSubscriptions(Request request) { | 56 Response setSubscriptions(Request request) { |
| 57 server.serverServices = | 57 server.serverServices = |
| 58 new ServerSetSubscriptionsParams.fromRequest(request).subscriptions | 58 new ServerSetSubscriptionsParams.fromRequest(request) |
| 59 .subscriptions |
| 59 .toSet(); | 60 .toSet(); |
| 60 return new ServerSetSubscriptionsResult().toResponse(request.id); | 61 return new ServerSetSubscriptionsResult().toResponse(request.id); |
| 61 } | 62 } |
| 62 | 63 |
| 63 /** | 64 /** |
| 64 * Cleanly shutdown the analysis server. | 65 * Cleanly shutdown the analysis server. |
| 65 */ | 66 */ |
| 66 Response shutdown(Request request) { | 67 Response shutdown(Request request) { |
| 67 server.shutdown(); | 68 server.shutdown(); |
| 68 Response response = new ServerShutdownResult().toResponse(request.id); | 69 Response response = new ServerShutdownResult().toResponse(request.id); |
| 69 return response; | 70 return response; |
| 70 } | 71 } |
| 71 } | 72 } |
| OLD | NEW |