Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Unified Diff: pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_core.dart

Issue 2928723003: Support a short-hand way to create linked edit groups (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_core.dart
diff --git a/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_core.dart b/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_core.dart
index 10a1c2d54eb842deffcd812f75b3114514c2872b..d6894b10adc538393e7f79b76a7b5b0a1a07f220 100644
--- a/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_core.dart
+++ b/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_core.dart
@@ -58,6 +58,17 @@ abstract class EditBuilder {
String groupName, void buildLinkedEdit(LinkedEditBuilder builder));
/**
+ * Add the given text as a linked edit group with the given [groupName]. If
+ * both a [kind] and a list of [suggestions] are provided, they will be added
+ * as suggestions to the group with the given kind.
+ *
+ * Throws an [ArgumentError] if either [kind] or [suggestions] are provided
+ * without the other.
+ */
+ void addSimpleLinkedEdit(String groupName, String text,
+ {LinkedEditSuggestionKind kind, List<String> suggestions});
+
+ /**
* Set the selection to the given location within the edit being built.
*/
@experimental

Powered by Google App Engine
This is Rietveld 408576698