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