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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 * Clients may not extend, implement or mix-in this class. | 61 * Clients may not extend, implement or mix-in this class. |
62 */ | 62 */ |
63 abstract class DartCompletionRequest extends CompletionRequest { | 63 abstract class DartCompletionRequest extends CompletionRequest { |
64 /** | 64 /** |
65 * Return the expression to the right of the "dot" or "dot dot", | 65 * Return the expression to the right of the "dot" or "dot dot", |
66 * or `null` if this is not a "dot" completion (e.g. `foo.b`). | 66 * or `null` if this is not a "dot" completion (e.g. `foo.b`). |
67 */ | 67 */ |
68 Expression get dotTarget; | 68 Expression get dotTarget; |
69 | 69 |
70 /** | 70 /** |
71 * Return a [Future] that completes with the library element | 71 * Return the library element which contains the unit in which the completion |
72 * which contains the unit in which the completion is occurring. | 72 * is occurring. This may return `null` if the library cannot be determined |
73 * The [Future] may return `null` if the library cannot be determined | |
74 * (e.g. unlinked part file). | 73 * (e.g. unlinked part file). |
75 * Any information obtained from [target] prior to calling this method | |
76 * should be discarded as it may have changed. | |
77 */ | 74 */ |
78 Future<LibraryElement> get libraryElement; | 75 LibraryElement get libraryElement; |
79 | 76 |
80 /** | 77 /** |
81 * The source for the library containing the completion request. | 78 * The source for the library containing the completion request. |
82 * This may be different from the source in which the completion is requested | 79 * This may be different from the source in which the completion is requested |
83 * if the completion is being requested in a part file. | 80 * if the completion is being requested in a part file. |
84 * This may be `null` if the library for a part file cannot be determined. | 81 * This may be `null` if the library for a part file cannot be determined. |
85 */ | 82 */ |
86 Source get librarySource; | 83 Source get librarySource; |
87 | 84 |
88 /** | 85 /** |
(...skipping 22 matching lines...) Expand all Loading... |
111 /** | 108 /** |
112 * Return a [Future] that completes when the element associated with | 109 * Return a [Future] that completes when the element associated with |
113 * the given [expression] in the target compilation unit is available. | 110 * the given [expression] in the target compilation unit is available. |
114 * It may also complete if the expression cannot be resolved | 111 * It may also complete if the expression cannot be resolved |
115 * (e.g. unknown identifier, completion aborted, etc). | 112 * (e.g. unknown identifier, completion aborted, etc). |
116 * Any information obtained from [target] prior to calling this method | 113 * Any information obtained from [target] prior to calling this method |
117 * should be discarded as it may have changed. | 114 * should be discarded as it may have changed. |
118 */ | 115 */ |
119 Future resolveExpression(Expression expression); | 116 Future resolveExpression(Expression expression); |
120 } | 117 } |
OLD | NEW |