| 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 | 8 |
| 9 import 'package:analysis_server/src/analysis_logger.dart'; | 9 import 'package:analysis_server/src/analysis_logger.dart'; |
| 10 import 'package:analysis_server/src/channel.dart'; | 10 import 'package:analysis_server/src/channel.dart'; |
| 11 import 'package:analysis_server/src/protocol.dart'; | 11 import 'package:analysis_server/src/protocol.dart'; |
| 12 import 'package:analyzer/src/generated/engine.dart'; | 12 import 'package:analyzer/src/generated/engine.dart'; |
| 13 import 'package:analyzer/src/generated/error.dart'; | 13 import 'package:analyzer/src/generated/error.dart'; |
| 14 import 'package:analyzer/src/generated/java_core.dart'; | 14 import 'package:analyzer/src/generated/java_core.dart'; |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * Instances of the class [AnalysisServer] implement a server that listens on a | 17 * Instances of the class [AnalysisServer] implement a server that listens on a |
| 18 * [CommunicationChannel] for analysis requests and process them. | 18 * [CommunicationChannel] for analysis requests and process them. |
| 19 */ | 19 */ |
| 20 class AnalysisServer { | 20 class AnalysisServer { |
| 21 /** | 21 /** |
| 22 * The name of the notification of new errors associated with a source. | 22 * The name of the notification of new errors associated with a source. |
| 23 */ | 23 */ |
| 24 static const String ERROR_NOTIFICATION_NAME = 'context.errors'; | 24 static const String ERROR_NOTIFICATION_NAME = 'context.errors'; |
| 25 | 25 |
| 26 /** | 26 /** |
| 27 * The name of the contextId parameter. |
| 28 */ |
| 29 static const String CONTEXT_ID_PARAM = 'contextId'; |
| 30 |
| 31 /** |
| 27 * The name of the parameter whose value is a list of errors. | 32 * The name of the parameter whose value is a list of errors. |
| 28 */ | 33 */ |
| 29 static const String ERRORS_PARAM = 'errors'; | 34 static const String ERRORS_PARAM = 'errors'; |
| 30 | 35 |
| 31 /** | 36 /** |
| 32 * The name of the parameter whose value is a source. | 37 * The name of the parameter whose value is a source. |
| 33 */ | 38 */ |
| 34 static const String SOURCE_PARAM = 'source'; | 39 static const String SOURCE_PARAM = 'source'; |
| 35 | 40 |
| 36 /** | 41 /** |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 void sendNotification(Notification notification) { | 226 void sendNotification(Notification notification) { |
| 222 channel.sendNotification(notification); | 227 channel.sendNotification(notification); |
| 223 } | 228 } |
| 224 | 229 |
| 225 void _scheduleTask() { | 230 void _scheduleTask() { |
| 226 new Future(performTask).catchError((ex, st) { | 231 new Future(performTask).catchError((ex, st) { |
| 227 AnalysisEngine.instance.logger.logError("${ex}\n${st}"); | 232 AnalysisEngine.instance.logger.logError("${ex}\n${st}"); |
| 228 }); | 233 }); |
| 229 } | 234 } |
| 230 } | 235 } |
| OLD | NEW |