| 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 import 'dart:math' show max; | 9 import 'dart:math' show max; |
| 10 | 10 |
| 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/channel.dart'; | 12 import 'package:analysis_server/src/channel/channel.dart'; |
| 13 import 'package:analysis_server/src/context_manager.dart'; | 13 import 'package:analysis_server/src/context_manager.dart'; |
| 14 import 'package:analysis_server/src/operation/operation.dart'; | 14 import 'package:analysis_server/src/operation/operation.dart'; |
| 15 import 'package:analysis_server/src/operation/operation_analysis.dart'; | 15 import 'package:analysis_server/src/operation/operation_analysis.dart'; |
| 16 import 'package:analysis_server/src/operation/operation_queue.dart'; | 16 import 'package:analysis_server/src/operation/operation_queue.dart'; |
| 17 import 'package:analysis_server/src/protocol.dart' hide Element; | 17 import 'package:analysis_server/src/protocol.dart' hide Element; |
| 18 import 'package:analysis_server/src/services/correction/namespace.dart'; | 18 import 'package:analysis_server/src/services/correction/namespace.dart'; |
| 19 import 'package:analysis_server/src/services/index/index.dart'; | 19 import 'package:analysis_server/src/services/index/index.dart'; |
| 20 import 'package:analysis_server/src/services/search/search_engine.dart'; | 20 import 'package:analysis_server/src/services/search/search_engine.dart'; |
| 21 import 'package:analyzer/file_system/file_system.dart'; | 21 import 'package:analyzer/file_system/file_system.dart'; |
| 22 import 'package:analyzer/instrumentation/instrumentation.dart'; | 22 import 'package:analyzer/instrumentation/instrumentation.dart'; |
| 23 import 'package:analyzer/plugin/plugin.dart'; |
| 23 import 'package:analyzer/source/package_map_provider.dart'; | 24 import 'package:analyzer/source/package_map_provider.dart'; |
| 24 import 'package:analyzer/src/generated/ast.dart'; | 25 import 'package:analyzer/src/generated/ast.dart'; |
| 25 import 'package:analyzer/src/generated/element.dart'; | 26 import 'package:analyzer/src/generated/element.dart'; |
| 26 import 'package:analyzer/src/generated/engine.dart'; | 27 import 'package:analyzer/src/generated/engine.dart'; |
| 27 import 'package:analyzer/src/generated/java_engine.dart'; | 28 import 'package:analyzer/src/generated/java_engine.dart'; |
| 28 import 'package:analyzer/src/generated/sdk.dart'; | 29 import 'package:analyzer/src/generated/sdk.dart'; |
| 29 import 'package:analyzer/src/generated/source.dart'; | 30 import 'package:analyzer/src/generated/source.dart'; |
| 30 import 'package:analyzer/src/generated/source_io.dart'; | 31 import 'package:analyzer/src/generated/source_io.dart'; |
| 31 import 'package:analyzer/src/generated/utilities_general.dart'; | 32 import 'package:analyzer/src/generated/utilities_general.dart'; |
| 32 | 33 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 int _nextPerformOperationDelayTime = | 228 int _nextPerformOperationDelayTime = |
| 228 new DateTime.now().millisecondsSinceEpoch + 1000; | 229 new DateTime.now().millisecondsSinceEpoch + 1000; |
| 229 | 230 |
| 230 /** | 231 /** |
| 231 * The current state of overlays from the client. This is used as the | 232 * The current state of overlays from the client. This is used as the |
| 232 * content cache for all contexts. | 233 * content cache for all contexts. |
| 233 */ | 234 */ |
| 234 final ContentCache overlayState = new ContentCache(); | 235 final ContentCache overlayState = new ContentCache(); |
| 235 | 236 |
| 236 /** | 237 /** |
| 238 * The plugins that are defined outside the analysis_server package. |
| 239 */ |
| 240 List<Plugin> userDefinedPlugins; |
| 241 |
| 242 /** |
| 237 * Initialize a newly created server to receive requests from and send | 243 * Initialize a newly created server to receive requests from and send |
| 238 * responses to the given [channel]. | 244 * responses to the given [channel]. |
| 239 * | 245 * |
| 240 * If [rethrowExceptions] is true, then any exceptions thrown by analysis are | 246 * If [rethrowExceptions] is true, then any exceptions thrown by analysis are |
| 241 * propagated up the call stack. The default is true to allow analysis | 247 * propagated up the call stack. The default is true to allow analysis |
| 242 * exceptions to show up in unit tests, but it should be set to false when | 248 * exceptions to show up in unit tests, but it should be set to false when |
| 243 * running a full analysis server. | 249 * running a full analysis server. |
| 244 */ | 250 */ |
| 245 AnalysisServer(this.channel, this.resourceProvider, | 251 AnalysisServer(this.channel, this.resourceProvider, |
| 246 PackageMapProvider packageMapProvider, Index _index, | 252 PackageMapProvider packageMapProvider, Index _index, |
| (...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1417 /** | 1423 /** |
| 1418 * The [PerformanceTag] for time spent in server request handlers. | 1424 * The [PerformanceTag] for time spent in server request handlers. |
| 1419 */ | 1425 */ |
| 1420 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); | 1426 static PerformanceTag serverRequests = new PerformanceTag('serverRequests'); |
| 1421 | 1427 |
| 1422 /** | 1428 /** |
| 1423 * The [PerformanceTag] for time spent in split store microtasks. | 1429 * The [PerformanceTag] for time spent in split store microtasks. |
| 1424 */ | 1430 */ |
| 1425 static PerformanceTag splitStore = new PerformanceTag('splitStore'); | 1431 static PerformanceTag splitStore = new PerformanceTag('splitStore'); |
| 1426 } | 1432 } |
| OLD | NEW |