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

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

Issue 506433002: Finish modifying analysis server to make use of code generation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 library analysis.server; 5 library analysis.server;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/file_system/file_system.dart'; 10 import 'package:analyzer/file_system/file_system.dart';
11 import 'package:analysis_server/src/analysis_logger.dart'; 11 import 'package:analysis_server/src/analysis_logger.dart';
12 import 'package:analysis_server/src/channel.dart'; 12 import 'package:analysis_server/src/channel.dart';
13 import 'package:analysis_server/src/constants.dart';
14 import 'package:analysis_server/src/context_manager.dart'; 13 import 'package:analysis_server/src/context_manager.dart';
15 import 'package:analysis_server/src/operation/operation_analysis.dart'; 14 import 'package:analysis_server/src/operation/operation_analysis.dart';
16 import 'package:analysis_server/src/operation/operation.dart'; 15 import 'package:analysis_server/src/operation/operation.dart';
17 import 'package:analysis_server/src/operation/operation_queue.dart'; 16 import 'package:analysis_server/src/operation/operation_queue.dart';
18 import 'package:analysis_server/src/package_map_provider.dart'; 17 import 'package:analysis_server/src/package_map_provider.dart';
19 import 'package:analysis_server/src/protocol.dart'; 18 import 'package:analysis_server/src/protocol.dart' hide Element;
20 import 'package:analysis_server/src/protocol2.dart' show AddContentOverlay,
21 AnalysisService, AnalysisStatus, ChangeContentOverlay,
22 RemoveContentOverlay, ServerErrorParams, ServerService, ServerStatusParams,
23 SourceEdit;
24 import 'package:analyzer/source/package_map_resolver.dart'; 19 import 'package:analyzer/source/package_map_resolver.dart';
25 import 'package:analyzer/src/generated/ast.dart'; 20 import 'package:analyzer/src/generated/ast.dart';
26 import 'package:analyzer/src/generated/engine.dart'; 21 import 'package:analyzer/src/generated/engine.dart';
27 import 'package:analyzer/src/generated/source.dart'; 22 import 'package:analyzer/src/generated/source.dart';
28 import 'package:analyzer/src/generated/sdk.dart'; 23 import 'package:analyzer/src/generated/sdk.dart';
29 import 'package:analyzer/src/generated/source_io.dart'; 24 import 'package:analyzer/src/generated/source_io.dart';
30 import 'package:analyzer/src/generated/java_engine.dart'; 25 import 'package:analyzer/src/generated/java_engine.dart';
31 import 'package:analysis_server/src/services/index/index.dart'; 26 import 'package:analysis_server/src/services/index/index.dart';
32 import 'package:analysis_server/src/services/search/search_engine.dart'; 27 import 'package:analysis_server/src/services/search/search_engine.dart';
33 import 'package:analyzer/src/generated/element.dart'; 28 import 'package:analyzer/src/generated/element.dart';
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 */ 197 */
203 AnalysisServer(this.channel, this.resourceProvider, 198 AnalysisServer(this.channel, this.resourceProvider,
204 PackageMapProvider packageMapProvider, this.index, this.defaultSdk, 199 PackageMapProvider packageMapProvider, this.index, this.defaultSdk,
205 {this.rethrowExceptions: true}) { 200 {this.rethrowExceptions: true}) {
206 searchEngine = createSearchEngine(index); 201 searchEngine = createSearchEngine(index);
207 operationQueue = new ServerOperationQueue(this); 202 operationQueue = new ServerOperationQueue(this);
208 contextDirectoryManager = new ServerContextManager( 203 contextDirectoryManager = new ServerContextManager(
209 this, resourceProvider, packageMapProvider); 204 this, resourceProvider, packageMapProvider);
210 AnalysisEngine.instance.logger = new AnalysisLogger(); 205 AnalysisEngine.instance.logger = new AnalysisLogger();
211 running = true; 206 running = true;
212 Notification notification = new Notification(SERVER_CONNECTED); 207 Notification notification = new ServerConnectedParams().toNotification();
213 channel.sendNotification(notification); 208 channel.sendNotification(notification);
214 channel.listen(handleRequest, onDone: done, onError: error); 209 channel.listen(handleRequest, onDone: done, onError: error);
215 } 210 }
216 211
217 /** 212 /**
218 * Schedules execution of the given [ServerOperation]. 213 * Schedules execution of the given [ServerOperation].
219 */ 214 */
220 void scheduleOperation(ServerOperation operation) { 215 void scheduleOperation(ServerOperation operation) {
221 bool wasEmpty = operationQueue.isEmpty; 216 bool wasEmpty = operationQueue.isEmpty;
222 addOperation(operation); 217 addOperation(operation);
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 stackTraceString = 'null stackTrace'; 798 stackTraceString = 'null stackTrace';
804 } 799 }
805 // send the notification 800 // send the notification
806 channel.sendNotification(new ServerErrorParams(true, exceptionString, 801 channel.sendNotification(new ServerErrorParams(true, exceptionString,
807 stackTraceString).toNotification()); 802 stackTraceString).toNotification());
808 } 803 }
809 } 804 }
810 805
811 806
812 typedef void OptionUpdater(AnalysisOptionsImpl options); 807 typedef void OptionUpdater(AnalysisOptionsImpl options);
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/analysis_manager.dart ('k') | pkg/analysis_server/lib/src/computer/computer_highlights.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698