| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 CompletionTarget get target; | 108 CompletionTarget get target; |
| 109 | 109 |
| 110 /** | 110 /** |
| 111 * Return a [Future] that completes when the element associated with | 111 * Return a [Future] that completes when the element associated with |
| 112 * the given [expression] in the target compilation unit is available. | 112 * the given [expression] in the target compilation unit is available. |
| 113 * It may also complete if the expression cannot be resolved | 113 * It may also complete if the expression cannot be resolved |
| 114 * (e.g. unknown identifier, completion aborted, etc). | 114 * (e.g. unknown identifier, completion aborted, etc). |
| 115 * Any information obtained from [target] prior to calling this method | 115 * Any information obtained from [target] prior to calling this method |
| 116 * should be discarded as it may have changed. | 116 * should be discarded as it may have changed. |
| 117 */ | 117 */ |
| 118 Future resolveExpression(Expression expression); | 118 Future resolveContainingExpression(Expression expression); |
| 119 |
| 120 /** |
| 121 * Return a [Future] that completes when the element associated with |
| 122 * the given [statement] in the target compilation unit is available. |
| 123 * It may also complete if the statement cannot be resolved |
| 124 * (e.g. unknown identifier, completion aborted, etc). |
| 125 * Any information obtained from [target] prior to calling this method |
| 126 * should be discarded as it may have changed. |
| 127 */ |
| 128 Future resolveContainingStatement(Statement expression); |
| 119 | 129 |
| 120 /** | 130 /** |
| 121 * Return a [Future] that completes with a list of [ImportElement]s | 131 * Return a [Future] that completes with a list of [ImportElement]s |
| 122 * for the library in which in which the completion is occurring. | 132 * for the library in which in which the completion is occurring. |
| 123 * The [Future] may return `null` if the library unit cannot be determined | 133 * The [Future] may return `null` if the library unit cannot be determined |
| 124 * (e.g. unlinked part file). | 134 * (e.g. unlinked part file). |
| 125 * Any information obtained from [target] prior to calling this method | 135 * Any information obtained from [target] prior to calling this method |
| 126 * should be discarded as it may have changed. | 136 * should be discarded as it may have changed. |
| 127 */ | 137 */ |
| 128 Future<List<ImportElement>> resolveImports(); | 138 Future<List<ImportElement>> resolveImports(); |
| 129 | 139 |
| 130 /** | 140 /** |
| 131 * Return a [Future] that completes with a list of [CompilationUnitElement]s | 141 * Return a [Future] that completes with a list of [CompilationUnitElement]s |
| 132 * comprising the library in which in which the completion is occurring. | 142 * comprising the library in which in which the completion is occurring. |
| 133 * The [Future] may return `null` if the library unit cannot be determined | 143 * The [Future] may return `null` if the library unit cannot be determined |
| 134 * (e.g. unlinked part file). | 144 * (e.g. unlinked part file). |
| 135 * Any information obtained from [target] prior to calling this method | 145 * Any information obtained from [target] prior to calling this method |
| 136 * should be discarded as it may have changed. | 146 * should be discarded as it may have changed. |
| 137 */ | 147 */ |
| 138 Future<List<CompilationUnitElement>> resolveUnits(); | 148 Future<List<CompilationUnitElement>> resolveUnits(); |
| 139 } | 149 } |
| OLD | NEW |