Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: pkg/analysis_server/lib/src/analysis_manager.dart

Issue 337943002: Adjust server for API changes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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.dart';
10 import 'package:analysis_server/src/constants.dart'; 10 import 'package:analysis_server/src/constants.dart';
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 * 114 *
115 * Returns `true` if the signal is successfully sent and process terminates. 115 * Returns `true` if the signal is successfully sent and process terminates.
116 * Otherwise there was no attached process or the signal could not be sent, 116 * Otherwise there was no attached process or the signal could not be sent,
117 * usually meaning that the process is already dead. 117 * usually meaning that the process is already dead.
118 */ 118 */
119 Future<bool> stop() { 119 Future<bool> stop() {
120 if (process == null) { 120 if (process == null) {
121 return channel.close().then((_) => false); 121 return channel.close().then((_) => false);
122 } 122 }
123 return channel 123 return channel
124 .sendRequest(new Request('0', METHOD_SHUTDOWN)) 124 .sendRequest(new Request('0', SERVER_SHUTDOWN))
125 .timeout(new Duration(seconds: 2), onTimeout: () { 125 .timeout(new Duration(seconds: 2), onTimeout: () {
126 print('Expected shutdown response'); 126 print('Expected shutdown response');
127 }) 127 })
128 .then((Response response) { 128 .then((Response response) {
129 return channel.close().then((_) => process.exitCode); 129 return channel.close().then((_) => process.exitCode);
130 }) 130 })
131 .timeout(new Duration(seconds: 2), onTimeout: () { 131 .timeout(new Duration(seconds: 2), onTimeout: () {
132 print('Expected server to shutdown'); 132 print('Expected server to shutdown');
133 process.kill(); 133 process.kill();
134 }) 134 })
135 .then((int result) { 135 .then((int result) {
136 if (result != null && result != 0) { 136 if (result != null && result != 0) {
137 exitCode = result; 137 exitCode = result;
138 } 138 }
139 return true; 139 return true;
140 }); 140 });
141 } 141 }
142 } 142 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/analysis_server.dart » ('j') | pkg/analysis_server/lib/src/constants.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698