| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 DartCompletionRequest request); | 54 DartCompletionRequest request); |
| 55 } | 55 } |
| 56 | 56 |
| 57 /** | 57 /** |
| 58 * The information about a requested list of completions within a Dart file. | 58 * The information about a requested list of completions within a Dart file. |
| 59 * | 59 * |
| 60 * Clients may not extend, implement or mix-in this class. | 60 * Clients may not extend, implement or mix-in this class. |
| 61 */ | 61 */ |
| 62 abstract class DartCompletionRequest extends CompletionRequest { | 62 abstract class DartCompletionRequest extends CompletionRequest { |
| 63 /** | 63 /** |
| 64 * Return the expression to the right of the "dot" or "dot dot", |
| 65 * or `null` if this is not a "dot" completion (e.g. `foo.b`). |
| 66 */ |
| 67 Expression get dotTarget; |
| 68 |
| 69 /** |
| 64 * Return a [Future] that completes with the library element | 70 * Return a [Future] that completes with the library element |
| 65 * which contains the unit in which the completion is occurring. | 71 * which contains the unit in which the completion is occurring. |
| 66 * The [Future] may return `null` if the library cannot be determined | 72 * The [Future] may return `null` if the library cannot be determined |
| 67 * (e.g. unlinked part file). | 73 * (e.g. unlinked part file). |
| 68 * Any information obtained from [target] prior to calling this method | 74 * Any information obtained from [target] prior to calling this method |
| 69 * should be discarded as it may have changed. | 75 * should be discarded as it may have changed. |
| 70 */ | 76 */ |
| 71 Future<LibraryElement> get libraryElement; | 77 Future<LibraryElement> get libraryElement; |
| 72 | 78 |
| 73 /** | 79 /** |
| (...skipping 30 matching lines...) Expand all Loading... |
| 104 /** | 110 /** |
| 105 * Return a [Future] that completes when the element associated with | 111 * Return a [Future] that completes when the element associated with |
| 106 * the given [expression] in the target compilation unit is available. | 112 * the given [expression] in the target compilation unit is available. |
| 107 * It may also complete if the expression cannot be resolved | 113 * It may also complete if the expression cannot be resolved |
| 108 * (e.g. unknown identifier, completion aborted, etc). | 114 * (e.g. unknown identifier, completion aborted, etc). |
| 109 * Any information obtained from [target] prior to calling this method | 115 * Any information obtained from [target] prior to calling this method |
| 110 * should be discarded as it may have changed. | 116 * should be discarded as it may have changed. |
| 111 */ | 117 */ |
| 112 Future resolveExpression(Expression expression); | 118 Future resolveExpression(Expression expression); |
| 113 } | 119 } |
| OLD | NEW |