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

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

Issue 2067973002: Switch statement cleanups. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/plugin/protocol/protocol.dart'; 9 import 'package:analysis_server/plugin/protocol/protocol.dart';
10 import 'package:analysis_server/src/channel/channel.dart'; 10 import 'package:analysis_server/src/channel/channel.dart';
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 throw 'Failed to connect to analysis server at $serverUrl\n $error'; 111 throw 'Failed to connect to analysis server at $serverUrl\n $error';
112 }; 112 };
113 try { 113 try {
114 WebSocket socket = await WebSocket.connect(serverUrl).catchError(onError); 114 WebSocket socket = await WebSocket.connect(serverUrl).catchError(onError);
115 this.channel = new WebSocketClientChannel(socket); 115 this.channel = new WebSocketClientChannel(socket);
116 return this; 116 return this;
117 } catch (error) { 117 } catch (error) {
118 onError(error); 118 onError(error);
119 } 119 }
120 return null;
120 } 121 }
121 122
122 /** 123 /**
123 * Open a connection to a running analysis server 124 * Open a connection to a running analysis server
124 * and return a future with a manager for that analysis server. 125 * and return a future with a manager for that analysis server.
125 */ 126 */
126 static Future<AnalysisManager> connect(String serverUrl) { 127 static Future<AnalysisManager> connect(String serverUrl) {
127 return new AnalysisManager()._openConnection(serverUrl); 128 return new AnalysisManager()._openConnection(serverUrl);
128 } 129 }
129 130
130 /** 131 /**
131 * Launch analysis server in a separate process 132 * Launch analysis server in a separate process
132 * and return a future with a manager for that analysis server. 133 * and return a future with a manager for that analysis server.
133 */ 134 */
134 static Future<AnalysisManager> start(String serverPath) { 135 static Future<AnalysisManager> start(String serverPath) {
135 return new AnalysisManager()._launchServer(serverPath); 136 return new AnalysisManager()._launchServer(serverPath);
136 } 137 }
137 } 138 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698