Chromium Code Reviews| 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 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:analysis_server/src/analysis_logger.dart'; | 10 import 'package:analysis_server/src/analysis_logger.dart'; |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 189 * running a full analysis server. | 189 * running a full analysis server. |
| 190 */ | 190 */ |
| 191 AnalysisServer(this.channel, this.resourceProvider, | 191 AnalysisServer(this.channel, this.resourceProvider, |
| 192 PackageMapProvider packageMapProvider, this.index, | 192 PackageMapProvider packageMapProvider, this.index, |
| 193 AnalysisServerOptions analysisServerOptions, this.defaultSdk, | 193 AnalysisServerOptions analysisServerOptions, this.defaultSdk, |
| 194 this.instrumentationService, {this.rethrowExceptions: true}) { | 194 this.instrumentationService, {this.rethrowExceptions: true}) { |
| 195 searchEngine = createSearchEngine(index); | 195 searchEngine = createSearchEngine(index); |
| 196 operationQueue = new ServerOperationQueue(this); | 196 operationQueue = new ServerOperationQueue(this); |
| 197 contextDirectoryManager = | 197 contextDirectoryManager = |
| 198 new ServerContextManager(this, resourceProvider, packageMapProvider); | 198 new ServerContextManager(this, resourceProvider, packageMapProvider); |
| 199 contextDirectoryManager.defaultOptions.incremental = | 199 contextDirectoryManager.defaultOptions.incremental = true; |
|
Brian Wilkerson
2014/12/12 20:56:50
I assume we'll remove this option sometime later.
| |
| 200 analysisServerOptions.enableIncrementalResolution; | |
| 201 contextDirectoryManager.defaultOptions.incrementalApi = | 200 contextDirectoryManager.defaultOptions.incrementalApi = |
| 202 analysisServerOptions.enableIncrementalResolutionApi; | 201 analysisServerOptions.enableIncrementalResolutionApi; |
| 203 AnalysisEngine.instance.logger = new AnalysisLogger(); | 202 AnalysisEngine.instance.logger = new AnalysisLogger(); |
| 204 _onAnalysisStartedController = new StreamController.broadcast(); | 203 _onAnalysisStartedController = new StreamController.broadcast(); |
| 205 _onAnalysisCompleteController = new StreamController.broadcast(); | 204 _onAnalysisCompleteController = new StreamController.broadcast(); |
| 206 _onFileAnalyzedController = new StreamController.broadcast(); | 205 _onFileAnalyzedController = new StreamController.broadcast(); |
| 207 _onPriorityChangeController = | 206 _onPriorityChangeController = |
| 208 new StreamController<PriorityChangeEvent>.broadcast(); | 207 new StreamController<PriorityChangeEvent>.broadcast(); |
| 209 running = true; | 208 running = true; |
| 210 Notification notification = new ServerConnectedParams().toNotification(); | 209 Notification notification = new ServerConnectedParams().toNotification(); |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 929 channel.sendNotification( | 928 channel.sendNotification( |
| 930 new ServerErrorParams( | 929 new ServerErrorParams( |
| 931 true, | 930 true, |
| 932 exceptionString, | 931 exceptionString, |
| 933 stackTraceString).toNotification()); | 932 stackTraceString).toNotification()); |
| 934 } | 933 } |
| 935 } | 934 } |
| 936 | 935 |
| 937 | 936 |
| 938 class AnalysisServerOptions { | 937 class AnalysisServerOptions { |
| 939 bool enableIncrementalResolution = false; | |
| 940 bool enableIncrementalResolutionApi = false; | 938 bool enableIncrementalResolutionApi = false; |
| 941 } | 939 } |
| 942 | 940 |
| 943 /** | 941 /** |
| 944 * A [ContextsChangedEvent] indicate what contexts were added or removed. | 942 * A [ContextsChangedEvent] indicate what contexts were added or removed. |
| 945 * | 943 * |
| 946 * No context should be added to the event more than once. It does not make | 944 * No context should be added to the event more than once. It does not make |
| 947 * sense, for example, for a context to be both added and removed. | 945 * sense, for example, for a context to be both added and removed. |
| 948 */ | 946 */ |
| 949 class ContextsChangedEvent { | 947 class ContextsChangedEvent { |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1067 * [packageUriResolver]. | 1065 * [packageUriResolver]. |
| 1068 */ | 1066 */ |
| 1069 SourceFactory _createSourceFactory(UriResolver packageUriResolver) { | 1067 SourceFactory _createSourceFactory(UriResolver packageUriResolver) { |
| 1070 List<UriResolver> resolvers = <UriResolver>[ | 1068 List<UriResolver> resolvers = <UriResolver>[ |
| 1071 new DartUriResolver(analysisServer.defaultSdk), | 1069 new DartUriResolver(analysisServer.defaultSdk), |
| 1072 new ResourceUriResolver(resourceProvider), | 1070 new ResourceUriResolver(resourceProvider), |
| 1073 packageUriResolver]; | 1071 packageUriResolver]; |
| 1074 return new SourceFactory(resolvers); | 1072 return new SourceFactory(resolvers); |
| 1075 } | 1073 } |
| 1076 } | 1074 } |
| OLD | NEW |