| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 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 | 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.src.provisional.completion.completion_dart; | 5 library analysis_server.src.provisional.completion.completion_dart; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/plugin/protocol/protocol.dart'; | 9 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| 10 import 'package:analysis_server/src/provisional/completion/completion_core.dart'
; | 10 import 'package:analysis_server/src/provisional/completion/completion_core.dart'
; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 /** | 101 /** |
| 102 * Return the completion target. This determines what part of the parse tree | 102 * Return the completion target. This determines what part of the parse tree |
| 103 * will receive the newly inserted text. | 103 * will receive the newly inserted text. |
| 104 * At a minimum, all declarations in the completion scope in [target.unit] | 104 * At a minimum, all declarations in the completion scope in [target.unit] |
| 105 * will be resolved if they can be resolved. | 105 * will be resolved if they can be resolved. |
| 106 */ | 106 */ |
| 107 CompletionTarget get target; | 107 CompletionTarget get target; |
| 108 | 108 |
| 109 /** | 109 /** |
| 110 * Return a [Future] that completes with a list of directives for the library | |
| 111 * in which in which the completion is occurring. | |
| 112 * The [Future] may return `null` if the library unit cannot be determined | |
| 113 * (e.g. unlinked part file). | |
| 114 * Any information obtained from [target] prior to calling this method | |
| 115 * should be discarded as it may have changed. | |
| 116 */ | |
| 117 Future<List<Directive>> resolveDirectives(); | |
| 118 | |
| 119 /** | |
| 120 * Return a [Future] that completes when the element associated with | 110 * Return a [Future] that completes when the element associated with |
| 121 * the given [expression] in the target compilation unit is available. | 111 * the given [expression] in the target compilation unit is available. |
| 122 * It may also complete if the expression cannot be resolved | 112 * It may also complete if the expression cannot be resolved |
| 123 * (e.g. unknown identifier, completion aborted, etc). | 113 * (e.g. unknown identifier, completion aborted, etc). |
| 124 * Any information obtained from [target] prior to calling this method | 114 * Any information obtained from [target] prior to calling this method |
| 125 * should be discarded as it may have changed. | 115 * should be discarded as it may have changed. |
| 126 */ | 116 */ |
| 127 Future resolveExpression(Expression expression); | 117 Future resolveExpression(Expression expression); |
| 128 | 118 |
| 129 /** | 119 /** |
| 120 * Return a [Future] that completes with a list of [ImportElement]s |
| 121 * for the library in which in which the completion is occurring. |
| 122 * The [Future] may return `null` if the library unit cannot be determined |
| 123 * (e.g. unlinked part file). |
| 124 * Any information obtained from [target] prior to calling this method |
| 125 * should be discarded as it may have changed. |
| 126 */ |
| 127 Future<List<ImportElement>> resolveImports(); |
| 128 |
| 129 /** |
| 130 * Return a [Future] that completes with a list of [CompilationUnitElement]s | 130 * Return a [Future] that completes with a list of [CompilationUnitElement]s |
| 131 * comprising the library in which in which the completion is occurring. | 131 * comprising the library in which in which the completion is occurring. |
| 132 * The [Future] may return `null` if the library unit cannot be determined | 132 * The [Future] may return `null` if the library unit cannot be determined |
| 133 * (e.g. unlinked part file). | 133 * (e.g. unlinked part file). |
| 134 * Any information obtained from [target] prior to calling this method | 134 * Any information obtained from [target] prior to calling this method |
| 135 * should be discarded as it may have changed. | 135 * should be discarded as it may have changed. |
| 136 */ | 136 */ |
| 137 Future<List<CompilationUnitElement>> resolveUnits(); | 137 Future<List<CompilationUnitElement>> resolveUnits(); |
| 138 } | 138 } |
| OLD | NEW |