| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 const AnalysisDoneReason._(this.text); | 56 const AnalysisDoneReason._(this.text); |
| 57 } | 57 } |
| 58 | 58 |
| 59 | 59 |
| 60 /** | 60 /** |
| 61 * Instances of the class [AnalysisServer] implement a server that listens on a | 61 * Instances of the class [AnalysisServer] implement a server that listens on a |
| 62 * [CommunicationChannel] for analysis requests and process them. | 62 * [CommunicationChannel] for analysis requests and process them. |
| 63 */ | 63 */ |
| 64 class AnalysisServer { | 64 class AnalysisServer { |
| 65 |
| 66 // Replaced during build with AnalysisServer version |
| 67 static final String VERSION = '0.0.1'; |
| 68 |
| 65 /** | 69 /** |
| 66 * The channel from which requests are received and to which responses should | 70 * The channel from which requests are received and to which responses should |
| 67 * be sent. | 71 * be sent. |
| 68 */ | 72 */ |
| 69 final ServerCommunicationChannel channel; | 73 final ServerCommunicationChannel channel; |
| 70 | 74 |
| 71 /** | 75 /** |
| 72 * The [ResourceProvider] using which paths are converted into [Resource]s. | 76 * The [ResourceProvider] using which paths are converted into [Resource]s. |
| 73 */ | 77 */ |
| 74 final ResourceProvider resourceProvider; | 78 final ResourceProvider resourceProvider; |
| (...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1077 * [packageUriResolver]. | 1081 * [packageUriResolver]. |
| 1078 */ | 1082 */ |
| 1079 SourceFactory _createSourceFactory(UriResolver packageUriResolver) { | 1083 SourceFactory _createSourceFactory(UriResolver packageUriResolver) { |
| 1080 List<UriResolver> resolvers = <UriResolver>[ | 1084 List<UriResolver> resolvers = <UriResolver>[ |
| 1081 new DartUriResolver(analysisServer.defaultSdk), | 1085 new DartUriResolver(analysisServer.defaultSdk), |
| 1082 new ResourceUriResolver(resourceProvider), | 1086 new ResourceUriResolver(resourceProvider), |
| 1083 packageUriResolver]; | 1087 packageUriResolver]; |
| 1084 return new SourceFactory(resolvers); | 1088 return new SourceFactory(resolvers); |
| 1085 } | 1089 } |
| 1086 } | 1090 } |
| OLD | NEW |