| 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/protocol/protocol_generated.dart'; | 9 import 'package:analysis_server/protocol/protocol_generated.dart'; |
| 10 import 'package:analysis_server/src/provisional/completion/completion_core.dart'
; | 10 import 'package:analysis_server/src/provisional/completion/completion_core.dart'
; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 */ | 111 */ |
| 112 SourceFactory get sourceFactory; | 112 SourceFactory get sourceFactory; |
| 113 | 113 |
| 114 /** | 114 /** |
| 115 * Return the completion target. This determines what part of the parse tree | 115 * Return the completion target. This determines what part of the parse tree |
| 116 * will receive the newly inserted text. | 116 * will receive the newly inserted text. |
| 117 * At a minimum, all declarations in the completion scope in [target.unit] | 117 * At a minimum, all declarations in the completion scope in [target.unit] |
| 118 * will be resolved if they can be resolved. | 118 * will be resolved if they can be resolved. |
| 119 */ | 119 */ |
| 120 CompletionTarget get target; | 120 CompletionTarget get target; |
| 121 | |
| 122 /** | |
| 123 * Return a [Future] that completes when the element associated with | |
| 124 * the given [expression] in the target compilation unit is available. | |
| 125 * It may also complete if the expression cannot be resolved | |
| 126 * (e.g. unknown identifier, completion aborted, etc). | |
| 127 * Any information obtained from [target] prior to calling this method | |
| 128 * should be discarded as it may have changed. | |
| 129 */ | |
| 130 Future resolveContainingExpression(AstNode node); | |
| 131 | |
| 132 /** | |
| 133 * Return a [Future] that completes when the element associated with | |
| 134 * the given [statement] in the target compilation unit is available. | |
| 135 * It may also complete if the statement cannot be resolved | |
| 136 * (e.g. unknown identifier, completion aborted, etc). | |
| 137 * Any information obtained from [target] prior to calling this method | |
| 138 * should be discarded as it may have changed. | |
| 139 */ | |
| 140 Future resolveContainingStatement(AstNode node); | |
| 141 | |
| 142 /** | |
| 143 * Return a [Future] that completes with a list of [ImportElement]s | |
| 144 * for the library in which in which the completion is occurring. | |
| 145 * The [Future] may return `null` if the library unit cannot be determined | |
| 146 * (e.g. unlinked part file). | |
| 147 * Any information obtained from [target] prior to calling this method | |
| 148 * should be discarded as it may have changed. | |
| 149 */ | |
| 150 Future<List<ImportElement>> resolveImports(); | |
| 151 | |
| 152 /** | |
| 153 * Return a [Future] that completes with a list of [CompilationUnitElement]s | |
| 154 * comprising the library in which in which the completion is occurring. | |
| 155 * The [Future] may return `null` if the library unit cannot be determined | |
| 156 * (e.g. unlinked part file). | |
| 157 * Any information obtained from [target] prior to calling this method | |
| 158 * should be discarded as it may have changed. | |
| 159 */ | |
| 160 Future<List<CompilationUnitElement>> resolveUnits(); | |
| 161 } | 121 } |
| OLD | NEW |