OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 services.completion.sorter; | 5 library services.completion.sorter; |
6 | 6 |
7 import 'package:analysis_server/completion/completion_dart.dart'; | |
8 import 'package:analysis_server/src/protocol.dart'; | 7 import 'package:analysis_server/src/protocol.dart'; |
| 8 import 'package:analysis_server/src/provisional/completion/completion_dart.dart'
; |
9 | 9 |
10 /** | 10 /** |
11 * The abstract class `ContributionSorter` defines the behavior of objects | 11 * The abstract class `ContributionSorter` defines the behavior of objects |
12 * that are used to adjust the relevance of an existing list of suggestions. | 12 * that are used to adjust the relevance of an existing list of suggestions. |
13 * This is a long-lived object that should not maintain state between | 13 * This is a long-lived object that should not maintain state between |
14 * calls to it's [sort] method. | 14 * calls to it's [sort] method. |
15 */ | 15 */ |
16 abstract class ContributionSorter { | 16 abstract class ContributionSorter { |
17 /** | 17 /** |
18 * After [CompletionSuggestion]s have been computed, | 18 * After [CompletionSuggestion]s have been computed, |
19 * this method is called to adjust the relevance of those suggestions. | 19 * this method is called to adjust the relevance of those suggestions. |
20 * The compilation unit and completion node | 20 * The compilation unit and completion node |
21 * in the given completion context may not be resolved. | 21 * in the given completion context may not be resolved. |
22 * This method should execute quickly and not block. | 22 * This method should execute quickly and not block. |
23 */ | 23 */ |
24 void sort(DartCompletionRequest request, | 24 void sort(DartCompletionRequest request, |
25 Iterable<CompletionSuggestion> suggestions); | 25 Iterable<CompletionSuggestion> suggestions); |
26 } | 26 } |
OLD | NEW |