| 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 services.completion.computer; | 5 library services.completion.manager; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/protocol.dart'; | 9 import 'package:analysis_server/src/protocol.dart'; |
| 10 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; | 10 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; |
| 11 import 'package:analysis_server/src/services/search/search_engine.dart'; | 11 import 'package:analysis_server/src/services/search/search_engine.dart'; |
| 12 import 'package:analyzer/src/generated/engine.dart'; | 12 import 'package:analyzer/src/generated/engine.dart'; |
| 13 import 'package:analyzer/src/generated/source.dart'; | 13 import 'package:analyzer/src/generated/source.dart'; |
| 14 | 14 |
| 15 /** | 15 /** |
| 16 * [CompletionCache] contains information about the prior code completion | 16 * [CompletionCache] contains information about the prior code completion |
| 17 * for use in the next code completion. | 17 * for use in the next code completion. |
| 18 */ | 18 */ |
| 19 abstract class CompletionCache { | 19 abstract class CompletionCache { |
| 20 | 20 |
| 21 /** | 21 /** |
| 22 * The context in which the completion was computed. | 22 * The context in which the completion was computed. |
| 23 */ | 23 */ |
| 24 final AnalysisContext context; | 24 final AnalysisContext context; |
| 25 | 25 |
| 26 /** | 26 /** |
| 27 * The source in which the completion was computed. | 27 * The source in which the completion was computed. |
| 28 */ | 28 */ |
| 29 final Source source; | 29 final Source source; |
| 30 | 30 |
| 31 CompletionCache(this.context, this.source); | 31 CompletionCache(this.context, this.source); |
| 32 } | 32 } |
| 33 | 33 |
| 34 /** | 34 /** |
| 35 * Manages `CompletionComputer`s for a given completion request. | 35 * Manages completion contributors for a given completion request. |
| 36 */ | 36 */ |
| 37 abstract class CompletionManager { | 37 abstract class CompletionManager { |
| 38 | 38 |
| 39 /** | 39 /** |
| 40 * The context in which the completion was computed. | 40 * The context in which the completion was computed. |
| 41 */ | 41 */ |
| 42 final AnalysisContext context; | 42 final AnalysisContext context; |
| 43 | 43 |
| 44 /** | 44 /** |
| 45 * The source in which the completion was computed. | 45 * The source in which the completion was computed. |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 */ | 285 */ |
| 286 final String name; | 286 final String name; |
| 287 | 287 |
| 288 /** | 288 /** |
| 289 * The elapse time or `null` if undefined. | 289 * The elapse time or `null` if undefined. |
| 290 */ | 290 */ |
| 291 final Duration elapsed; | 291 final Duration elapsed; |
| 292 | 292 |
| 293 OperationPerformance(this.name, this.elapsed); | 293 OperationPerformance(this.name, this.elapsed); |
| 294 } | 294 } |
| OLD | NEW |