| 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: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'; | 13 import 'package:analysis_server/src/constants.dart'; |
| 14 import 'package:analysis_server/src/context_manager.dart'; | 14 import 'package:analysis_server/src/context_manager.dart'; |
| 15 import 'package:analysis_server/src/domain_analysis.dart'; | 15 import 'package:analysis_server/src/domain_analysis.dart'; |
| 16 import 'package:analysis_server/src/operation/operation_analysis.dart'; | 16 import 'package:analysis_server/src/operation/operation_analysis.dart'; |
| 17 import 'package:analysis_server/src/operation/operation.dart'; | 17 import 'package:analysis_server/src/operation/operation.dart'; |
| 18 import 'package:analysis_server/src/operation/operation_queue.dart'; | 18 import 'package:analysis_server/src/operation/operation_queue.dart'; |
| 19 import 'package:analysis_server/src/package_map_provider.dart'; | 19 import 'package:analysis_server/src/package_map_provider.dart'; |
| 20 import 'package:analysis_server/src/protocol.dart'; | 20 import 'package:analysis_server/src/protocol.dart'; |
| 21 import 'package:analysis_server/src/protocol2.dart' show AnalysisService, |
| 22 ServerService; |
| 21 import 'package:analyzer/source/package_map_resolver.dart'; | 23 import 'package:analyzer/source/package_map_resolver.dart'; |
| 22 import 'package:analyzer/src/generated/ast.dart'; | 24 import 'package:analyzer/src/generated/ast.dart'; |
| 23 import 'package:analyzer/src/generated/engine.dart'; | 25 import 'package:analyzer/src/generated/engine.dart'; |
| 24 import 'package:analyzer/src/generated/source.dart'; | 26 import 'package:analyzer/src/generated/source.dart'; |
| 25 import 'package:analyzer/src/generated/sdk.dart'; | 27 import 'package:analyzer/src/generated/sdk.dart'; |
| 26 import 'package:analyzer/src/generated/source_io.dart'; | 28 import 'package:analyzer/src/generated/source_io.dart'; |
| 27 import 'package:analyzer/src/generated/java_engine.dart'; | 29 import 'package:analyzer/src/generated/java_engine.dart'; |
| 28 import 'package:analysis_server/src/services/correction/change.dart'; | 30 import 'package:analysis_server/src/services/correction/change.dart'; |
| 29 import 'package:analysis_server/src/services/index/index.dart'; | 31 import 'package:analysis_server/src/services/index/index.dart'; |
| 30 import 'package:analysis_server/src/services/search/search_engine.dart'; | 32 import 'package:analysis_server/src/services/search/search_engine.dart'; |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 // send the notification | 808 // send the notification |
| 807 Notification notification = new Notification(SERVER_ERROR); | 809 Notification notification = new Notification(SERVER_ERROR); |
| 808 notification.setParameter(FATAL, true); | 810 notification.setParameter(FATAL, true); |
| 809 notification.setParameter(MESSAGE, exceptionString); | 811 notification.setParameter(MESSAGE, exceptionString); |
| 810 notification.setParameter(STACK_TRACE, stackTraceString); | 812 notification.setParameter(STACK_TRACE, stackTraceString); |
| 811 channel.sendNotification(notification); | 813 channel.sendNotification(notification); |
| 812 } | 814 } |
| 813 } | 815 } |
| 814 | 816 |
| 815 | 817 |
| 816 /** | |
| 817 * An enumeration of the services provided by the analysis domain. | |
| 818 */ | |
| 819 class AnalysisService extends Enum2<AnalysisService> { | |
| 820 static const HIGHLIGHTS = const AnalysisService('HIGHLIGHTS', 1); | |
| 821 static const NAVIGATION = const AnalysisService('NAVIGATION', 2); | |
| 822 static const OCCURRENCES = const AnalysisService('OCCURRENCES', 3); | |
| 823 static const OUTLINE = const AnalysisService('OUTLINE', 4); | |
| 824 static const OVERRIDES = const AnalysisService('OVERRIDES', 5); | |
| 825 | |
| 826 static const List<AnalysisService> VALUES = | |
| 827 const [HIGHLIGHTS, NAVIGATION, OCCURRENCES, OUTLINE, OVERRIDES]; | |
| 828 | |
| 829 const AnalysisService(String name, int ordinal) : super(name, ordinal); | |
| 830 } | |
| 831 | |
| 832 | |
| 833 typedef void OptionUpdater(AnalysisOptionsImpl options); | 818 typedef void OptionUpdater(AnalysisOptionsImpl options); |
| 834 | |
| 835 /** | |
| 836 * An enumeration of the services provided by the server domain. | |
| 837 */ | |
| 838 class ServerService extends Enum2<ServerService> { | |
| 839 static const ServerService STATUS = const ServerService('STATUS', 0); | |
| 840 | |
| 841 static const List<ServerService> VALUES = const [STATUS]; | |
| 842 | |
| 843 const ServerService(String name, int ordinal) : super(name, ordinal); | |
| 844 } | |
| OLD | NEW |