| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 5 library analysis_server.completion.completion_dart; |
| 6 |
| 7 import 'package:analysis_server/completion/completion_core.dart'; |
| 8 import 'package:analyzer/src/generated/ast.dart'; |
| 9 |
| 10 abstract class DartCompletionContributor extends CompletionContributor { |
| 11 @override |
| 12 CompletionResult computeSuggestions(CompletionRequest request) { |
| 13 // TODO(brianwilkerson) Implement this by getting the information required |
| 14 // to create a DartCompletionRequest and calling: |
| 15 // return internalComputeSuggestions(dartRequest); |
| 16 return null; |
| 17 } |
| 18 |
| 19 /** |
| 20 * Compute a list of completion suggestions based on the given completion |
| 21 * [request] and return a result that includes those suggestions. This method |
| 22 * is called after specific phases of analysis until the contributor indicates |
| 23 * computation is complete by setting [CompletionResult.isLast] to `true`. |
| 24 */ |
| 25 CompletionResult internalComputeSuggestions(DartCompletionRequest request); |
| 26 } |
| 27 |
| 28 /** |
| 29 * The information about a requested list of completions within a Dart file. |
| 30 */ |
| 31 abstract class DartCompletionRequest extends CompletionRequest { |
| 32 /** |
| 33 * Return `true` if the compilation [unit] is resolved. |
| 34 */ |
| 35 bool get isResolved; |
| 36 |
| 37 /** |
| 38 * The compilation unit in which the completion was requested. |
| 39 */ |
| 40 CompilationUnit get unit; |
| 41 |
| 42 /** |
| 43 * Cached information from a prior code completion operation. |
| 44 */ |
| 45 //DartCompletionCache get cache; |
| 46 |
| 47 /** |
| 48 * The completion target. This determines what part of the parse tree |
| 49 * will receive the newly inserted text. |
| 50 */ |
| 51 //CompletionTarget get target; |
| 52 |
| 53 /** |
| 54 * Information about the types of suggestions that should be included. |
| 55 */ |
| 56 //OpType get _optype; |
| 57 } |
| OLD | NEW |