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:analyzer/dart/analysis/results.dart'; | 5 import 'package:analyzer/dart/analysis/results.dart'; |
6 import 'package:analyzer/file_system/file_system.dart'; | 6 import 'package:analyzer/file_system/file_system.dart'; |
7 import 'package:analyzer_plugin/protocol/protocol_generated.dart'; | 7 import 'package:analyzer_plugin/protocol/protocol_generated.dart'; |
8 import 'package:analyzer_plugin/utilities/assist/assist.dart'; | 8 import 'package:analyzer_plugin/utilities/assist/assist.dart'; |
9 | 9 |
10 /** | 10 /** |
11 * A concrete implementation of [AssistCollector]. | 11 * A concrete implementation of [AssistCollector]. |
12 */ | 12 */ |
13 class AssistCollectorImpl implements AssistCollector { | 13 class AssistCollectorImpl implements AssistCollector { |
14 /** | 14 /** |
15 * The list of assists that have been collected. | 15 * The list of assists that have been collected. |
16 */ | 16 */ |
17 final List<PrioritizedSourceChange> assists = <PrioritizedSourceChange>[]; | 17 final List<PrioritizedSourceChange> assists = <PrioritizedSourceChange>[]; |
18 | 18 |
19 @override | 19 @override |
20 void addAssist(PrioritizedSourceChange assist) { | 20 void addAssist(PrioritizedSourceChange assist) { |
21 assists.add(assist); | 21 assists.add(assist); |
22 } | 22 } |
23 } | 23 } |
24 | 24 |
25 /** | 25 /** |
26 * A concrete implementation of [AssistRequest]. | 26 * A concrete implementation of [DartAssistRequest]. |
27 */ | 27 */ |
28 class AssistRequestImpl implements AssistRequest { | 28 class DartAssistRequestImpl implements DartAssistRequest { |
29 @override | 29 @override |
30 final ResourceProvider resourceProvider; | 30 final ResourceProvider resourceProvider; |
31 | 31 |
32 @override | 32 @override |
33 final int offset; | 33 final int offset; |
34 | 34 |
35 @override | 35 @override |
36 final int length; | 36 final int length; |
37 | 37 |
38 @override | 38 @override |
39 final ResolveResult result; | 39 final ResolveResult result; |
40 | 40 |
41 /** | 41 /** |
42 * Initialize a newly create request with the given data. | 42 * Initialize a newly create request with the given data. |
43 */ | 43 */ |
44 AssistRequestImpl( | 44 DartAssistRequestImpl( |
45 this.resourceProvider, this.offset, this.length, this.result); | 45 this.resourceProvider, this.offset, this.length, this.result); |
46 } | 46 } |
OLD | NEW |