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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 DartCompletionRequest request); | 56 DartCompletionRequest request); |
57 } | 57 } |
58 | 58 |
59 /** | 59 /** |
60 * The information about a requested list of completions within a Dart file. | 60 * The information about a requested list of completions within a Dart file. |
61 * | 61 * |
62 * Clients may not extend, implement or mix-in this class. | 62 * Clients may not extend, implement or mix-in this class. |
63 */ | 63 */ |
64 abstract class DartCompletionRequest extends CompletionRequest { | 64 abstract class DartCompletionRequest extends CompletionRequest { |
65 /** | 65 /** |
| 66 * Return the dart:core library element |
| 67 */ |
| 68 LibraryElement get coreLib; |
| 69 |
| 70 /** |
66 * Return the expression to the right of the "dot" or "dot dot", | 71 * Return the expression to the right of the "dot" or "dot dot", |
67 * or `null` if this is not a "dot" completion (e.g. `foo.b`). | 72 * or `null` if this is not a "dot" completion (e.g. `foo.b`). |
68 */ | 73 */ |
69 Expression get dotTarget; | 74 Expression get dotTarget; |
70 | 75 |
71 /** | 76 /** |
72 * Return `true` if free standing identifiers should be suggested | 77 * Return `true` if free standing identifiers should be suggested |
73 */ | 78 */ |
74 bool get includeIdentifiers; | 79 bool get includeIdentifiers; |
75 | 80 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 /** | 119 /** |
115 * Return a [Future] that completes when the element associated with | 120 * Return a [Future] that completes when the element associated with |
116 * the given [expression] in the target compilation unit is available. | 121 * the given [expression] in the target compilation unit is available. |
117 * It may also complete if the expression cannot be resolved | 122 * It may also complete if the expression cannot be resolved |
118 * (e.g. unknown identifier, completion aborted, etc). | 123 * (e.g. unknown identifier, completion aborted, etc). |
119 * Any information obtained from [target] prior to calling this method | 124 * Any information obtained from [target] prior to calling this method |
120 * should be discarded as it may have changed. | 125 * should be discarded as it may have changed. |
121 */ | 126 */ |
122 Future resolveExpression(Expression expression); | 127 Future resolveExpression(Expression expression); |
123 } | 128 } |
OLD | NEW |