| 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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 815 | 815 |
| 816 void shutdown() { | 816 void shutdown() { |
| 817 running = false; | 817 running = false; |
| 818 if (index != null) { | 818 if (index != null) { |
| 819 index.clear(); | 819 index.clear(); |
| 820 index.stop(); | 820 index.stop(); |
| 821 } | 821 } |
| 822 // Defer closing the channel and shutting down the instrumentation server so | 822 // Defer closing the channel and shutting down the instrumentation server so |
| 823 // that the shutdown response can be sent and logged. | 823 // that the shutdown response can be sent and logged. |
| 824 new Future(() { | 824 new Future(() { |
| 825 instrumentationService.shutdown(); |
| 825 channel.close(); | 826 channel.close(); |
| 826 instrumentationService.shutdown(); | |
| 827 }); | 827 }); |
| 828 } | 828 } |
| 829 | 829 |
| 830 /** | 830 /** |
| 831 * Implementation for `analysis.updateContent`. | 831 * Implementation for `analysis.updateContent`. |
| 832 */ | 832 */ |
| 833 void updateContent(String id, Map<String, dynamic> changes) { | 833 void updateContent(String id, Map<String, dynamic> changes) { |
| 834 changes.forEach((file, change) { | 834 changes.forEach((file, change) { |
| 835 AnalysisContext analysisContext = getAnalysisContext(file); | 835 AnalysisContext analysisContext = getAnalysisContext(file); |
| 836 // TODO(paulberry): handle the case where a file is referred to by more | 836 // TODO(paulberry): handle the case where a file is referred to by more |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1067 * [packageUriResolver]. | 1067 * [packageUriResolver]. |
| 1068 */ | 1068 */ |
| 1069 SourceFactory _createSourceFactory(UriResolver packageUriResolver) { | 1069 SourceFactory _createSourceFactory(UriResolver packageUriResolver) { |
| 1070 List<UriResolver> resolvers = <UriResolver>[ | 1070 List<UriResolver> resolvers = <UriResolver>[ |
| 1071 new DartUriResolver(analysisServer.defaultSdk), | 1071 new DartUriResolver(analysisServer.defaultSdk), |
| 1072 new ResourceUriResolver(resourceProvider), | 1072 new ResourceUriResolver(resourceProvider), |
| 1073 packageUriResolver]; | 1073 packageUriResolver]; |
| 1074 return new SourceFactory(resolvers); | 1074 return new SourceFactory(resolvers); |
| 1075 } | 1075 } |
| 1076 } | 1076 } |
| OLD | NEW |