OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'package:analysis_server/src/protocol_server.dart' as protocol; | |
6 import 'package:analysis_server/src/protocol_server.dart' | |
7 hide Element, ElementKind; | |
8 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; | |
9 import 'package:analyzer/dart/element/element.dart'; | 5 import 'package:analyzer/dart/element/element.dart'; |
10 import 'package:analyzer/file_system/file_system.dart'; | 6 import 'package:analyzer/file_system/file_system.dart'; |
| 7 import 'package:analyzer_plugin/protocol/protocol_common.dart' |
| 8 hide Element, ElementKind; |
| 9 import 'package:analyzer_plugin/protocol/protocol_common.dart' as protocol; |
11 import 'package:analyzer_plugin/src/utilities/completion/suggestion_builder.dart
'; | 10 import 'package:analyzer_plugin/src/utilities/completion/suggestion_builder.dart
'; |
| 11 import 'package:analyzer_plugin/utilities/completion/relevance.dart'; |
12 | 12 |
13 /** | 13 /** |
14 * Common mixin for sharing behavior. | 14 * Common mixin for sharing behavior. |
15 */ | 15 */ |
16 abstract class ElementSuggestionBuilder { | 16 abstract class ElementSuggestionBuilder { |
17 // Copied from analysis_server/lib/src/services/completion/dart/suggestion_bui
lder.dart | 17 // Copied from analysis_server/lib/src/services/completion/dart/suggestion_bui
lder.dart |
18 /** | 18 /** |
19 * A collection of completion suggestions. | 19 * A collection of completion suggestions. |
20 */ | 20 */ |
21 final List<CompletionSuggestion> suggestions = <CompletionSuggestion>[]; | 21 final List<CompletionSuggestion> suggestions = <CompletionSuggestion>[]; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // Cache lone getter/setter so that it can be paired | 105 // Cache lone getter/setter so that it can be paired |
106 _syntheticMap[cacheKey] = suggestion; | 106 _syntheticMap[cacheKey] = suggestion; |
107 } | 107 } |
108 } | 108 } |
109 if (_completions.add(suggestion.completion)) { | 109 if (_completions.add(suggestion.completion)) { |
110 suggestions.add(suggestion); | 110 suggestions.add(suggestion); |
111 } | 111 } |
112 } | 112 } |
113 } | 113 } |
114 } | 114 } |
OLD | NEW |