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 14 matching lines...) Expand all Loading... |
25 const int DART_RELEVANCE_LOCAL_FIELD = 1058; | 25 const int DART_RELEVANCE_LOCAL_FIELD = 1058; |
26 const int DART_RELEVANCE_LOCAL_FUNCTION = 1056; | 26 const int DART_RELEVANCE_LOCAL_FUNCTION = 1056; |
27 const int DART_RELEVANCE_LOCAL_METHOD = 1057; | 27 const int DART_RELEVANCE_LOCAL_METHOD = 1057; |
28 const int DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE = 1056; | 28 const int DART_RELEVANCE_LOCAL_TOP_LEVEL_VARIABLE = 1056; |
29 const int DART_RELEVANCE_LOCAL_VARIABLE = 1059; | 29 const int DART_RELEVANCE_LOCAL_VARIABLE = 1059; |
30 const int DART_RELEVANCE_LOW = 500; | 30 const int DART_RELEVANCE_LOW = 500; |
31 const int DART_RELEVANCE_NAMED_PARAMETER = 1060; | 31 const int DART_RELEVANCE_NAMED_PARAMETER = 1060; |
32 const int DART_RELEVANCE_PARAMETER = 1059; | 32 const int DART_RELEVANCE_PARAMETER = 1059; |
33 | 33 |
34 /** | 34 /** |
35 * An object used to instantiate [DartCompletionContributor] instances | 35 * An object used to instantiate a [DartCompletionContributor] instance |
36 * for each 'completion.getSuggestions' request. | 36 * for each 'completion.getSuggestions' request. |
37 * Contributors should *not* be cached between requests. | 37 * Contributors should *not* be cached between requests. |
38 */ | 38 */ |
39 typedef List<DartCompletionContributor> DartCompletionContributorFactory(); | 39 typedef DartCompletionContributor DartCompletionContributorFactory(); |
40 | 40 |
41 /** | 41 /** |
42 * An object used to produce completions | 42 * An object used to produce completions |
43 * at a specific location within a Dart file. | 43 * at a specific location within a Dart file. |
44 * | 44 * |
45 * Clients may implement this class when implementing plugins. | 45 * Clients may implement this class when implementing plugins. |
46 */ | 46 */ |
47 abstract class DartCompletionContributor { | 47 abstract class DartCompletionContributor { |
48 /** | 48 /** |
49 * Return a [Future] that completes with a list of suggestions | 49 * Return a [Future] that completes with a list of suggestions |
(...skipping 18 matching lines...) Expand all Loading... |
68 /** | 68 /** |
69 * Return a [Future] that completes with a compilation unit in which | 69 * Return a [Future] that completes with a compilation unit in which |
70 * all declarations in all scopes containing [target] have been resolved. | 70 * all declarations in all scopes containing [target] have been resolved. |
71 * The [Future] may return `null` if the unit cannot be resolved | 71 * The [Future] may return `null` if the unit cannot be resolved |
72 * (e.g. unlinked part file). | 72 * (e.g. unlinked part file). |
73 * Any information obtained from [target] prior to calling this method | 73 * Any information obtained from [target] prior to calling this method |
74 * should be discarded as it may have changed. | 74 * should be discarded as it may have changed. |
75 */ | 75 */ |
76 Future<CompilationUnit> resolveDeclarationsInScope(); | 76 Future<CompilationUnit> resolveDeclarationsInScope(); |
77 } | 77 } |
OLD | NEW |