Index: pkg/analyzer_plugin/lib/src/utilities/assist/assist.dart |
diff --git a/pkg/analyzer_plugin/lib/src/utilities/assist/assist.dart b/pkg/analyzer_plugin/lib/src/utilities/assist/assist.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..79cdfffc6e9a48257b0b371feb017b8d67ae3d18 |
--- /dev/null |
+++ b/pkg/analyzer_plugin/lib/src/utilities/assist/assist.dart |
@@ -0,0 +1,46 @@ |
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+import 'package:analyzer/dart/analysis/results.dart'; |
+import 'package:analyzer/file_system/file_system.dart'; |
+import 'package:analyzer_plugin/protocol/protocol_generated.dart'; |
+import 'package:analyzer_plugin/utilities/assist/assist.dart'; |
+ |
+/** |
+ * A concrete implementation of [AssistCollector]. |
+ */ |
+class AssistCollectorImpl implements AssistCollector { |
+ /** |
+ * The list of assists that have been collected. |
+ */ |
+ final List<PrioritizedSourceChange> assists = <PrioritizedSourceChange>[]; |
+ |
+ @override |
+ void addAssist(PrioritizedSourceChange assist) { |
+ assists.add(assist); |
+ } |
+} |
+ |
+/** |
+ * A concrete implementation of [AssistRequest]. |
+ */ |
+class AssistRequestImpl implements AssistRequest { |
+ @override |
+ final ResourceProvider resourceProvider; |
+ |
+ @override |
+ final int offset; |
+ |
+ @override |
+ final int length; |
+ |
+ @override |
+ final ResolveResult result; |
+ |
+ /** |
+ * Initialize a newly create request with the given data. |
+ */ |
+ AssistRequestImpl( |
+ this.resourceProvider, this.offset, this.length, this.result); |
+} |