| 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 `true` if free standing identifiers should be suggested |
| 72 */ |
| 73 bool get includeIdentifiers; |
| 74 |
| 75 /** |
| 71 * Return the library element which contains the unit in which the completion | 76 * Return the library element which contains the unit in which the completion |
| 72 * is occurring. This may return `null` if the library cannot be determined | 77 * is occurring. This may return `null` if the library cannot be determined |
| 73 * (e.g. unlinked part file). | 78 * (e.g. unlinked part file). |
| 74 */ | 79 */ |
| 75 LibraryElement get libraryElement; | 80 LibraryElement get libraryElement; |
| 76 | 81 |
| 77 /** | 82 /** |
| 78 * The source for the library containing the completion request. | 83 * The source for the library containing the completion request. |
| 79 * This may be different from the source in which the completion is requested | 84 * This may be different from the source in which the completion is requested |
| 80 * if the completion is being requested in a part file. | 85 * if the completion is being requested in a part file. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 108 /** | 113 /** |
| 109 * Return a [Future] that completes when the element associated with | 114 * Return a [Future] that completes when the element associated with |
| 110 * the given [expression] in the target compilation unit is available. | 115 * the given [expression] in the target compilation unit is available. |
| 111 * It may also complete if the expression cannot be resolved | 116 * It may also complete if the expression cannot be resolved |
| 112 * (e.g. unknown identifier, completion aborted, etc). | 117 * (e.g. unknown identifier, completion aborted, etc). |
| 113 * Any information obtained from [target] prior to calling this method | 118 * Any information obtained from [target] prior to calling this method |
| 114 * should be discarded as it may have changed. | 119 * should be discarded as it may have changed. |
| 115 */ | 120 */ |
| 116 Future resolveExpression(Expression expression); | 121 Future resolveExpression(Expression expression); |
| 117 } | 122 } |
| OLD | NEW |